From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 01:12:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EEF6932; Sun, 8 Feb 2015 01:12:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B0416E; Sun, 8 Feb 2015 01:12:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t181CNxO027750; Sun, 8 Feb 2015 01:12:23 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t181CNmf027749; Sun, 8 Feb 2015 01:12:23 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502080112.t181CNmf027749@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 8 Feb 2015 01:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278368 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 01:12:24 -0000 Author: gonzo Date: Sun Feb 8 01:12:23 2015 New Revision: 278368 URL: https://svnweb.freebsd.org/changeset/base/278368 Log: Act as a bus in attach method: probe and attach devices Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Sat Feb 7 23:25:56 2015 (r278367) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Sun Feb 8 01:12:23 2015 (r278368) @@ -171,6 +171,9 @@ bcm_vchiq_attach(device_t dev) vchiq_init(); + bus_generic_probe(dev); + bus_generic_attach(dev); + return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 01:12:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07436A6A; Sun, 8 Feb 2015 01:12:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E657194; Sun, 8 Feb 2015 01:12:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t181CfMM027825; Sun, 8 Feb 2015 01:12:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t181Cf7Y027818; Sun, 8 Feb 2015 01:12:41 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502080112.t181Cf7Y027818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 8 Feb 2015 01:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278369 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 01:12:42 -0000 Author: gonzo Date: Sun Feb 8 01:12:40 2015 New Revision: 278369 URL: https://svnweb.freebsd.org/changeset/base/278369 Log: Add VideoCore audio driver for Rasperry Pi (BCM2835) Added: head/sys/arm/broadcom/bcm2835/bcm2835_audio.c (contents, props changed) head/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 head/sys/arm/conf/RPI-B Added: head/sys/arm/broadcom/bcm2835/bcm2835_audio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_audio.c Sun Feb 8 01:12:40 2015 (r278369) @@ -0,0 +1,908 @@ +/*- + * Copyright (c) 2015 Oleksandr Tymoshenko + * + * 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. + */ + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_snd.h" +#endif + +#include +#include + +#include "mixer_if.h" + +#include "interface/compat/vchi_bsd.h" +#include "interface/vchi/vchi.h" +#include "interface/vchiq_arm/vchiq.h" + +#include "vc_vchi_audioserv_defs.h" + +SND_DECLARE_FILE("$FreeBSD$"); + +#define DEST_AUTO 0 +#define DEST_HEADPHONES 1 +#define DEST_HDMI 2 + +#define VCHIQ_AUDIO_PACKET_SIZE 4000 +#define VCHIQ_AUDIO_BUFFER_SIZE 128000 + +#define VCHIQ_AUDIO_MAX_VOLUME +/* volume in terms of 0.01dB */ +#define VCHIQ_AUDIO_VOLUME_MIN -10239 +#define VCHIQ_AUDIO_VOLUME(db100) (uint32_t)(-((db100) << 8)/100) + +/* dB levels with 5% volume step */ +static int db_levels[] = { + VCHIQ_AUDIO_VOLUME_MIN, -4605, -3794, -3218, -2772, + -2407, -2099, -1832, -1597, -1386, + -1195, -1021, -861, -713, -575, + -446, -325, -210, -102, 0, +}; + +static uint32_t bcm2835_audio_playfmt[] = { + SND_FORMAT(AFMT_U8, 1, 0), + SND_FORMAT(AFMT_U8, 2, 0), + SND_FORMAT(AFMT_S8, 1, 0), + SND_FORMAT(AFMT_S8, 2, 0), + SND_FORMAT(AFMT_S16_LE, 1, 0), + SND_FORMAT(AFMT_S16_LE, 2, 0), + SND_FORMAT(AFMT_U16_LE, 1, 0), + SND_FORMAT(AFMT_U16_LE, 2, 0), + 0 +}; + +static struct pcmchan_caps bcm2835_audio_playcaps = {8000, 48000, bcm2835_audio_playfmt, 0}; + +struct bcm2835_audio_info; + +#define PLAYBACK_IDLE 0 +#define PLAYBACK_STARTING 1 +#define PLAYBACK_PLAYING 2 +#define PLAYBACK_STOPPING 3 + +struct bcm2835_audio_chinfo { + struct bcm2835_audio_info *parent; + struct pcm_channel *channel; + struct snd_dbuf *buffer; + uint32_t fmt, spd, blksz; + + uint32_t complete_pos; + uint32_t free_buffer; + uint32_t buffered_ptr; + int playback_state; +}; + +struct bcm2835_audio_info { + device_t dev; + unsigned int bufsz; + struct bcm2835_audio_chinfo pch; + uint32_t dest, volume; + struct mtx *lock; + struct intr_config_hook intr_hook; + + /* VCHI data */ + struct mtx vchi_lock; + + /* MSG reply */ + struct mtx msg_avail_lock; + struct cv msg_avail_cv; + uint32_t msg_result; + + VCHI_INSTANCE_T vchi_instance; + VCHI_CONNECTION_T *vchi_connection; + VCHI_SERVICE_HANDLE_T vchi_handle; + + struct mtx data_lock; + struct cv data_cv; + + /* Unloadign module */ + int unloading; +}; + +#define bcm2835_audio_lock(_ess) snd_mtxlock((_ess)->lock) +#define bcm2835_audio_unlock(_ess) snd_mtxunlock((_ess)->lock) +#define bcm2835_audio_lock_assert(_ess) snd_mtxassert((_ess)->lock) + +#define VCHIQ_VCHI_LOCK(sc) mtx_lock(&(sc)->vchi_lock) +#define VCHIQ_VCHI_UNLOCK(sc) mtx_unlock(&(sc)->vchi_lock) + +static const char * +dest_description(uint32_t dest) +{ + switch (dest) { + case DEST_AUTO: + return "AUTO"; + break; + + case DEST_HEADPHONES: + return "HEADPHONES"; + break; + + case DEST_HDMI: + return "HDMI"; + break; + default: + return "UNKNOWN"; + break; + } +} + +static void +bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *msg_handle) +{ + struct bcm2835_audio_info *sc = (struct bcm2835_audio_info *)param; + int32_t status; + uint32_t msg_len; + VC_AUDIO_MSG_T m; + + if (reason != VCHI_CALLBACK_MSG_AVAILABLE) + return; + + status = vchi_msg_dequeue(sc->vchi_handle, + &m, sizeof m, &msg_len, VCHI_FLAGS_NONE); + if (m.type == VC_AUDIO_MSG_TYPE_RESULT) { + sc->msg_result = m.u.result.success; + cv_signal(&sc->msg_avail_cv); + } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { + struct bcm2835_audio_chinfo *ch = m.u.complete.cookie; + + int count = m.u.complete.count & 0xffff; + int perr = (m.u.complete.count & (1U << 30)) != 0; + + ch->complete_pos = (ch->complete_pos + count) % sndbuf_getsize(ch->buffer); + ch->free_buffer += count; + + if (perr || ch->free_buffer >= VCHIQ_AUDIO_PACKET_SIZE) { + chn_intr(ch->channel); + cv_signal(&sc->data_cv); + } + } else + printf("%s: unknown m.type: %d\n", __func__, m.type); +} + +/* VCHIQ stuff */ +static void +bcm2835_audio_init(struct bcm2835_audio_info *sc) +{ + int status; + + /* Initialize and create a VCHI connection */ + status = vchi_initialise(&sc->vchi_instance); + if (status != 0) { + printf("vchi_initialise failed: %d\n", status); + return; + } + + status = vchi_connect(NULL, 0, sc->vchi_instance); + if (status != 0) { + printf("vchi_connect failed: %d\n", status); + return; + } + + SERVICE_CREATION_T params = { + VCHI_VERSION_EX(VC_AUDIOSERV_VER, VC_AUDIOSERV_MIN_VER), + VC_AUDIO_SERVER_NAME, /* 4cc service code */ + sc->vchi_connection, /* passed in fn pointers */ + 0, /* rx fifo size */ + 0, /* tx fifo size */ + bcm2835_audio_callback, /* service callback */ + sc, /* service callback parameter */ + 1, + 1, + 0 /* want crc check on bulk transfers */ + }; + + status = vchi_service_open(sc->vchi_instance, ¶ms, + &sc->vchi_handle); + + if (status == 0) + /* Finished with the service for now */ + vchi_service_release(sc->vchi_handle); + else + sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; +} + +static void +bcm2835_audio_release(struct bcm2835_audio_info *sc) +{ + int success; + + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + success = vchi_service_close(sc->vchi_handle); + if (success != 0) + printf("vchi_service_close failed: %d\n", success); + sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; + } + + vchi_disconnect(sc->vchi_instance); +} + +static void +bcm2835_audio_reset_channel(struct bcm2835_audio_chinfo *ch) +{ + ch->free_buffer = VCHIQ_AUDIO_BUFFER_SIZE; + ch->playback_state = 0; + ch->buffered_ptr = 0; + ch->complete_pos = 0; + + sndbuf_reset(ch->buffer); +} + +static void +bcm2835_audio_start(struct bcm2835_audio_chinfo *ch) +{ + VC_AUDIO_MSG_T m; + int ret; + struct bcm2835_audio_info *sc = ch->parent; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + + bcm2835_audio_reset_channel(ch); + + m.type = VC_AUDIO_MSG_TYPE_START; + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + vchi_service_release(sc->vchi_handle); + } + VCHIQ_VCHI_UNLOCK(sc); + +} + +static void +bcm2835_audio_stop(struct bcm2835_audio_chinfo *ch) +{ + VC_AUDIO_MSG_T m; + int ret; + struct bcm2835_audio_info *sc = ch->parent; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + + m.type = VC_AUDIO_MSG_TYPE_STOP; + m.u.stop.draining = 0; + + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + vchi_service_release(sc->vchi_handle); + } + VCHIQ_VCHI_UNLOCK(sc); +} + +static void +bcm2835_audio_open(struct bcm2835_audio_info *sc) +{ + VC_AUDIO_MSG_T m; + int ret; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + + m.type = VC_AUDIO_MSG_TYPE_OPEN; + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + vchi_service_release(sc->vchi_handle); + } + VCHIQ_VCHI_UNLOCK(sc); +} + +static void +bcm2835_audio_update_controls(struct bcm2835_audio_info *sc) +{ + VC_AUDIO_MSG_T m; + int ret, db; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + + sc->msg_result = -1; + + m.type = VC_AUDIO_MSG_TYPE_CONTROL; + m.u.control.dest = sc->dest; + if (sc->volume > 99) + sc->volume = 99; + db = db_levels[sc->volume/5]; + m.u.control.volume = VCHIQ_AUDIO_VOLUME(db); + + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + mtx_lock(&sc->msg_avail_lock); + cv_wait_sig(&sc->msg_avail_cv, &sc->msg_avail_lock); + if (sc->msg_result) + printf("%s failed: %d\n", __func__, sc->msg_result); + mtx_unlock(&sc->msg_avail_lock); + + vchi_service_release(sc->vchi_handle); + } + VCHIQ_VCHI_UNLOCK(sc); +} + +static void +bcm2835_audio_update_params(struct bcm2835_audio_info *sc, struct bcm2835_audio_chinfo *ch) +{ + VC_AUDIO_MSG_T m; + int ret; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { + vchi_service_use(sc->vchi_handle); + + sc->msg_result = -1; + + m.type = VC_AUDIO_MSG_TYPE_CONFIG; + m.u.config.channels = AFMT_CHANNEL(ch->fmt); + m.u.config.samplerate = ch->spd; + m.u.config.bps = AFMT_BIT(ch->fmt); + + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + mtx_lock(&sc->msg_avail_lock); + cv_wait_sig(&sc->msg_avail_cv, &sc->msg_avail_lock); + if (sc->msg_result) + printf("%s failed: %d\n", __func__, sc->msg_result); + mtx_unlock(&sc->msg_avail_lock); + + vchi_service_release(sc->vchi_handle); + } + VCHIQ_VCHI_UNLOCK(sc); +} + +static __inline uint32_t +vchiq_unbuffered_bytes(struct bcm2835_audio_chinfo *ch) +{ + uint32_t size, ready, readyptr, readyend; + + size = sndbuf_getsize(ch->buffer); + readyptr = sndbuf_getreadyptr(ch->buffer); + ready = sndbuf_getready(ch->buffer); + + readyend = readyptr + ready; + /* Normal case */ + if (ch->buffered_ptr >= readyptr) { + if (readyend > ch->buffered_ptr) + return readyend - ch->buffered_ptr; + else + return 0; + } + else { /* buffered_ptr overflow */ + if (readyend > ch->buffered_ptr + size) + return readyend - ch->buffered_ptr - size; + else + return 0; + } +} + +static void +bcm2835_audio_write_samples(struct bcm2835_audio_chinfo *ch) +{ + struct bcm2835_audio_info *sc = ch->parent; + VC_AUDIO_MSG_T m; + void *buf; + uint32_t count, size; + int ret; + + VCHIQ_VCHI_LOCK(sc); + if (sc->vchi_handle == VCHIQ_SERVICE_HANDLE_INVALID) { + VCHIQ_VCHI_UNLOCK(sc); + return; + } + + vchi_service_use(sc->vchi_handle); + + size = sndbuf_getsize(ch->buffer); + count = vchiq_unbuffered_bytes(ch); + buf = (uint8_t*)sndbuf_getbuf(ch->buffer) + ch->buffered_ptr; + + if (ch->buffered_ptr + count > size) + count = size - ch->buffered_ptr; + + if (count < VCHIQ_AUDIO_PACKET_SIZE) + goto done; + + count = min(count, ch->free_buffer); + count -= count % VCHIQ_AUDIO_PACKET_SIZE; + + m.type = VC_AUDIO_MSG_TYPE_WRITE; + m.u.write.count = count; + m.u.write.max_packet = VCHIQ_AUDIO_PACKET_SIZE; + m.u.write.callback = NULL; + m.u.write.cookie = ch; + if (buf) + m.u.write.silence = 0; + else + m.u.write.silence = 1; + + ret = vchi_msg_queue(sc->vchi_handle, + &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + + if (ret != 0) + printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); + + if (buf) { + while (count > 0) { + int bytes = MIN((int)m.u.write.max_packet, (int)count); + ch->free_buffer -= bytes; + ch->buffered_ptr += bytes; + ch->buffered_ptr = ch->buffered_ptr % size; + ret = vchi_msg_queue(sc->vchi_handle, + buf, bytes, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + if (ret != 0) + printf("%s: vchi_msg_queue failed: %d\n", + __func__, ret); + buf = (char *)buf + bytes; + count -= bytes; + } + } +done: + + vchi_service_release(sc->vchi_handle); + VCHIQ_VCHI_UNLOCK(sc); +} + +static void +bcm2835_audio_worker(void *data) +{ + struct bcm2835_audio_info *sc = (struct bcm2835_audio_info *)data; + struct bcm2835_audio_chinfo *ch = &sc->pch; + mtx_lock(&sc->data_lock); + while(1) { + + if (sc->unloading) + break; + + if ((ch->playback_state == PLAYBACK_PLAYING) && + (vchiq_unbuffered_bytes(ch) >= VCHIQ_AUDIO_PACKET_SIZE) + && (ch->free_buffer >= VCHIQ_AUDIO_PACKET_SIZE)) { + bcm2835_audio_write_samples(ch); + } else { + if (ch->playback_state == PLAYBACK_STOPPING) { + bcm2835_audio_reset_channel(&sc->pch); + ch->playback_state = PLAYBACK_IDLE; + } + + cv_wait_sig(&sc->data_cv, &sc->data_lock); + + if (ch->playback_state == PLAYBACK_STARTING) { + /* Give it initial kick */ + chn_intr(sc->pch.channel); + ch->playback_state = PLAYBACK_PLAYING; + } + } + } + mtx_unlock(&sc->data_lock); + + kproc_exit(0); +} + +static void +bcm2835_audio_create_worker(struct bcm2835_audio_info *sc) +{ + struct proc *newp; + + if (kproc_create(bcm2835_audio_worker, (void*)sc, &newp, 0, 0, + "bcm2835_audio_worker") != 0) { + printf("failed to create bcm2835_audio_worker\n"); + } +} + +/* -------------------------------------------------------------------- */ +/* channel interface for ESS18xx */ +static void * +bcmchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) +{ + struct bcm2835_audio_info *sc = devinfo; + struct bcm2835_audio_chinfo *ch = &sc->pch; + void *buffer; + + if (dir == PCMDIR_REC) + return NULL; + + ch->parent = sc; + ch->channel = c; + ch->buffer = b; + + /* default values */ + ch->spd = 44100; + ch->fmt = SND_FORMAT(AFMT_S16_LE, 2, 0); + ch->blksz = VCHIQ_AUDIO_PACKET_SIZE; + + buffer = malloc(sc->bufsz, M_DEVBUF, M_WAITOK | M_ZERO); + + if (sndbuf_setup(ch->buffer, buffer, sc->bufsz) != 0) { + free(buffer, M_DEVBUF); + return NULL; + } + + bcm2835_audio_update_params(sc, ch); + + return ch; +} + +static int +bcmchan_free(kobj_t obj, void *data) +{ + struct bcm2835_audio_chinfo *ch = data; + void *buffer; + + buffer = sndbuf_getbuf(ch->buffer); + if (buffer) + free(buffer, M_DEVBUF); + + return (0); +} + +static int +bcmchan_setformat(kobj_t obj, void *data, uint32_t format) +{ + struct bcm2835_audio_chinfo *ch = data; + struct bcm2835_audio_info *sc = ch->parent; + + bcm2835_audio_lock(sc); + + ch->fmt = format; + bcm2835_audio_update_params(sc, ch); + + bcm2835_audio_unlock(sc); + + return 0; +} + +static uint32_t +bcmchan_setspeed(kobj_t obj, void *data, uint32_t speed) +{ + struct bcm2835_audio_chinfo *ch = data; + struct bcm2835_audio_info *sc = ch->parent; + + bcm2835_audio_lock(sc); + + ch->spd = speed; + bcm2835_audio_update_params(sc, ch); + + bcm2835_audio_unlock(sc); + + return ch->spd; +} + +static uint32_t +bcmchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) +{ + struct bcm2835_audio_chinfo *ch = data; + + return ch->blksz; +} + +static int +bcmchan_trigger(kobj_t obj, void *data, int go) +{ + struct bcm2835_audio_chinfo *ch = data; + struct bcm2835_audio_info *sc = ch->parent; + + if (!PCMTRIG_COMMON(go)) + return (0); + + bcm2835_audio_lock(sc); + + switch (go) { + case PCMTRIG_START: + bcm2835_audio_start(ch); + ch->playback_state = PLAYBACK_STARTING; + /* wakeup worker thread */ + cv_signal(&sc->data_cv); + break; + + case PCMTRIG_STOP: + case PCMTRIG_ABORT: + ch->playback_state = 1; + bcm2835_audio_stop(ch); + break; + + default: + break; + } + + bcm2835_audio_unlock(sc); + return 0; +} + +static uint32_t +bcmchan_getptr(kobj_t obj, void *data) +{ + struct bcm2835_audio_chinfo *ch = data; + struct bcm2835_audio_info *sc = ch->parent; + uint32_t ret; + + bcm2835_audio_lock(sc); + + ret = ch->complete_pos - (ch->complete_pos % VCHIQ_AUDIO_PACKET_SIZE); + + bcm2835_audio_unlock(sc); + + return ret; +} + +static struct pcmchan_caps * +bcmchan_getcaps(kobj_t obj, void *data) +{ + + return &bcm2835_audio_playcaps; +} + +static kobj_method_t bcmchan_methods[] = { + KOBJMETHOD(channel_init, bcmchan_init), + KOBJMETHOD(channel_free, bcmchan_free), + KOBJMETHOD(channel_setformat, bcmchan_setformat), + KOBJMETHOD(channel_setspeed, bcmchan_setspeed), + KOBJMETHOD(channel_setblocksize, bcmchan_setblocksize), + KOBJMETHOD(channel_trigger, bcmchan_trigger), + KOBJMETHOD(channel_getptr, bcmchan_getptr), + KOBJMETHOD(channel_getcaps, bcmchan_getcaps), + KOBJMETHOD_END +}; +CHANNEL_DECLARE(bcmchan); + +/************************************************************/ + +static int +bcmmix_init(struct snd_mixer *m) +{ + + mix_setdevs(m, SOUND_MASK_VOLUME); + + return (0); +} + +static int +bcmmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) +{ + struct bcm2835_audio_info *sc = mix_getdevinfo(m); + + switch (dev) { + case SOUND_MIXER_VOLUME: + sc->volume = left; + bcm2835_audio_update_controls(sc); + break; + + default: + break; + } + + return left | (left << 8); +} + +static kobj_method_t bcmmixer_methods[] = { + KOBJMETHOD(mixer_init, bcmmix_init), + KOBJMETHOD(mixer_set, bcmmix_set), + KOBJMETHOD_END +}; + +MIXER_DECLARE(bcmmixer); + +static int +sysctl_bcm2835_audio_dest(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_audio_info *sc = arg1; + int val; + int err; + + val = sc->dest; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + if ((val < 0) || (val > 2)) + return (EINVAL); + + sc->dest = val; + device_printf(sc->dev, "destination set to %s\n", dest_description(val)); + bcm2835_audio_update_controls(sc); + + return (0); +} + +static void +vchi_audio_sysctl_init(struct bcm2835_audio_info *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; + + /* + * Add system sysctl tree/handlers. + */ + ctx = device_get_sysctl_ctx(sc->dev); + tree_node = device_get_sysctl_tree(sc->dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "dest", + CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), + sysctl_bcm2835_audio_dest, "IU", "audio destination, " + "0 - auto, 1 - headphones, 2 - HDMI"); +} + +static void +bcm2835_audio_identify(driver_t *driver, device_t parent) +{ + + BUS_ADD_CHILD(parent, 0, "pcm", 0); +} + +static int +bcm2835_audio_probe(device_t dev) +{ + + device_set_desc(dev, "VCHQI audio"); + return (BUS_PROBE_DEFAULT); +} + + +static void +bcm2835_audio_delayed_init(void *xsc) +{ + struct bcm2835_audio_info *sc; + char status[SND_STATUSLEN]; + + sc = xsc; + + config_intrhook_disestablish(&sc->intr_hook); + + bcm2835_audio_init(sc); + bcm2835_audio_open(sc); + sc->volume = 75; + sc->dest = DEST_AUTO; + + if (mixer_init(sc->dev, &bcmmixer_class, sc)) { + device_printf(sc->dev, "mixer_init failed\n"); + goto no; + } + + if (pcm_register(sc->dev, sc, 1, 1)) { + device_printf(sc->dev, "pcm_register failed\n"); + goto no; + } + + pcm_addchan(sc->dev, PCMDIR_PLAY, &bcmchan_class, sc); + snprintf(status, SND_STATUSLEN, "at VCHIQ"); + pcm_setstatus(sc->dev, status); + + bcm2835_audio_reset_channel(&sc->pch); + bcm2835_audio_create_worker(sc); + + vchi_audio_sysctl_init(sc); + +no: + ; +} + +static int +bcm2835_audio_attach(device_t dev) +{ + struct bcm2835_audio_info *sc; + + sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); + + sc->dev = dev; + sc->bufsz = VCHIQ_AUDIO_BUFFER_SIZE; + + sc->lock = snd_mtxcreate(device_get_nameunit(dev), "bcm2835_audio softc"); + + mtx_init(&sc->vchi_lock, "bcm2835_audio", "vchi_lock", MTX_DEF); + mtx_init(&sc->msg_avail_lock, "msg_avail_mtx", "msg_avail_mtx", MTX_DEF); + cv_init(&sc->msg_avail_cv, "msg_avail_cv"); + mtx_init(&sc->data_lock, "data_mtx", "data_mtx", MTX_DEF); + cv_init(&sc->data_cv, "data_cv"); + sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; + + /* + * We need interrupts enabled for VCHI to work properly, + * so delay intialization until it happens + */ + sc->intr_hook.ich_func = bcm2835_audio_delayed_init; + sc->intr_hook.ich_arg = sc; + + if (config_intrhook_establish(&sc->intr_hook) != 0) + goto no; + + return 0; + +no: + return ENXIO; +} + +static int +bcm2835_audio_detach(device_t dev) +{ + int r; + struct bcm2835_audio_info *sc; + sc = pcm_getdevinfo(dev); + + /* Stop worker thread */ + sc->unloading = 1; + cv_signal(&sc->data_cv); + + r = pcm_unregister(dev); + if (r) + return r; + + mtx_destroy(&sc->vchi_lock); + mtx_destroy(&sc->msg_avail_lock); + cv_destroy(&sc->msg_avail_cv); + mtx_destroy(&sc->data_lock); + cv_destroy(&sc->data_cv); + + bcm2835_audio_release(sc); + + if (sc->lock) { + snd_mtxfree(sc->lock); + sc->lock = NULL; + } + + free(sc, M_DEVBUF); + + return 0; +} + +static device_method_t bcm2835_audio_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, bcm2835_audio_identify), + DEVMETHOD(device_probe, bcm2835_audio_probe), + DEVMETHOD(device_attach, bcm2835_audio_attach), + DEVMETHOD(device_detach, bcm2835_audio_detach), + + { 0, 0 } +}; + +static driver_t bcm2835_audio_driver = { + "pcm", + bcm2835_audio_methods, + PCM_SOFTC_SIZE, +}; + +DRIVER_MODULE(bcm2835_audio, vchiq, bcm2835_audio_driver, pcm_devclass, 0, 0); +MODULE_DEPEND(bcm2835_audio, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); +MODULE_DEPEND(bcm2835_audio, vchiq, 1, 1, 1); +MODULE_VERSION(bcm2835_audio, 1); Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Feb 8 01:12:23 2015 (r278368) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Feb 8 01:12:40 2015 (r278369) @@ -28,6 +28,9 @@ kern/kern_clocksource.c dev/mbox/mbox_if.m standard dev/ofw/ofw_cpu.c standard +arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" + # VideoCore driver contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" Added: head/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h Sun Feb 8 01:12:40 2015 (r278369) @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2012, Broadcom Europe Ltd + * All rights reserved. + * + * 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. + * 3. Neither the name of the copyright holder nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + * + * $FreeBSD$ + */ + +#ifndef _VC_AUDIO_DEFS_H_ +#define _VC_AUDIO_DEFS_H_ + +#define VC_AUDIOSERV_MIN_VER 1 +#define VC_AUDIOSERV_VER 2 + +/* FourCC code used for VCHI connection */ +#define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") + +/* Maximum message length */ +#define VC_AUDIO_MAX_MSG_LEN (sizeof( VC_AUDIO_MSG_T )) + +/* + * List of screens that are currently supported + * All message types supported for HOST->VC direction + */ +typedef enum +{ + VC_AUDIO_MSG_TYPE_RESULT, /* Generic result */ + VC_AUDIO_MSG_TYPE_COMPLETE, /* playback of samples complete */ + VC_AUDIO_MSG_TYPE_CONFIG, /* Configure */ + VC_AUDIO_MSG_TYPE_CONTROL, /* control */ + VC_AUDIO_MSG_TYPE_OPEN, /* open */ + VC_AUDIO_MSG_TYPE_CLOSE, /* close/shutdown */ + VC_AUDIO_MSG_TYPE_START, /* start output (i.e. resume) */ + VC_AUDIO_MSG_TYPE_STOP, /* stop output (i.e. pause) */ + VC_AUDIO_MSG_TYPE_WRITE, /* write samples */ + VC_AUDIO_MSG_TYPE_MAX + +} VC_AUDIO_MSG_TYPE; + +static const char *vc_audio_msg_type_names[] = { + "VC_AUDIO_MSG_TYPE_RESULT", + "VC_AUDIO_MSG_TYPE_COMPLETE", + "VC_AUDIO_MSG_TYPE_CONFIG", + "VC_AUDIO_MSG_TYPE_CONTROL", + "VC_AUDIO_MSG_TYPE_OPEN", + "VC_AUDIO_MSG_TYPE_CLOSE", + "VC_AUDIO_MSG_TYPE_START", + "VC_AUDIO_MSG_TYPE_STOP", + "VC_AUDIO_MSG_TYPE_WRITE", + "VC_AUDIO_MSG_TYPE_MAX" +}; + +/* configure the audio */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 03:55:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB4FC999; Sun, 8 Feb 2015 03:55:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B41A6; Sun, 8 Feb 2015 03:55:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t183tDik002514; Sun, 8 Feb 2015 03:55:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t183tDQE002513; Sun, 8 Feb 2015 03:55:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201502080355.t183tDQE002513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 8 Feb 2015 03:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278370 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 03:55:14 -0000 Author: markj Date: Sun Feb 8 03:55:12 2015 New Revision: 278370 URL: https://svnweb.freebsd.org/changeset/base/278370 Log: Fix a typo in r278137: make sure to free provider state. X-MFC-With: r278136 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 8 01:12:40 2015 (r278369) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 8 03:55:12 2015 (r278370) @@ -16881,7 +16881,7 @@ dtrace_dtr(void *data) #ifdef illumos dtrace_state_destroy(state); #else - if (state == NULL) { + if (state != NULL) { dtrace_state_destroy(state); kmem_free(state, 0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 08:24:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46C80FBF; Sun, 8 Feb 2015 08:24:25 +0000 (UTC) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id BFD0DAF9; Sun, 8 Feb 2015 08:24:23 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 61DEC1D95B5A; Sun, 8 Feb 2015 09:23:37 +0100 (CET) Date: Sun, 8 Feb 2015 09:23:37 +0100 From: Roman Divacky To: Dimitry Andric Subject: Re: svn commit: r278361 - in head/contrib/llvm: lib/Target/X86 patches Message-ID: <20150208082337.GA81836@vlakno.cz> References: <201502071657.t17GvXW9092528@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502071657.t17GvXW9092528@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 08:24:25 -0000 Fwiw, FastISel is only used for -O0, maybe the right way to "fix" the breakage is to not use -O0 ? On Sat, Feb 07, 2015 at 04:57:33PM +0000, Dimitry Andric wrote: > Author: dim > Date: Sat Feb 7 16:57:32 2015 > New Revision: 278361 > URL: https://svnweb.freebsd.org/changeset/base/278361 > > Log: > Back out r278349 and r278350 for now, since this apparently blows up the > kernel build in sys/dev/hptmv/hptproc.c for some people. > > Reported by: sbruno, Matthew Fuller > > Deleted: > head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff > Modified: > head/contrib/llvm/lib/Target/X86/X86FastISel.cpp > > Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp > ============================================================================== > --- head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Sat Feb 7 14:31:51 2015 (r278360) > +++ head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Sat Feb 7 16:57:32 2015 (r278361) > @@ -2699,9 +2699,6 @@ bool X86FastISel::FastLowerCall(CallLowe > TM.Options.GuaranteedTailCallOpt)) > return false; > > - SmallVector OutVTs; > - SmallVector ArgRegs; > - > // If this is a constant i1/i8/i16 argument, promote to i32 to avoid an extra > // instruction. This is safe because it is common to all FastISel supported > // calling conventions on x86. > @@ -2719,34 +2716,28 @@ bool X86FastISel::FastLowerCall(CallLowe > > // Passing bools around ends up doing a trunc to i1 and passing it. > // Codegen this as an argument + "and 1". > - MVT VT; > - auto *TI = dyn_cast(Val); > - unsigned ResultReg; > - if (TI && TI->getType()->isIntegerTy(1) && CLI.CS && > - (TI->getParent() == CLI.CS->getInstruction()->getParent()) && > - TI->hasOneUse()) { > - Value *PrevVal = TI->getOperand(0); > - ResultReg = getRegForValue(PrevVal); > - > - if (!ResultReg) > - return false; > + if (auto *TI = dyn_cast(Val)) { > + if (TI->getType()->isIntegerTy(1) && CLI.CS && > + (TI->getParent() == CLI.CS->getInstruction()->getParent()) && > + TI->hasOneUse()) { > + Val = cast(Val)->getOperand(0); > + unsigned ResultReg = getRegForValue(Val); > > - if (!isTypeLegal(PrevVal->getType(), VT)) > - return false; > + if (!ResultReg) > + return false; > > - ResultReg = > - FastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1); > + MVT ArgVT; > + if (!isTypeLegal(Val->getType(), ArgVT)) > + return false; > > - if (!ResultReg) > - return false; > - } else { > - if (!isTypeLegal(Val->getType(), VT)) > - return false; > - ResultReg = getRegForValue(Val); > - } > + ResultReg = > + FastEmit_ri(ArgVT, ArgVT, ISD::AND, ResultReg, Val->hasOneUse(), 1); > > - ArgRegs.push_back(ResultReg); > - OutVTs.push_back(VT); > + if (!ResultReg) > + return false; > + UpdateValueMap(Val, ResultReg); > + } > + } > } > > // Analyze operands of the call, assigning locations to each operand. > @@ -2758,6 +2749,13 @@ bool X86FastISel::FastLowerCall(CallLowe > if (IsWin64) > CCInfo.AllocateStack(32, 8); > > + SmallVector OutVTs; > + for (auto *Val : OutVals) { > + MVT VT; > + if (!isTypeLegal(Val->getType(), VT)) > + return false; > + OutVTs.push_back(VT); > + } > CCInfo.AnalyzeCallOperands(OutVTs, OutFlags, CC_X86); > > // Get a count of how many bytes are to be pushed on the stack. > @@ -2779,7 +2777,9 @@ bool X86FastISel::FastLowerCall(CallLowe > if (ArgVT == MVT::x86mmx) > return false; > > - unsigned ArgReg = ArgRegs[VA.getValNo()]; > + unsigned ArgReg = getRegForValue(ArgVal); > + if (!ArgReg) > + return false; > > // Promote the value if needed. > switch (VA.getLocInfo()) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 08:34:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 8B0BB30D; Sun, 8 Feb 2015 08:34:29 +0000 (UTC) Date: Sun, 8 Feb 2015 08:34:29 +0000 From: Alexey Dokuchaev To: Devin Teske Subject: Re: svn commit: r278335 - head/sys/boot/forth Message-ID: <20150208083429.GA21530@FreeBSD.org> References: <201502062319.t16NJISs097347@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502062319.t16NJISs097347@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 08:34:29 -0000 On Fri, Feb 06, 2015 at 11:19:18PM +0000, Devin Teske wrote: > New Revision: 278335 > URL: https://svnweb.freebsd.org/changeset/base/278335 > > Log: > Revert SVN r277693. > > Discussed on: src-committers > Approved by: core (emaste) Why it was reverted, if I may ask? ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 08:42:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93D314AC; Sun, 8 Feb 2015 08:42:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FA70D00; Sun, 8 Feb 2015 08:42:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t188gk8D034391; Sun, 8 Feb 2015 08:42:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t188gjge034389; Sun, 8 Feb 2015 08:42:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <201502080842.t188gjge034389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 8 Feb 2015 08:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278371 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 08:42:46 -0000 Author: np Date: Sun Feb 8 08:42:45 2015 New Revision: 278371 URL: https://svnweb.freebsd.org/changeset/base/278371 Log: cxgbe(4): a change to the synchronization rules within the the driver. This is purely cosmetic because the new rules are already followed. MFC after: 1 week Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Sun Feb 8 03:55:12 2015 (r278370) +++ head/sys/dev/cxgbe/adapter.h Sun Feb 8 08:42:45 2015 (r278371) @@ -812,7 +812,6 @@ struct adapter { #define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) -/* XXX: not bulletproof, but much better than nothing */ #define ASSERT_SYNCHRONIZED_OP(sc) \ KASSERT(IS_BUSY(sc) && \ (mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sun Feb 8 03:55:12 2015 (r278370) +++ head/sys/dev/cxgbe/t4_main.c Sun Feb 8 08:42:45 2015 (r278371) @@ -3139,6 +3139,9 @@ mcfail: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ int begin_synchronized_op(struct adapter *sc, struct port_info *pi, int flags, char *wmesg) @@ -3194,6 +3197,9 @@ done: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ void end_synchronized_op(struct adapter *sc, int flags) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 08:52:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31989645; Sun, 8 Feb 2015 08:52:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DCB7DCA; Sun, 8 Feb 2015 08:52:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t188qIu7038927; Sun, 8 Feb 2015 08:52:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t188qISg038926; Sun, 8 Feb 2015 08:52:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201502080852.t188qISg038926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 8 Feb 2015 08:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278372 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 08:52:19 -0000 Author: np Date: Sun Feb 8 08:52:18 2015 New Revision: 278372 URL: https://svnweb.freebsd.org/changeset/base/278372 Log: cxgbe(4): adapter_full_init is always a synchronized operation. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sun Feb 8 08:42:45 2015 (r278371) +++ head/sys/dev/cxgbe/t4_main.c Sun Feb 8 08:52:18 2015 (r278372) @@ -3432,6 +3432,7 @@ adapter_full_init(struct adapter *sc) { int rc, i; + ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT((sc->flags & FULL_INIT_DONE) == 0, ("%s: FULL_INIT_DONE already", __func__)); From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 09:28:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FF4EC0E; Sun, 8 Feb 2015 09:28:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A928F4; Sun, 8 Feb 2015 09:28:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t189Svl0053428; Sun, 8 Feb 2015 09:28:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t189Subt053419; Sun, 8 Feb 2015 09:28:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <201502080928.t189Subt053419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 8 Feb 2015 09:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278374 - in head/sys/dev/cxgbe: . iw_cxgbe tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 09:28:58 -0000 Author: np Date: Sun Feb 8 09:28:55 2015 New Revision: 278374 URL: https://svnweb.freebsd.org/changeset/base/278374 Log: cxgbe(4): tidy up some of the interaction between the Upper Layer Drivers (ULDs) and the base if_cxgbe driver. Track the per-adapter activation of ULDs in a new "active_ulds" field. This was done pretty arbitrarily before this change -- via TOM_INIT_DONE in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in adapter->offload_map for iWARP. iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM ULD). The rules are: a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then iWARP and/or iSCSI are enabled too. b) When the iWARP and iSCSI modules are loaded they go looking for adapters with TOE enabled and enable themselves on that adapter. c) You cannot deactivate or unload the TOM module from underneath iWARP or iSCSI. Any such attempt will fail with EBUSY. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/adapter.h Sun Feb 8 09:28:55 2015 (r278374) @@ -192,7 +192,7 @@ enum { /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), - TOM_INIT_DONE = (1 << 5), + /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -758,7 +758,8 @@ struct adapter { uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD - int offload_map; + int offload_map; /* ports with IFCAP_TOE enabled */ + int active_ulds; /* ULDs activated on this adapter */ #endif int flags; Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/device.c Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/iw_cxgbe/device.c Sun Feb 8 09:28:55 2015 (r278374) @@ -213,7 +213,7 @@ c4iw_activate(struct adapter *sc) ASSERT_SYNCHRONIZED_OP(sc); - if (isset(&sc->offload_map, MAX_NPORTS)) { + if (uld_active(sc, ULD_IWARP)) { KASSERT(0, ("%s: RDMA already eanbled on sc %p", __func__, sc)); return (0); } @@ -265,9 +265,9 @@ c4iw_activate_all(struct adapter *sc, vo if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwact") != 0) return; - if (!isset(&sc->offload_map, MAX_NPORTS) && - t4_activate_uld(sc, ULD_IWARP) == 0) - setbit(&sc->offload_map, MAX_NPORTS); + /* Activate iWARP if any port on this adapter has IFCAP_TOE enabled. */ + if (sc->offload_map && !uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } @@ -279,9 +279,8 @@ c4iw_deactivate_all(struct adapter *sc, if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwdea") != 0) return; - if (isset(&sc->offload_map, MAX_NPORTS) && - t4_deactivate_uld(sc, ULD_IWARP) == 0) - clrbit(&sc->offload_map, MAX_NPORTS); + if (uld_active(sc, ULD_IWARP)) + (void) t4_deactivate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/offload.h Sun Feb 8 09:28:55 2015 (r278374) @@ -127,9 +127,10 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { - ULD_TOM = 1, - ULD_IWARP = 2, - ULD_ISCSI = 3, + ULD_TOM = 0, + ULD_IWARP, + ULD_ISCSI, + ULD_MAX = ULD_ISCSI }; struct adapter; @@ -156,5 +157,6 @@ int t4_unregister_uld(struct uld_info *) int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +int uld_active(struct adapter *, int); #endif #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/t4_main.c Sun Feb 8 09:28:55 2015 (r278374) @@ -7144,7 +7144,7 @@ set_filter_mode(struct adapter *sc, uint } #ifdef TCP_OFFLOAD - if (sc->offload_map) { + if (uld_active(sc, ULD_TOM)) { rc = EBUSY; goto done; } @@ -8236,7 +8236,7 @@ toe_capability(struct port_info *pi, int if (isset(&sc->offload_map, pi->port_id)) return (0); - if (!(sc->flags & TOM_INIT_DONE)) { + if (!uld_active(sc, ULD_TOM)) { rc = t4_activate_uld(sc, ULD_TOM); if (rc == EAGAIN) { log(LOG_WARNING, @@ -8247,16 +8247,22 @@ toe_capability(struct port_info *pi, int return (rc); KASSERT(sc->tom_softc != NULL, ("%s: TOM activated but softc NULL", __func__)); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM activated but flag not set", __func__)); } + /* Activate iWARP and iSCSI too, if the modules are loaded. */ + if (!uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); + if (!uld_active(sc, ULD_ISCSI)) + (void) t4_activate_uld(sc, ULD_ISCSI); + setbit(&sc->offload_map, pi->port_id); } else { if (!isset(&sc->offload_map, pi->port_id)) return (0); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM never initialized?", __func__)); clrbit(&sc->offload_map, pi->port_id); } @@ -8316,11 +8322,15 @@ done: int t4_activate_uld(struct adapter *sc, int id) { - int rc = EAGAIN; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = EAGAIN; /* kldoad the module with this ULD and try again. */ + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { @@ -8328,16 +8338,18 @@ t4_activate_uld(struct adapter *sc, int if (!(sc->flags & FULL_INIT_DONE)) { rc = adapter_full_init(sc); if (rc != 0) - goto done; + break; } rc = ui->activate(sc); - if (rc == 0) + if (rc == 0) { + setbit(&sc->active_ulds, id); ui->refcount++; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); @@ -8346,26 +8358,41 @@ done: int t4_deactivate_uld(struct adapter *sc, int id) { - int rc = EINVAL; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = ENXIO; + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { if (ui->uld_id == id) { rc = ui->deactivate(sc); - if (rc == 0) + if (rc == 0) { + clrbit(&sc->active_ulds, id); ui->refcount--; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); } + +int +uld_active(struct adapter *sc, int uld_id) +{ + + MPASS(uld_id >= 0 && uld_id <= ULD_MAX); + + return (isset(&sc->active_ulds, uld_id)); +} #endif /* Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/tom/t4_listen.c Sun Feb 8 09:28:55 2015 (r278374) @@ -523,7 +523,7 @@ t4_listen_start(struct toedev *tod, stru goto done; } - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM not initialized", __func__)); #endif Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Sun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/tom/t4_tom.c Sun Feb 8 09:28:55 2015 (r278374) @@ -746,7 +746,7 @@ update_clip(struct adapter *sc, void *ar if (begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4tomuc")) return; - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) update_clip_table(sc, sc->tom_softc); end_synchronized_op(sc, LOCK_HELD); @@ -1025,7 +1025,6 @@ t4_tom_activate(struct adapter *sc) TOEDEV(sc->port[i]->ifp) = &td->tod; sc->tom_softc = td; - sc->flags |= TOM_INIT_DONE; register_toedev(sc->tom_softc); done: @@ -1048,6 +1047,9 @@ t4_tom_deactivate(struct adapter *sc) if (sc->offload_map != 0) return (EBUSY); /* at least one port has IFCAP_TOE enabled */ + if (uld_active(sc, ULD_IWARP) || uld_active(sc, ULD_ISCSI)) + return (EBUSY); /* both iWARP and iSCSI rely on the TOE. */ + mtx_lock(&td->toep_list_lock); if (!TAILQ_EMPTY(&td->toep_list)) rc = EBUSY; @@ -1068,7 +1070,6 @@ t4_tom_deactivate(struct adapter *sc) unregister_toedev(sc->tom_softc); free_tom_data(sc, td); sc->tom_softc = NULL; - sc->flags &= ~TOM_INIT_DONE; } return (rc); @@ -1122,7 +1123,7 @@ tom_uninit(struct adapter *sc, void *arg return; /* Try to free resources (works only if no port has IFCAP_TOE) */ - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) t4_deactivate_uld(sc, ULD_TOM); end_synchronized_op(sc, 0); From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 10:58:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48E9CD2E; Sun, 8 Feb 2015 10:58:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34955AAD; Sun, 8 Feb 2015 10:58:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18AwQld096228; Sun, 8 Feb 2015 10:58:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18AwQnd096225; Sun, 8 Feb 2015 10:58:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502081058.t18AwQnd096225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 8 Feb 2015 10:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278378 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 10:58:27 -0000 Author: trasz Date: Sun Feb 8 10:58:25 2015 New Revision: 278378 URL: https://svnweb.freebsd.org/changeset/base/278378 Log: Make output of "iscsictl -v" and "ctladm islist -v" a little prettier by capitalizing "None". MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Sun Feb 8 10:17:20 2015 (r278377) +++ head/sys/dev/iscsi/icl.c Sun Feb 8 10:58:25 2015 (r278378) @@ -96,7 +96,7 @@ icl_find(const char *name) } TAILQ_FOREACH(im, &sc->sc_modules, im_next) { - if (strcmp(im->im_name, name) == 0) + if (strcasecmp(im->im_name, name) == 0) return (im); } Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sun Feb 8 10:17:20 2015 (r278377) +++ head/sys/dev/iscsi/icl_soft.c Sun Feb 8 10:58:25 2015 (r278378) @@ -1183,7 +1183,7 @@ icl_soft_new_conn(const char *name, stru #endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; ic->ic_name = name; - ic->ic_offload = "none"; + ic->ic_offload = "None"; return (ic); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 11:55:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAAB858A; Sun, 8 Feb 2015 11:55:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5D48F75; Sun, 8 Feb 2015 11:55:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18BtUDB023862; Sun, 8 Feb 2015 11:55:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18BtUKr023858; Sun, 8 Feb 2015 11:55:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201502081155.t18BtUKr023858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 8 Feb 2015 11:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278379 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 11:55:31 -0000 Author: dchagin Date: Sun Feb 8 11:55:29 2015 New Revision: 278379 URL: https://svnweb.freebsd.org/changeset/base/278379 Log: Add Neoway WM620 module ID. MFC after: 1 Week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Feb 8 10:58:25 2015 (r278378) +++ head/sys/dev/usb/serial/u3g.c Sun Feb 8 11:55:29 2015 (r278379) @@ -399,6 +399,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), U3G_DEV(QUALCOMM2, SIM5218, 0), + U3G_DEV(QUALCOMM2, WM620, 0), U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMM2, GOBI2000_QDL, 0), U3G_DEV(QUALCOMM2, GOBI2000, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Feb 8 10:58:25 2015 (r278378) +++ head/sys/dev/usb/usbdevs Sun Feb 8 11:55:29 2015 (r278379) @@ -3577,6 +3577,7 @@ product QUALCOMM2 CDMA_MSM 0x3196 CDMA T product QUALCOMM2 AC8700 0x6000 AC8700 product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem product QUALCOMM2 SIM5218 0x9000 SIM5218 +product QUALCOMM2 WM620 0x9002 Neoway WM620 product QUALCOMM2 GOBI2000_QDL 0x9204 Qualcomm Gobi 2000 QDL product QUALCOMM2 GOBI2000 0x9205 Qualcomm Gobi 2000 modem product QUALCOMM2 VT80N 0x6500 Venus VT80N From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 16:50:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F487DB5; Sun, 8 Feb 2015 16:50:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D49EDD90; Sun, 8 Feb 2015 16:50:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18Go1Li079149; Sun, 8 Feb 2015 16:50:01 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18Go1W8079148; Sun, 8 Feb 2015 16:50:01 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502081650.t18Go1W8079148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 8 Feb 2015 16:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278389 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 16:50:02 -0000 Author: nwhitehorn Date: Sun Feb 8 16:50:00 2015 New Revision: 278389 URL: https://svnweb.freebsd.org/changeset/base/278389 Log: Add some error checking on the supplied page size list. This makes sure that we (a) get the correct large page size to provide to pmap and (b) we can alert the user if running under incorrectly-configured PowerKVM on POWER7 and POWER8 systems. MFC after: 1 week Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- head/sys/powerpc/pseries/mmu_phyp.c Sun Feb 8 16:30:44 2015 (r278388) +++ head/sys/powerpc/pseries/mmu_phyp.c Sun Feb 8 16:50:00 2015 (r278389) @@ -102,6 +102,7 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t char buf[8]; uint32_t prop[2]; uint32_t nptlp, shift = 0, slb_encoding = 0; + uint32_t lp_size, lp_encoding; phandle_t dev, node, root; int idx, len, res; @@ -148,9 +149,9 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t * We have to use a variable length array on the stack * since we have very limited stack space. */ - cell_t arr[len/sizeof(cell_t)]; - res = OF_getprop(node, "ibm,segment-page-sizes", &arr, - sizeof(arr)); + pcell_t arr[len/sizeof(cell_t)]; + res = OF_getencprop(node, "ibm,segment-page-sizes", arr, + sizeof(arr)); len /= 4; idx = 0; while (len > 0) { @@ -160,18 +161,26 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t idx += 3; len -= 3; while (len > 0 && nptlp) { + lp_size = arr[idx]; + lp_encoding = arr[idx+1]; + if (slb_encoding == SLBV_L && lp_encoding == 0) + break; + idx += 2; len -= 2; nptlp--; } + if (nptlp && slb_encoding == SLBV_L && lp_encoding == 0) + break; } - /* For now we allow shift only to be <= 0x18. */ - if (shift >= 0x18) - shift = 0x18; + if (len == 0) + panic("Standard large pages (SLB[L] = 1, PTE[LP] = 0) " + "not supported by this system. Please enable huge " + "page backing if running under PowerKVM."); moea64_large_page_shift = shift; - moea64_large_page_size = 1ULL << shift; + moea64_large_page_size = 1ULL << lp_size; } moea64_mid_bootstrap(mmup, kernelstart, kernelend); From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 16:51:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55ACAF02; Sun, 8 Feb 2015 16:51:38 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 10373E2B; Sun, 8 Feb 2015 16:51:37 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 1B5134979; Sun, 8 Feb 2015 16:51:31 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id E8F4EC49A; Sun, 8 Feb 2015 17:51:30 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Subject: Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump References: <54D3CE82.2050204@FreeBSD.org> <54D3D703.7020405@FreeBSD.org> Date: Sun, 08 Feb 2015 17:51:30 +0100 In-Reply-To: <54D3D703.7020405@FreeBSD.org> (Bryan Drewery's message of "Thu, 05 Feb 2015 14:48:03 -0600") Message-ID: <86wq3sfist.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , Xin LI , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 16:51:38 -0000 Bryan Drewery writes: > The problem is that pf is implemented differently on FreeBSD and OpenBSD > for pid/uid tracking. The code would be overly complex to support both > and I gave up on that. Even getting it to work on FreeBSD required the > _KERNEL define hack for UID_MAX, which our pf uses to note 'no uid value'. First-class stupidity on POSIX's part which defines FOO_MAX for almost every single integer type but not for uid_t or gid_t. FreeBSD has them, but Linux doesn't, so I usually end up doing #ifndef UID_MAX #define UID_MAX ((uid_t)-1) #endif in cross-platform code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 19:15:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78400755; Sun, 8 Feb 2015 19:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63232DFF; Sun, 8 Feb 2015 19:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18JFGSP049963; Sun, 8 Feb 2015 19:15:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18JFECa049956; Sun, 8 Feb 2015 19:15:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502081915.t18JFECa049956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 8 Feb 2015 19:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278397 - in head/sys: cam/ctl dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 19:15:16 -0000 Author: trasz Date: Sun Feb 8 19:15:14 2015 New Revision: 278397 URL: https://svnweb.freebsd.org/changeset/base/278397 Log: Extend ICL to add receive offload methods. For software ICL backend they are no-ops. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/dev/iscsi/icl_conn_if.m head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/icl_wrappers.h head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi.h Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:15:14 2015 (r278397) @@ -164,6 +164,12 @@ static void cfiscsi_pdu_handle_task_requ static void cfiscsi_pdu_handle_data_out(struct icl_pdu *request); static void cfiscsi_pdu_handle_logout_request(struct icl_pdu *request); static void cfiscsi_session_terminate(struct cfiscsi_session *cs); +static struct cfiscsi_data_wait *cfiscsi_data_wait_new( + struct cfiscsi_session *cs, union ctl_io *io, + uint32_t initiator_task_tag, + uint32_t *target_transfer_tagp); +static void cfiscsi_data_wait_free(struct cfiscsi_session *cs, + struct cfiscsi_data_wait *cdw); static struct cfiscsi_target *cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name, uint16_t tag); static struct cfiscsi_target *cfiscsi_target_find_or_create( @@ -929,7 +935,7 @@ cfiscsi_pdu_handle_data_out(struct icl_p CFISCSI_SESSION_UNLOCK(cs); done = (io->scsiio.ext_data_filled != cdw->cdw_r2t_end || io->scsiio.ext_data_filled == io->scsiio.kern_data_len); - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); if (done) io->scsiio.be_move_done(io); else @@ -1067,6 +1073,45 @@ cfiscsi_callout(void *context) cfiscsi_pdu_queue(cp); } +static struct cfiscsi_data_wait * +cfiscsi_data_wait_new(struct cfiscsi_session *cs, union ctl_io *io, + uint32_t initiator_task_tag, uint32_t *target_transfer_tagp) +{ + struct cfiscsi_data_wait *cdw; + int error; + + cdw = uma_zalloc(cfiscsi_data_wait_zone, M_NOWAIT | M_ZERO); + if (cdw == NULL) { + CFISCSI_SESSION_WARN(cs, + "failed to allocate %zd bytes", sizeof(*cdw)); + return (NULL); + } + + error = icl_conn_transfer_setup(cs->cs_conn, io, target_transfer_tagp, + &cdw->cdw_icl_prv); + if (error != 0) { + CFISCSI_SESSION_WARN(cs, + "icl_conn_transfer_setup() failed with error %d", error); + uma_zfree(cfiscsi_data_wait_zone, cdw); + return (NULL); + } + + cdw->cdw_ctl_io = io; + cdw->cdw_target_transfer_tag = *target_transfer_tagp; + cdw->cdw_initiator_task_tag = initiator_task_tag; + + return (cdw); +} + +static void +cfiscsi_data_wait_free(struct cfiscsi_session *cs, + struct cfiscsi_data_wait *cdw) +{ + + icl_conn_transfer_done(cs->cs_conn, cdw->cdw_icl_prv); + uma_zfree(cfiscsi_data_wait_zone, cdw); +} + static void cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs) { @@ -1106,7 +1151,7 @@ cfiscsi_session_terminate_tasks(struct c */ cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); CFISCSI_SESSION_LOCK(cs); } CFISCSI_SESSION_UNLOCK(cs); @@ -2600,13 +2645,8 @@ cfiscsi_datamove_out(union ctl_io *io) target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); - -#if 0 - CFISCSI_SESSION_DEBUG(cs, "expecting Data-Out with initiator " - "task tag 0x%x, target transfer tag 0x%x", - bhssc->bhssc_initiator_task_tag, target_transfer_tag); -#endif - cdw = uma_zalloc(cfiscsi_data_wait_zone, M_NOWAIT | M_ZERO); + cdw = cfiscsi_data_wait_new(cs, io, bhssc->bhssc_initiator_task_tag, + &target_transfer_tag); if (cdw == NULL) { CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); @@ -2615,6 +2655,12 @@ cfiscsi_datamove_out(union ctl_io *io) cfiscsi_session_terminate(cs); return; } +#if 0 + CFISCSI_SESSION_DEBUG(cs, "expecting Data-Out with initiator " + "task tag 0x%x, target transfer tag 0x%x", + bhssc->bhssc_initiator_task_tag, target_transfer_tag); +#endif + cdw->cdw_ctl_io = io; cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; @@ -2651,7 +2697,7 @@ cfiscsi_datamove_out(union ctl_io *io) icl_pdu_data_segment_length(request)) { done = cfiscsi_handle_data_segment(request, cdw); if (done) { - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); io->scsiio.be_move_done(io); return; } @@ -2854,7 +2900,7 @@ cfiscsi_task_management_done(union ctl_i TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next); cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); } CFISCSI_SESSION_UNLOCK(cs); } Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.h Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/cam/ctl/ctl_frontend_iscsi.h Sun Feb 8 19:15:14 2015 (r278397) @@ -59,6 +59,7 @@ struct cfiscsi_data_wait { size_t cdw_sg_len; uint32_t cdw_r2t_end; uint32_t cdw_datasn; + void *cdw_icl_prv; }; #define CFISCSI_SESSION_STATE_INVALID 0 Modified: head/sys/dev/iscsi/icl_conn_if.m ============================================================================== --- head/sys/dev/iscsi/icl_conn_if.m Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/dev/iscsi/icl_conn_if.m Sun Feb 8 19:15:14 2015 (r278397) @@ -85,3 +85,27 @@ METHOD void close { METHOD bool connected { struct icl_conn *_ic; }; + +METHOD int task_setup { + struct icl_conn *_ic; + struct ccb_scsiio *_csio; + uint32_t *_task_tag; + void **_prvp; +}; + +METHOD void task_done { + struct icl_conn *_ic; + void *_prv; +}; + +METHOD int transfer_setup { + struct icl_conn *_ic; + union ctl_io *_io; + uint32_t *_transfer_tag; + void **_prvp; +}; + +METHOD void transfer_done { + struct icl_conn *_ic; + void *_prv; +}; Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/dev/iscsi/icl_soft.c Sun Feb 8 19:15:14 2015 (r278397) @@ -98,6 +98,10 @@ static icl_conn_handoff_t icl_soft_conn_ static icl_conn_free_t icl_soft_conn_free; static icl_conn_close_t icl_soft_conn_close; static icl_conn_connected_t icl_soft_conn_connected; +static icl_conn_task_setup_t icl_soft_conn_task_setup; +static icl_conn_task_done_t icl_soft_conn_task_done; +static icl_conn_transfer_setup_t icl_soft_conn_transfer_setup; +static icl_conn_transfer_done_t icl_soft_conn_transfer_done; static kobj_method_t icl_soft_methods[] = { KOBJMETHOD(icl_conn_new_pdu, icl_soft_conn_new_pdu), @@ -111,6 +115,10 @@ static kobj_method_t icl_soft_methods[] KOBJMETHOD(icl_conn_free, icl_soft_conn_free), KOBJMETHOD(icl_conn_close, icl_soft_conn_close), KOBJMETHOD(icl_conn_connected, icl_soft_conn_connected), + KOBJMETHOD(icl_conn_task_setup, icl_soft_conn_task_setup), + KOBJMETHOD(icl_conn_task_done, icl_soft_conn_task_done), + KOBJMETHOD(icl_conn_transfer_setup, icl_soft_conn_transfer_setup), + KOBJMETHOD(icl_conn_transfer_done, icl_soft_conn_transfer_done), { 0, 0 } }; @@ -1435,6 +1443,32 @@ icl_soft_conn_connected(struct icl_conn return (true); } +int +icl_soft_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, + uint32_t *task_tagp, void **prvp) +{ + + return (0); +} + +void +icl_soft_conn_task_done(struct icl_conn *ic, void *prv) +{ +} + +int +icl_soft_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, + uint32_t *transfer_tag, void **prvp) +{ + + return (0); +} + +void +icl_soft_conn_transfer_done(struct icl_conn *ic, void *prv) +{ +} + static int icl_soft_limits(size_t *limitp) { Modified: head/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- head/sys/dev/iscsi/icl_wrappers.h Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/dev/iscsi/icl_wrappers.h Sun Feb 8 19:15:14 2015 (r278397) @@ -112,4 +112,34 @@ icl_conn_connected(struct icl_conn *ic) return (ICL_CONN_CONNECTED(ic)); } +static inline int +icl_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, + uint32_t *task_tagp, void **prvp) +{ + + return (ICL_CONN_TASK_SETUP(ic, csio, task_tagp, prvp)); +} + +static inline void +icl_conn_task_done(struct icl_conn *ic, void *prv) +{ + + ICL_CONN_TASK_DONE(ic, prv); +} + +static inline int +icl_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, + uint32_t *transfer_tagp, void **prvp) +{ + + return (ICL_CONN_TRANSFER_SETUP(ic, io, transfer_tagp, prvp)); +} + +static inline void +icl_conn_transfer_done(struct icl_conn *ic, void *prv) +{ + + ICL_CONN_TRANSFER_DONE(ic, prv); +} + #endif /* !ICL_WRAPPERS_H */ Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/dev/iscsi/iscsi.c Sun Feb 8 19:15:14 2015 (r278397) @@ -169,7 +169,7 @@ static void iscsi_poll(struct cam_sim *s static struct iscsi_outstanding *iscsi_outstanding_find(struct iscsi_session *is, uint32_t initiator_task_tag); static struct iscsi_outstanding *iscsi_outstanding_add(struct iscsi_session *is, - uint32_t initiator_task_tag, union ccb *ccb); + union ccb *ccb, uint32_t *initiator_task_tagp); static void iscsi_outstanding_remove(struct iscsi_session *is, struct iscsi_outstanding *io); @@ -1993,21 +1993,33 @@ iscsi_outstanding_find_ccb(struct iscsi_ static struct iscsi_outstanding * iscsi_outstanding_add(struct iscsi_session *is, - uint32_t initiator_task_tag, union ccb *ccb) + union ccb *ccb, uint32_t *initiator_task_tagp) { struct iscsi_outstanding *io; + int error; ISCSI_SESSION_LOCK_ASSERT(is); - KASSERT(iscsi_outstanding_find(is, initiator_task_tag) == NULL, - ("initiator_task_tag 0x%x already added", initiator_task_tag)); - io = uma_zalloc(iscsi_outstanding_zone, M_NOWAIT | M_ZERO); if (io == NULL) { - ISCSI_SESSION_WARN(is, "failed to allocate %zd bytes", sizeof(*io)); + ISCSI_SESSION_WARN(is, "failed to allocate %zd bytes", + sizeof(*io)); + return (NULL); + } + + error = icl_conn_task_setup(is->is_conn, &ccb->csio, + initiator_task_tagp, &io->io_icl_prv); + if (error != 0) { + ISCSI_SESSION_WARN(is, + "icl_conn_task_setup() failed with error %d", error); + uma_zfree(iscsi_outstanding_zone, io); return (NULL); } - io->io_initiator_task_tag = initiator_task_tag; + + KASSERT(iscsi_outstanding_find(is, *initiator_task_tagp) == NULL, + ("initiator_task_tag 0x%x already added", *initiator_task_tagp)); + + io->io_initiator_task_tag = *initiator_task_tagp; io->io_ccb = ccb; TAILQ_INSERT_TAIL(&is->is_outstanding, io, io_next); return (io); @@ -2019,6 +2031,7 @@ iscsi_outstanding_remove(struct iscsi_se ISCSI_SESSION_LOCK_ASSERT(is); + icl_conn_task_done(is->is_conn, io->io_icl_prv); TAILQ_REMOVE(&is->is_outstanding, io, io_next); uma_zfree(iscsi_outstanding_zone, io); } @@ -2030,6 +2043,7 @@ iscsi_action_abort(struct iscsi_session struct iscsi_bhs_task_management_request *bhstmr; struct ccb_abort *cab = &ccb->cab; struct iscsi_outstanding *io, *aio; + uint32_t initiator_task_tag; ISCSI_SESSION_LOCK_ASSERT(is); @@ -2057,16 +2071,9 @@ iscsi_action_abort(struct iscsi_session return; } - bhstmr = (struct iscsi_bhs_task_management_request *)request->ip_bhs; - bhstmr->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_REQUEST; - bhstmr->bhstmr_function = 0x80 | BHSTMR_FUNCTION_ABORT_TASK; - - bhstmr->bhstmr_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); - bhstmr->bhstmr_initiator_task_tag = is->is_initiator_task_tag; - is->is_initiator_task_tag++; - bhstmr->bhstmr_referenced_task_tag = aio->io_initiator_task_tag; + initiator_task_tag = is->is_initiator_task_tag++; - io = iscsi_outstanding_add(is, bhstmr->bhstmr_initiator_task_tag, NULL); + io = iscsi_outstanding_add(is, NULL, &initiator_task_tag); if (io == NULL) { icl_pdu_free(request); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; @@ -2074,6 +2081,14 @@ iscsi_action_abort(struct iscsi_session return; } io->io_datasn = aio->io_initiator_task_tag; + + bhstmr = (struct iscsi_bhs_task_management_request *)request->ip_bhs; + bhstmr->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_REQUEST; + bhstmr->bhstmr_function = 0x80 | BHSTMR_FUNCTION_ABORT_TASK; + bhstmr->bhstmr_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); + bhstmr->bhstmr_initiator_task_tag = initiator_task_tag; + bhstmr->bhstmr_referenced_task_tag = aio->io_initiator_task_tag; + iscsi_pdu_queue_locked(request); } @@ -2085,6 +2100,7 @@ iscsi_action_scsiio(struct iscsi_session struct ccb_scsiio *csio; struct iscsi_outstanding *io; size_t len; + uint32_t initiator_task_tag; int error; ISCSI_SESSION_LOCK_ASSERT(is); @@ -2115,6 +2131,19 @@ iscsi_action_scsiio(struct iscsi_session return; } + initiator_task_tag = is->is_initiator_task_tag++; + io = iscsi_outstanding_add(is, ccb, &initiator_task_tag); + if (io == NULL) { + icl_pdu_free(request); + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + xpt_freeze_devq(ccb->ccb_h.path, 1); + ISCSI_SESSION_DEBUG(is, "freezing devq"); + } + ccb->ccb_h.status = CAM_RESRC_UNAVAIL | CAM_DEV_QFRZN; + xpt_done(ccb); + return; + } + csio = &ccb->csio; bhssc = (struct iscsi_bhs_scsi_command *)request->ip_bhs; bhssc->bhssc_opcode = ISCSI_BHS_OPCODE_SCSI_COMMAND; @@ -2148,8 +2177,7 @@ iscsi_action_scsiio(struct iscsi_session bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_UNTAGGED; bhssc->bhssc_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); - bhssc->bhssc_initiator_task_tag = is->is_initiator_task_tag; - is->is_initiator_task_tag++; + bhssc->bhssc_initiator_task_tag = initiator_task_tag; bhssc->bhssc_expected_data_transfer_length = htonl(csio->dxfer_len); KASSERT(csio->cdb_len <= sizeof(bhssc->bhssc_cdb), ("unsupported CDB size %zd", (size_t)csio->cdb_len)); @@ -2159,18 +2187,6 @@ iscsi_action_scsiio(struct iscsi_session else memcpy(&bhssc->bhssc_cdb, csio->cdb_io.cdb_bytes, csio->cdb_len); - io = iscsi_outstanding_add(is, bhssc->bhssc_initiator_task_tag, ccb); - if (io == NULL) { - icl_pdu_free(request); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { - xpt_freeze_devq(ccb->ccb_h.path, 1); - ISCSI_SESSION_DEBUG(is, "freezing devq"); - } - ccb->ccb_h.status = CAM_RESRC_UNAVAIL | CAM_DEV_QFRZN; - xpt_done(ccb); - return; - } - if (is->is_immediate_data && (csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) { len = csio->dxfer_len; Modified: head/sys/dev/iscsi/iscsi.h ============================================================================== --- head/sys/dev/iscsi/iscsi.h Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/dev/iscsi/iscsi.h Sun Feb 8 19:15:14 2015 (r278397) @@ -45,6 +45,7 @@ struct iscsi_outstanding { size_t io_received; uint32_t io_initiator_task_tag; uint32_t io_datasn; + void *io_icl_prv; }; struct iscsi_session { From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 19:18:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FE5AA3B; Sun, 8 Feb 2015 19:18:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 806A7E2A; Sun, 8 Feb 2015 19:18:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18JIOIq050579; Sun, 8 Feb 2015 19:18:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18JIODf050578; Sun, 8 Feb 2015 19:18:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502081918.t18JIODf050578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 8 Feb 2015 19:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278398 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 19:18:24 -0000 Author: trasz Date: Sun Feb 8 19:18:23 2015 New Revision: 278398 URL: https://svnweb.freebsd.org/changeset/base/278398 Log: Fix ordering of "*logout" and "*terminate"; no functional changes. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:15:14 2015 (r278397) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:18:23 2015 (r278398) @@ -1702,41 +1702,40 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) } static void -cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) +cfiscsi_ioctl_logout(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_terminate_params *citp; + struct ctl_iscsi_logout_params *cilp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - citp = (struct ctl_iscsi_terminate_params *)&(ci->data); + cilp = (struct ctl_iscsi_logout_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (citp->all == 0 && cs->cs_id != citp->connection_id && - strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) + if (cilp->all == 0 && cs->cs_id != cilp->connection_id && + strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - /* - * Oh well. Just terminate the connection. - */ - } else { - bhsam = (struct iscsi_bhs_asynchronous_message *) - response->ip_bhs; - bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; - bhsam->bhsam_flags = 0x80; - bhsam->bhsam_0xffffffff = 0xffffffff; - bhsam->bhsam_async_event = - BHSAM_EVENT_TARGET_TERMINATES_SESSION; - cfiscsi_pdu_queue(response); + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "Unable to allocate memory"); + mtx_unlock(&softc->lock); + return; } - cfiscsi_session_terminate(cs); + bhsam = + (struct iscsi_bhs_asynchronous_message *)response->ip_bhs; + bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; + bhsam->bhsam_flags = 0x80; + bhsam->bhsam_async_event = BHSAM_EVENT_TARGET_REQUESTS_LOGOUT; + bhsam->bhsam_parameter3 = htons(10); + cfiscsi_pdu_queue(response); found++; } mtx_unlock(&softc->lock); @@ -1752,40 +1751,41 @@ cfiscsi_ioctl_terminate(struct ctl_iscsi } static void -cfiscsi_ioctl_logout(struct ctl_iscsi *ci) +cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_logout_params *cilp; + struct ctl_iscsi_terminate_params *citp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - cilp = (struct ctl_iscsi_logout_params *)&(ci->data); + citp = (struct ctl_iscsi_terminate_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (cilp->all == 0 && cs->cs_id != cilp->connection_id && - strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) + if (citp->all == 0 && cs->cs_id != citp->connection_id && + strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), - "Unable to allocate memory"); - mtx_unlock(&softc->lock); - return; + /* + * Oh well. Just terminate the connection. + */ + } else { + bhsam = (struct iscsi_bhs_asynchronous_message *) + response->ip_bhs; + bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; + bhsam->bhsam_flags = 0x80; + bhsam->bhsam_0xffffffff = 0xffffffff; + bhsam->bhsam_async_event = + BHSAM_EVENT_TARGET_TERMINATES_SESSION; + cfiscsi_pdu_queue(response); } - bhsam = - (struct iscsi_bhs_asynchronous_message *)response->ip_bhs; - bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; - bhsam->bhsam_flags = 0x80; - bhsam->bhsam_async_event = BHSAM_EVENT_TARGET_REQUESTS_LOGOUT; - bhsam->bhsam_parameter3 = htons(10); - cfiscsi_pdu_queue(response); + cfiscsi_session_terminate(cs); found++; } mtx_unlock(&softc->lock); @@ -2241,12 +2241,12 @@ cfiscsi_ioctl(struct cdev *dev, case CTL_ISCSI_LIST: cfiscsi_ioctl_list(ci); break; - case CTL_ISCSI_TERMINATE: - cfiscsi_ioctl_terminate(ci); - break; case CTL_ISCSI_LOGOUT: cfiscsi_ioctl_logout(ci); break; + case CTL_ISCSI_TERMINATE: + cfiscsi_ioctl_terminate(ci); + break; case CTL_ISCSI_LIMITS: cfiscsi_ioctl_limits(ci); break; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 20:44:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AC64EAF; Sun, 8 Feb 2015 20:44:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0547E8C9; Sun, 8 Feb 2015 20:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18KijZQ092310; Sun, 8 Feb 2015 20:44:45 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18KijDo092308; Sun, 8 Feb 2015 20:44:45 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082044.t18KijDo092308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278399 - in stable/10/sys/dev: bge pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 20:44:46 -0000 Author: marius Date: Sun Feb 8 20:44:44 2015 New Revision: 278399 URL: https://svnweb.freebsd.org/changeset/base/278399 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/10/sys/dev/bge/if_bge.c stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c ============================================================================== --- stable/10/sys/dev/bge/if_bge.c Sun Feb 8 19:18:23 2015 (r278398) +++ stable/10/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported - * properly by these devices. Also ensure that INTx isn't disabled, - * as these chips need it even when using MSI. + * properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Sun Feb 8 19:18:23 2015 (r278398) +++ stable/10/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015 (r278399) @@ -257,7 +257,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that + * Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -265,6 +265,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* + * Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't + * issue MSI interrupts with PCIM_CMD_INTxDIS set either. + */ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3634,14 +3645,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* - * Make sure that INTx is disabled if we are - * using MSI/MSIX - */ + /* + * Make sure that INTx is disabled if we are using MSI/MSI-X, + * unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, + * in which case we "enable" INTx so MSI/MSI-X actually works. + */ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 20:44:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A8C8FD6; Sun, 8 Feb 2015 20:44:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 259278CC; Sun, 8 Feb 2015 20:44:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18Kiqpj092374; Sun, 8 Feb 2015 20:44:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18KipmR092371; Sun, 8 Feb 2015 20:44:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082044.t18KipmR092371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 20:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278400 - in stable/9/sys/dev: bge pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 20:44:52 -0000 Author: marius Date: Sun Feb 8 20:44:50 2015 New Revision: 278400 URL: https://svnweb.freebsd.org/changeset/base/278400 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) +++ stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:50 2015 (r278400) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported - * properly by these devices. Also ensure that INTx isn't disabled, - * as these chips need it even when using MSI. + * properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015 (r278399) +++ stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:50 2015 (r278400) @@ -270,7 +270,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that + * Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -278,6 +278,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* + * Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't + * issue MSI interrupts with PCIM_CMD_INTxDIS set either. + */ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3567,14 +3578,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* - * Make sure that INTx is disabled if we are - * using MSI/MSIX - */ + /* + * Make sure that INTx is disabled if we are using MSI/MSI-X, + * unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, + * in which case we "enable" INTx so MSI/MSI-X actually works. + */ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:00:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ECA3AC3; Sun, 8 Feb 2015 21:00:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF111AFF; Sun, 8 Feb 2015 21:00:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18L0qU7001959; Sun, 8 Feb 2015 21:00:52 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18L0qSP001958; Sun, 8 Feb 2015 21:00:52 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201502082100.t18L0qSP001958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 8 Feb 2015 21:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278402 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:00:53 -0000 Author: alc Date: Sun Feb 8 21:00:51 2015 New Revision: 278402 URL: https://svnweb.freebsd.org/changeset/base/278402 Log: Preset the object's color, or alignment, to maximize superpage usage. MFC after: 5 days Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Feb 8 20:48:17 2015 (r278401) +++ head/sys/kern/uipc_shm.c Sun Feb 8 21:00:51 2015 (r278402) @@ -531,9 +531,10 @@ shm_alloc(struct ucred *ucred, mode_t mo shmfd->shm_object = vm_pager_allocate(OBJT_DEFAULT, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); KASSERT(shmfd->shm_object != NULL, ("shm_create: vm_pager_allocate")); + shmfd->shm_object->pg_color = 0; VM_OBJECT_WLOCK(shmfd->shm_object); vm_object_clear_flag(shmfd->shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shmfd->shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shmfd->shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shmfd->shm_object); vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:12:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E476198; Sun, 8 Feb 2015 21:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39498C5C; Sun, 8 Feb 2015 21:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LCnqc007531; Sun, 8 Feb 2015 21:12:49 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LCmlF007530; Sun, 8 Feb 2015 21:12:48 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082112.t18LCmlF007530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278403 - stable/10/sys/dev/bce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:12:49 -0000 Author: marius Date: Sun Feb 8 21:12:48 2015 New Revision: 278403 URL: https://svnweb.freebsd.org/changeset/base/278403 Log: MFC: r276313 Const'ify a firmware image missed in r251142. Modified: stable/10/sys/dev/bce/if_bcefw.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/10/sys/dev/bce/if_bcefw.h Sun Feb 8 21:00:51 2015 (r278402) +++ stable/10/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:48 2015 (r278403) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + int bce_COM_b09FwReleaseMajor = 0x6; int bce_COM_b09FwReleaseMinor = 0x0; int bce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:12:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCCC2C5; Sun, 8 Feb 2015 21:12:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47E3DC5F; Sun, 8 Feb 2015 21:12:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LCtxf007595; Sun, 8 Feb 2015 21:12:55 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LCtHw007594; Sun, 8 Feb 2015 21:12:55 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082112.t18LCtHw007594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278404 - stable/9/sys/dev/bce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:12:55 -0000 Author: marius Date: Sun Feb 8 21:12:54 2015 New Revision: 278404 URL: https://svnweb.freebsd.org/changeset/base/278404 Log: MFC: r276313 Const'ify a firmware image missed in r251142 (MFCed to stable/9 in r225736). Modified: stable/9/sys/dev/bce/if_bcefw.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:48 2015 (r278403) +++ stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:54 2015 (r278404) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + int bce_COM_b09FwReleaseMajor = 0x6; int bce_COM_b09FwReleaseMinor = 0x0; int bce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:31:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA91944; Sun, 8 Feb 2015 21:31:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D97C4E23; Sun, 8 Feb 2015 21:31:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LVfZK016775; Sun, 8 Feb 2015 21:31:41 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LVf5l016772; Sun, 8 Feb 2015 21:31:41 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082131.t18LVf5l016772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278405 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:31:42 -0000 Author: marius Date: Sun Feb 8 21:31:40 2015 New Revision: 278405 URL: https://svnweb.freebsd.org/changeset/base/278405 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahciem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:31:40 2015 (r278405) @@ -99,7 +99,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_t id; uint8_t rev; const char *name; @@ -1024,14 +1024,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_attach), @@ -1044,14 +1044,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1317,14 +1317,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach, ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume, ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); struct ahci_dc_cb_args { bus_addr_t maddr; Modified: stable/10/sys/dev/ahci/ahciem.c ============================================================================== --- stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:31:40 2015 (r278405) @@ -273,14 +273,14 @@ static device_method_t ahciem_methods[] DEVMETHOD(device_detach, ahci_em_detach), DEVMETHOD(device_suspend, ahci_em_suspend), DEVMETHOD(device_resume, ahci_em_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahciem_driver = { "ahciem", ahciem_methods, sizeof(struct ahci_enclosure) }; -DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, 0, 0); +DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, NULL, NULL); static void ahci_em_setleds(device_t dev, int c) From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:31:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6A5A6B; Sun, 8 Feb 2015 21:31:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF644E26; Sun, 8 Feb 2015 21:31:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LVoIL016842; Sun, 8 Feb 2015 21:31:50 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LVosT016841; Sun, 8 Feb 2015 21:31:50 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082131.t18LVosT016841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278406 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:31:51 -0000 Author: marius Date: Sun Feb 8 21:31:49 2015 New Revision: 278406 URL: https://svnweb.freebsd.org/changeset/base/278406 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sun Feb 8 21:31:40 2015 (r278405) +++ stable/9/sys/dev/ahci/ahci.c Sun Feb 8 21:31:49 2015 (r278406) @@ -103,7 +103,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_t id; uint8_t rev; const char *name; @@ -977,14 +977,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_attach), @@ -997,14 +997,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1290,14 +1290,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach, ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume, ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); static void ahci_ch_setleds(device_t dev) From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:41:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305A6D81; Sun, 8 Feb 2015 21:41:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01DFAF04; Sun, 8 Feb 2015 21:41:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LfJ6H021245; Sun, 8 Feb 2015 21:41:19 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LfJMA021244; Sun, 8 Feb 2015 21:41:19 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082141.t18LfJMA021244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278407 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:41:20 -0000 Author: marius Date: Sun Feb 8 21:41:18 2015 New Revision: 278407 URL: https://svnweb.freebsd.org/changeset/base/278407 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:31:49 2015 (r278406) +++ stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:18 2015 (r278407) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0xffff, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:41:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9998EB1; Sun, 8 Feb 2015 21:41:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AE50F09; Sun, 8 Feb 2015 21:41:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LfRxo021969; Sun, 8 Feb 2015 21:41:27 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LfRu5021968; Sun, 8 Feb 2015 21:41:27 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082141.t18LfRu5021968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278408 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:41:27 -0000 Author: marius Date: Sun Feb 8 21:41:26 2015 New Revision: 278408 URL: https://svnweb.freebsd.org/changeset/base/278408 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:18 2015 (r278407) +++ stable/9/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:26 2015 (r278408) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0xffff, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:49:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86584255; Sun, 8 Feb 2015 21:49:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 571B0F53; Sun, 8 Feb 2015 21:49:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LnU4Y023369; Sun, 8 Feb 2015 21:49:30 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LnUqR023368; Sun, 8 Feb 2015 21:49:30 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082149.t18LnUqR023368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278409 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:49:30 -0000 Author: marius Date: Sun Feb 8 21:49:29 2015 New Revision: 278409 URL: https://svnweb.freebsd.org/changeset/base/278409 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:26 2015 (r278408) +++ stable/8/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:49:29 2015 (r278409) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0xffff, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -135,6 +138,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:58:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21427641; Sun, 8 Feb 2015 21:58:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2DAD5; Sun, 8 Feb 2015 21:58:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LwQfp028199; Sun, 8 Feb 2015 21:58:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LwQb3028196; Sun, 8 Feb 2015 21:58:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082158.t18LwQb3028196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 21:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278410 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:58:27 -0000 Author: jilles Date: Sun Feb 8 21:58:25 2015 New Revision: 278410 URL: https://svnweb.freebsd.org/changeset/base/278410 Log: MFC r277862: sem_post(): Fix and document semaphore value overflow error. The error code is per Austin Group issue #315. I provided different wording for the manual page change. Submitted by: pluknet Modified: stable/10/lib/libc/gen/sem_new.c stable/10/lib/libc/gen/sem_post.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_new.c Sun Feb 8 21:58:25 2015 (r278410) @@ -439,8 +439,10 @@ _sem_post(sem_t *sem) do { count = sem->_kern._count; - if (count + 1 > SEM_VALUE_MAX) - return (EOVERFLOW); + if (count + 1 > SEM_VALUE_MAX) { + errno = EOVERFLOW; + return (-1); + } } while(!atomic_cmpset_rel_int(&sem->_kern._count, count, count+1)); (void)usem_wake(&sem->_kern); return (0); Modified: stable/10/lib/libc/gen/sem_post.3 ============================================================================== --- stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:58:25 2015 (r278410) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2000 +.Dd January 28, 2015 .Dt SEM_POST 3 .Os .Sh NAME @@ -65,6 +65,9 @@ The .Fa sem argument points to an invalid semaphore. +.It Bq Er EOVERFLOW +The semaphore value would exceed +.Dv SEM_VALUE_MAX . .El .Sh SEE ALSO .Xr sem_getvalue 3 , From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:11:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81710944; Sun, 8 Feb 2015 22:11:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C812256; Sun, 8 Feb 2015 22:11:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MBQlR036449; Sun, 8 Feb 2015 22:11:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MBPbC036444; Sun, 8 Feb 2015 22:11:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502082211.t18MBPbC036444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 8 Feb 2015 22:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278411 - stable/10/lib/libedit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:11:26 -0000 Author: bapt Date: Sun Feb 8 22:11:24 2015 New Revision: 278411 URL: https://svnweb.freebsd.org/changeset/base/278411 Log: MFC: r265863 libedit: add H_SAVE_FP which saves history to a file pointer. H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename. This is useful when operating in capability mode. Reviewed by: christos@NetBSD.org, pfg Modified: stable/10/lib/libedit/editline.3 stable/10/lib/libedit/hist.h stable/10/lib/libedit/histedit.h stable/10/lib/libedit/history.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libedit/editline.3 ============================================================================== --- stable/10/lib/libedit/editline.3 Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/editline.3 Sun Feb 8 22:11:24 2015 (r278411) @@ -682,6 +682,9 @@ Load the history list stored in .It Dv H_SAVE , Fa "const char *file" Save the history list to .Fa file . +.It Dv H_SAVE_FP , Fa "FILE*" +Save the history list to the opened +.Fa FILE* . .It Dv H_SETUNIQUE , Fa "int unique" Set flag that adjacent identical event strings should not be entered into the history. Modified: stable/10/lib/libedit/hist.h ============================================================================== --- stable/10/lib/libedit/hist.h Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/hist.h Sun Feb 8 22:11:24 2015 (r278411) @@ -65,6 +65,7 @@ typedef struct el_history_t { #define HIST_SET(el, num) HIST_FUN(el, H_SET, num) #define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname) #define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname) +#define HIST_SAVE_FP(el, fp) HIST_FUN(el, H_SAVE_FP fp) protected int hist_init(EditLine *); protected void hist_end(EditLine *); Modified: stable/10/lib/libedit/histedit.h ============================================================================== --- stable/10/lib/libedit/histedit.h Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/histedit.h Sun Feb 8 22:11:24 2015 (r278411) @@ -208,6 +208,7 @@ int history(History *, HistEvent *, int #define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ #define H_DELDATA 24 /* , int, histdata_t *);*/ #define H_REPLACE 25 /* , const char *, histdata_t); */ +#define H_SAVE_FP 26 /* , FILE*); */ /* Modified: stable/10/lib/libedit/history.c ============================================================================== --- stable/10/lib/libedit/history.c Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/history.c Sun Feb 8 22:11:24 2015 (r278411) @@ -103,6 +103,7 @@ private int history_getunique(History *, private int history_set_fun(History *, History *); private int history_load(History *, const char *); private int history_save(History *, const char *); +private int history_save_fp(History *, FILE*); private int history_prev_event(History *, HistEvent *, int); private int history_next_event(History *, HistEvent *, int); private int history_next_string(History *, HistEvent *, const char *); @@ -773,22 +774,16 @@ done: return (i); } - -/* history_save(): - * History save function +/* history_save_fp(): + * History save with open FILE* */ -private int -history_save(History *h, const char *fname) +private int history_save_fp(History *h, FILE* fp) { - FILE *fp; HistEvent ev; int i = -1, retval; size_t len, max_size; char *ptr; - if ((fp = fopen(fname, "w")) == NULL) - return (-1); - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) goto done; if (fputs(hist_cookie, fp) == EOF) @@ -816,6 +811,26 @@ history_save(History *h, const char *fna oomem: h_free((ptr_t)ptr); done: + return (i); + +} + + +/* history_save(): + * History save function + */ +private int +history_save(History *h, const char *fname) +{ + FILE *fp; + int i; + + if ((fp = fopen(fname, "w")) == NULL) + return (-1); + + i = history_save_fp(h, fp); + +done: (void) fclose(fp); return (i); } @@ -1001,6 +1016,12 @@ history(History *h, HistEvent *ev, int f he_seterrev(ev, _HE_HIST_WRITE); break; + case H_SAVE_FP: + retval = history_save_fp(h, va_arg(va, FILE*)); + if (retval == -1) + he_seterrev(ev, _HE_HIST_WRITE); + break; + case H_PREV_EVENT: retval = history_prev_event(h, ev, va_arg(va, int)); break; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:17:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 683C9AD5; Sun, 8 Feb 2015 22:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53937287; Sun, 8 Feb 2015 22:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MHLXa037704; Sun, 8 Feb 2015 22:17:21 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MHLbh037703; Sun, 8 Feb 2015 22:17:21 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201502082217.t18MHLbh037703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 8 Feb 2015 22:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278412 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:17:21 -0000 Author: peter Date: Sun Feb 8 22:17:20 2015 New Revision: 278412 URL: https://svnweb.freebsd.org/changeset/base/278412 Log: Repair ia64 build after r278347 - remove const from set_mcontext Modified: stable/10/sys/ia64/ia64/machdep.c Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:11:24 2015 (r278411) +++ stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:17:20 2015 (r278412) @@ -1262,7 +1262,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mc) +set_mcontext(struct thread *td, mcontext_t *mc) { struct _special s; struct trapframe *tf; From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:24:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8AADF1; Sun, 8 Feb 2015 22:24:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6941436C; Sun, 8 Feb 2015 22:24:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MO4VH042151; Sun, 8 Feb 2015 22:24:04 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MO4lF042148; Sun, 8 Feb 2015 22:24:04 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082224.t18MO4lF042148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278413 - in stable/10: contrib/netbsd-tests/lib/libc/gen lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:24:04 -0000 Author: jilles Date: Sun Feb 8 22:24:03 2015 New Revision: 278413 URL: https://svnweb.freebsd.org/changeset/base/278413 Log: MFC r278038: ttyname_r(): Return actual error, not always [ENOTTY]. Adjust the test that used to fail because of this bug. PR: 191936 Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/10/lib/libc/gen/ttyname.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:17:20 2015 (r278412) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:24:03 2015 (r278413) @@ -107,9 +107,6 @@ ATF_TC_BODY(ttyname_r_err, tc) ATF_REQUIRE(rv == ERANGE); } -#ifdef __FreeBSD__ - atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see bin/191936"); -#endif rv = ttyname_r(-1, buf, ttymax); ATF_REQUIRE(rv == EBADF); Modified: stable/10/lib/libc/gen/ttyname.c ============================================================================== --- stable/10/lib/libc/gen/ttyname.c Sun Feb 8 22:17:20 2015 (r278412) +++ stable/10/lib/libc/gen/ttyname.c Sun Feb 8 22:24:03 2015 (r278413) @@ -65,7 +65,7 @@ ttyname_r(int fd, char *buf, size_t len) /* Must be a terminal. */ if (!isatty(fd)) - return (ENOTTY); + return (errno); /* Must have enough room */ if (len <= sizeof(_PATH_DEV)) return (ERANGE); @@ -73,7 +73,7 @@ ttyname_r(int fd, char *buf, size_t len) strcpy(buf, _PATH_DEV); used = strlen(buf); if (fdevname_r(fd, buf + used, len - used) == NULL) - return (ENOTTY); + return (errno == EINVAL ? ERANGE : errno); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:24:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D3FF21; Sun, 8 Feb 2015 22:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DD49373; Sun, 8 Feb 2015 22:24:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MOIkR042245; Sun, 8 Feb 2015 22:24:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MOICZ042244; Sun, 8 Feb 2015 22:24:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502082224.t18MOICZ042244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 8 Feb 2015 22:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278414 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:24:19 -0000 Author: bapt Date: Sun Feb 8 22:24:18 2015 New Revision: 278414 URL: https://svnweb.freebsd.org/changeset/base/278414 Log: Reapply r255891 Modified: head/lib/libedit/readline.c Modified: head/lib/libedit/readline.c ============================================================================== --- head/lib/libedit/readline.c Sun Feb 8 22:24:03 2015 (r278413) +++ head/lib/libedit/readline.c Sun Feb 8 22:24:18 2015 (r278414) @@ -395,6 +395,9 @@ readline(const char *p) char *buf; static int used_event_hook; + if (line == NULL) + return 0; + if (e == NULL || h == NULL) rl_initialize(); From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:27:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4981741F; Sun, 8 Feb 2015 22:27:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 348133D8; Sun, 8 Feb 2015 22:27:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MRIXU042942; Sun, 8 Feb 2015 22:27:18 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MRItU042941; Sun, 8 Feb 2015 22:27:18 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082227.t18MRItU042941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278415 - stable/10/sys/dev/mwl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:27:18 -0000 Author: marius Date: Sun Feb 8 22:27:17 2015 New Revision: 278415 URL: https://svnweb.freebsd.org/changeset/base/278415 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/10/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:24:18 2015 (r278414) +++ stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:27:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519D0546; Sun, 8 Feb 2015 22:27:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E29043DA; Sun, 8 Feb 2015 22:27:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MROTE042998; Sun, 8 Feb 2015 22:27:24 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MROMP042997; Sun, 8 Feb 2015 22:27:24 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082227.t18MROMP042997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278416 - stable/9/sys/dev/mwl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:27:25 -0000 Author: marius Date: Sun Feb 8 22:27:23 2015 New Revision: 278416 URL: https://svnweb.freebsd.org/changeset/base/278416 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/9/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) +++ stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:23 2015 (r278416) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:29:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1CF687; Sun, 8 Feb 2015 22:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68FBE3E8; Sun, 8 Feb 2015 22:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MT7GT043329; Sun, 8 Feb 2015 22:29:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MT7rm043328; Sun, 8 Feb 2015 22:29:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082229.t18MT7rm043328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278417 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:29:07 -0000 Author: jilles Date: Sun Feb 8 22:29:06 2015 New Revision: 278417 URL: https://svnweb.freebsd.org/changeset/base/278417 Log: MFC r268857: ttyname(3): Fix EBADF/ENOTTY error descriptions. Also, make sure to document the return values and errors for all three functions in the man page. PR: 191931 Modified: stable/10/lib/libc/gen/ttyname.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/ttyname.3 ============================================================================== --- stable/10/lib/libc/gen/ttyname.3 Sun Feb 8 22:27:23 2015 (r278416) +++ stable/10/lib/libc/gen/ttyname.3 Sun Feb 8 22:29:06 2015 (r278417) @@ -28,7 +28,7 @@ .\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 14, 2005 +.Dd July 18, 2014 .Dt TTYNAME 3 .Os .Sh NAME @@ -76,6 +76,14 @@ function takes a buffer and length as arguments to avoid this problem. .Sh RETURN VALUES The +.Fn isatty +function returns 1 if +.Fa fd +refers to a terminal type device; +otherwise, it returns 0 and may set +.Va errno +to indicate the error. +The .Fn ttyname function returns the null terminated name if the device is found and @@ -89,15 +97,23 @@ The function returns 0 if successful. Otherwise an error number is returned. .Sh ERRORS -The -.Fn ttyname_r -may fail and return the following error codes: +These functions may fail if: .Bl -tag -width Er -.It Bq Er ENOTTY +.It Bq Er EBADF The .Fa fd argument is not a valid file descriptor. +.It Bq Er ENOTTY +The file associated with +.Fa fd +is not a terminal. +.El +.Pp +Additionally, +.Fn ttyname_r +may fail if: +.Bl -tag -width Er .It Bq Er ERANGE The .Fa bufsize From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:29:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E58A87C8; Sun, 8 Feb 2015 22:29:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0DB13F3; Sun, 8 Feb 2015 22:29:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MTvSt043495; Sun, 8 Feb 2015 22:29:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MTvKZ043494; Sun, 8 Feb 2015 22:29:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082229.t18MTvKZ043494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278418 - stable/10/sys/dev/malo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:29:58 -0000 Author: marius Date: Sun Feb 8 22:29:57 2015 New Revision: 278418 URL: https://svnweb.freebsd.org/changeset/base/278418 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/10/sys/dev/malo/if_malo_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/10/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:06 2015 (r278417) +++ stable/10/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:57 2015 (r278418) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:30:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13D9990E; Sun, 8 Feb 2015 22:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F31EA3FD; Sun, 8 Feb 2015 22:30:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MUCqc044309; Sun, 8 Feb 2015 22:30:12 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MUClF044308; Sun, 8 Feb 2015 22:30:12 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082230.t18MUClF044308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278419 - stable/9/sys/dev/malo X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:30:13 -0000 Author: marius Date: Sun Feb 8 22:30:12 2015 New Revision: 278419 URL: https://svnweb.freebsd.org/changeset/base/278419 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/9/sys/dev/malo/if_malo_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:57 2015 (r278418) +++ stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:30:12 2015 (r278419) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:46:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1285E0A; Sun, 8 Feb 2015 22:46:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC5DF7D5; Sun, 8 Feb 2015 22:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MkU13052961; Sun, 8 Feb 2015 22:46:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MkUss052960; Sun, 8 Feb 2015 22:46:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082246.t18MkUss052960@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278420 - stable/10/bin/ln X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:46:30 -0000 Author: jilles Date: Sun Feb 8 22:46:29 2015 New Revision: 278420 URL: https://svnweb.freebsd.org/changeset/base/278420 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/10/bin/ln/symlink.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ln/symlink.7 ============================================================================== --- stable/10/bin/ln/symlink.7 Sun Feb 8 22:30:12 2015 (r278419) +++ stable/10/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015 (r278420) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 22:47:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BBEEF44; Sun, 8 Feb 2015 22:47:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56D0F7DE; Sun, 8 Feb 2015 22:47:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MlZRT053148; Sun, 8 Feb 2015 22:47:35 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MlZrV053147; Sun, 8 Feb 2015 22:47:35 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082247.t18MlZrV053147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278421 - stable/9/bin/ln X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:47:35 -0000 Author: jilles Date: Sun Feb 8 22:47:34 2015 New Revision: 278421 URL: https://svnweb.freebsd.org/changeset/base/278421 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/9/bin/ln/symlink.7 Directory Properties: stable/9/bin/ln/ (props changed) Modified: stable/9/bin/ln/symlink.7 ============================================================================== --- stable/9/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015 (r278420) +++ stable/9/bin/ln/symlink.7 Sun Feb 8 22:47:34 2015 (r278421) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 23:03:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDB2E608; Sun, 8 Feb 2015 23:03:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BCEA9A3; Sun, 8 Feb 2015 23:03:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18N3gj5062332; Sun, 8 Feb 2015 23:03:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18N3ggX062331; Sun, 8 Feb 2015 23:03:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502082303.t18N3ggX062331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 8 Feb 2015 23:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278422 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 23:03:42 -0000 Author: bapt Date: Sun Feb 8 23:03:41 2015 New Revision: 278422 URL: https://svnweb.freebsd.org/changeset/base/278422 Log: revert r278414 Reported by: bz Modified: head/lib/libedit/readline.c Modified: head/lib/libedit/readline.c ============================================================================== --- head/lib/libedit/readline.c Sun Feb 8 22:47:34 2015 (r278421) +++ head/lib/libedit/readline.c Sun Feb 8 23:03:41 2015 (r278422) @@ -395,9 +395,6 @@ readline(const char *p) char *buf; static int used_event_hook; - if (line == NULL) - return 0; - if (e == NULL || h == NULL) rl_initialize(); From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 23:04:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 365037B1; Sun, 8 Feb 2015 23:04:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21A629B6; Sun, 8 Feb 2015 23:04:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18N4XQL062504; Sun, 8 Feb 2015 23:04:33 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18N4W9P062503; Sun, 8 Feb 2015 23:04:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082304.t18N4W9P062503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 23:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278423 - stable/10/sys/i386/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 23:04:33 -0000 Author: marius Date: Sun Feb 8 23:04:32 2015 New Revision: 278423 URL: https://svnweb.freebsd.org/changeset/base/278423 Log: MFC: r274054 (missed in r276076) Fix XEN kernel build. Modified: stable/10/sys/i386/xen/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:03:41 2015 (r278422) +++ stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:04:32 2015 (r278423) @@ -604,7 +604,7 @@ init_secondary(void) #endif /* set up FPU state on the AP */ - npxinit(); + npxinit(false); #if 0 /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 23:09:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23990B65; Sun, 8 Feb 2015 23:09:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EE869FC; Sun, 8 Feb 2015 23:09:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18N91Oo063218; Sun, 8 Feb 2015 23:09:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18N91ZN063215; Sun, 8 Feb 2015 23:09:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082309.t18N91ZN063215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 23:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278424 - stable/10/sys/i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 23:09:02 -0000 Author: marius Date: Sun Feb 8 23:09:01 2015 New Revision: 278424 URL: https://svnweb.freebsd.org/changeset/base/278424 Log: MFC: r276377, r276714 - No longer exclude malo(4) and mwl(4), they have been fixed in r275870 (MFCed to stable/10 in r278415) and r275871 (MFCed to stable/10 in r278416) respectively to build with PAE enabled. - For the PAE kernel configuration file, no longer exclude devices that are known to be 64-bit DMA clean from amd64. Modified: stable/10/sys/i386/conf/PAE stable/10/sys/i386/conf/XEN Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/conf/PAE ============================================================================== --- stable/10/sys/i386/conf/PAE Sun Feb 8 23:04:32 2015 (r278423) +++ stable/10/sys/i386/conf/PAE Sun Feb 8 23:09:01 2015 (r278424) @@ -10,77 +10,14 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed options PAE # Physical Address Extensions Kernel -# The following modules don't build with PAE enabled. -makeoptions WITHOUT_MODULES="ctl dpt hptmv ida malo mwl" - -# force isp firmware to fully loaded -device ispfw - -# What follows is a list of drivers that are normally in GENERIC, but either -# don't work or are untested with PAE. Be very careful before enabling any -# of these drivers. Drivers which use DMA and don't handle 64 bit physical -# address properly may cause data corruption when used in a machine with more -# than 4 gigabytes of memory. - -nodevice ahb -nodevice sym -nodevice trm - -nodevice adv -nodevice adw -nodevice aha -nodevice aic -nodevice bt - -nodevice ncv -nodevice nsp -nodevice stg - -nodevice asr +# The following drivers don't build with PAE enabled. +makeoptions WITHOUT_MODULES="ctl dpt hptmv ida" nodevice dpt -nodevice mly nodevice hptmv -nodevice hptnr -nodevice hptrr - nodevice ida -nodevice mlx -nodevice pst - -nodevice agp - -nodevice txp -nodevice vx - -nodevice nve -nodevice pcn -nodevice sf -nodevice sis -nodevice ste -nodevice tl -nodevice tx -nodevice vr -nodevice wb -nodevice cs -nodevice ed -nodevice ex -nodevice ep -nodevice fe -nodevice ie -nodevice sn -nodevice xe - -nodevice an -nodevice ath # Atheros pci/cardbus NICs -nodevice ath_pci -nodevice ath_hal -nodevice ath_rate_sample # SampleRate tx rate control for ath -nodevice ipw -nodevice iwi -nodevice iwn -nodevice malo -nodevice mwl -nodevice ral -nodevice wi -nodevice wpi +# The following drivers don't work with PAE enabled. +makeoptions WITHOUT_MODULES+="asr ncr pst" +nodevice asr +nodevice ncr +nodevice pst Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Sun Feb 8 23:04:32 2015 (r278423) +++ stable/10/sys/i386/conf/XEN Sun Feb 8 23:09:01 2015 (r278424) @@ -8,8 +8,11 @@ ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -# The following modules don't build with PAE and XEN enabled. -makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida malo mwl rdma" +# The following drivers don't build with PAE or XEN enabled. +makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida rdma" + +# The following drivers don't work with PAE enabled. +makeoptions WITHOUT_MODULES+="asr ncr pst" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 01:44:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ECB2784; Mon, 9 Feb 2015 01:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7619CE05; Mon, 9 Feb 2015 01:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t191iFgu037513; Mon, 9 Feb 2015 01:44:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t191iBbd037490; Mon, 9 Feb 2015 01:44:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502090144.t191iBbd037490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Feb 2015 01:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278425 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 01:44:15 -0000 Author: emaste Date: Mon Feb 9 01:44:09 2015 New Revision: 278425 URL: https://svnweb.freebsd.org/changeset/base/278425 Log: Import LLDB as of upstream SVN 228549 (git 39760838) Added: vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h (contents, props changed) vendor/lldb/dist/include/lldb/Core/FormatEntity.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/StringConvert.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/ vendor/lldb/dist/include/lldb/Host/common/NativeBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/include/lldb/Host/common/NativeBreakpointList.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/include/lldb/Host/common/NativeThreadProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeWatchpointList.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/SoftwareBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormatEntity.h (contents, props changed) vendor/lldb/dist/source/API/SBLaunchInfo.cpp (contents, props changed) vendor/lldb/dist/source/Core/FormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Host/common/NativeRegisterContextRegisterInfo.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp vendor/lldb/dist/source/Host/common/NativeWatchpointList.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/StringConvert.cpp (contents, props changed) vendor/lldb/dist/source/Interpreter/OptionValueFormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.h (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBType.h vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Core/Broadcaster.h vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Core/Mangled.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/Core/RegularExpression.h vendor/lldb/dist/include/lldb/Core/ValueObject.h vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/Expression/ASTResultSynthesizer.h vendor/lldb/dist/include/lldb/Expression/ASTStructExtractor.h vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/PipeBase.h vendor/lldb/dist/include/lldb/Host/Socket.h vendor/lldb/dist/include/lldb/Host/SocketAddress.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Host/posix/PipePosix.h vendor/lldb/dist/include/lldb/Interpreter/Args.h vendor/lldb/dist/include/lldb/Interpreter/CommandInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupPlatform.h vendor/lldb/dist/include/lldb/Interpreter/OptionValue.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueProperties.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueRegex.h vendor/lldb/dist/include/lldb/Interpreter/OptionValues.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreterPython.h vendor/lldb/dist/include/lldb/Symbol/ClangASTType.h vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h vendor/lldb/dist/include/lldb/Target/FileAction.h vendor/lldb/dist/include/lldb/Target/LanguageRuntime.h vendor/lldb/dist/include/lldb/Target/ObjCLanguageRuntime.h vendor/lldb/dist/include/lldb/Target/Platform.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Utility/AnsiTerminal.h vendor/lldb/dist/include/lldb/Utility/ProcessStructReader.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-forward.h vendor/lldb/dist/source/API/SBInstruction.cpp vendor/lldb/dist/source/API/SBInstructionList.cpp vendor/lldb/dist/source/API/SBPlatform.cpp vendor/lldb/dist/source/API/SBStream.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBType.cpp vendor/lldb/dist/source/API/SBTypeCategory.cpp vendor/lldb/dist/source/API/SBValue.cpp vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp vendor/lldb/dist/source/Breakpoint/StoppointLocation.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectDisassemble.cpp vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Commands/CommandObjectGUI.cpp vendor/lldb/dist/source/Commands/CommandObjectHelp.cpp vendor/lldb/dist/source/Commands/CommandObjectHelp.h vendor/lldb/dist/source/Commands/CommandObjectLog.cpp vendor/lldb/dist/source/Commands/CommandObjectMemory.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp vendor/lldb/dist/source/Commands/CommandObjectSource.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp vendor/lldb/dist/source/Core/Address.cpp vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/Broadcaster.cpp vendor/lldb/dist/source/Core/ConnectionMachPort.cpp vendor/lldb/dist/source/Core/ConnectionSharedMemory.cpp vendor/lldb/dist/source/Core/ConstString.cpp vendor/lldb/dist/source/Core/Debugger.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Core/Error.cpp vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Core/Log.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Core/RegisterValue.cpp vendor/lldb/dist/source/Core/RegularExpression.cpp vendor/lldb/dist/source/Core/Scalar.cpp vendor/lldb/dist/source/Core/StreamFile.cpp vendor/lldb/dist/source/Core/Value.cpp vendor/lldb/dist/source/Core/ValueObject.cpp vendor/lldb/dist/source/Core/ValueObjectConstResult.cpp vendor/lldb/dist/source/Core/ValueObjectDynamicValue.cpp vendor/lldb/dist/source/Core/ValueObjectMemory.cpp vendor/lldb/dist/source/Core/ValueObjectSyntheticFilter.cpp vendor/lldb/dist/source/Core/ValueObjectVariable.cpp vendor/lldb/dist/source/DataFormatters/CXXFormatterFunctions.cpp vendor/lldb/dist/source/DataFormatters/FormatManager.cpp vendor/lldb/dist/source/DataFormatters/LibCxx.cpp vendor/lldb/dist/source/DataFormatters/LibCxxInitializerList.cpp vendor/lldb/dist/source/DataFormatters/LibCxxVector.cpp vendor/lldb/dist/source/DataFormatters/TypeSummary.cpp vendor/lldb/dist/source/DataFormatters/TypeSynthetic.cpp vendor/lldb/dist/source/Expression/ASTResultSynthesizer.cpp vendor/lldb/dist/source/Expression/ASTStructExtractor.cpp vendor/lldb/dist/source/Expression/ClangExpressionParser.cpp vendor/lldb/dist/source/Expression/ClangModulesDeclVendor.cpp vendor/lldb/dist/source/Expression/ExpressionSourceCode.cpp vendor/lldb/dist/source/Expression/IRExecutionUnit.cpp vendor/lldb/dist/source/Expression/IRForTarget.cpp vendor/lldb/dist/source/Expression/Materializer.cpp vendor/lldb/dist/source/Host/common/Editline.cpp vendor/lldb/dist/source/Host/common/File.cpp vendor/lldb/dist/source/Host/common/FileSpec.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/HostInfoBase.cpp vendor/lldb/dist/source/Host/common/NativeBreakpoint.cpp vendor/lldb/dist/source/Host/common/NativeBreakpointList.cpp vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp vendor/lldb/dist/source/Host/common/NativeThreadProtocol.cpp vendor/lldb/dist/source/Host/common/Socket.cpp vendor/lldb/dist/source/Host/common/SocketAddress.cpp vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.cpp vendor/lldb/dist/source/Host/common/ThreadLauncher.cpp vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp vendor/lldb/dist/source/Host/posix/PipePosix.cpp vendor/lldb/dist/source/Interpreter/Args.cpp vendor/lldb/dist/source/Interpreter/CommandHistory.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Interpreter/CommandObjectRegexCommand.cpp vendor/lldb/dist/source/Interpreter/OptionGroupPlatform.cpp vendor/lldb/dist/source/Interpreter/OptionGroupValueObjectDisplay.cpp vendor/lldb/dist/source/Interpreter/OptionValue.cpp vendor/lldb/dist/source/Interpreter/OptionValueArray.cpp vendor/lldb/dist/source/Interpreter/OptionValueFileSpecLIst.cpp vendor/lldb/dist/source/Interpreter/OptionValuePathMappings.cpp vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp vendor/lldb/dist/source/Interpreter/OptionValueRegex.cpp vendor/lldb/dist/source/Interpreter/OptionValueSInt64.cpp vendor/lldb/dist/source/Interpreter/OptionValueUInt64.cpp vendor/lldb/dist/source/Interpreter/Property.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.h vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIX.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_i386.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfoInterface.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/lldb-x86-register-enums.h vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/source/Symbol/ClangASTType.cpp vendor/lldb/dist/source/Symbol/CompactUnwindInfo.cpp vendor/lldb/dist/source/Symbol/SymbolContext.cpp vendor/lldb/dist/source/Symbol/Type.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Target/ExecutionContext.cpp vendor/lldb/dist/source/Target/LanguageRuntime.cpp vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/ProcessLaunchInfo.cpp vendor/lldb/dist/source/Target/StackFrame.cpp vendor/lldb/dist/source/Target/StopInfo.cpp vendor/lldb/dist/source/Target/TargetList.cpp vendor/lldb/dist/source/Target/Thread.cpp vendor/lldb/dist/source/Target/ThreadPlanTracer.cpp vendor/lldb/dist/source/Target/UnixSignals.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/source/Utility/UriParser.cpp vendor/lldb/dist/source/Utility/UriParser.h vendor/lldb/dist/tools/compact-unwind/compact-unwind-dumper.c vendor/lldb/dist/tools/lldb-mi/Driver.cpp vendor/lldb/dist/tools/lldb-mi/Driver.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValConsume.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmd.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdExec.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdExec.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdFile.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdStack.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdStack.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdTarget.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdThread.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBBroadcaster.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLog.cpp vendor/lldb/dist/tools/lldb-mi/MICmnResources.cpp vendor/lldb/dist/tools/lldb-mi/MICmnResources.h vendor/lldb/dist/tools/lldb-mi/MIDriver.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverBase.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverBase.h vendor/lldb/dist/tools/lldb-mi/MIDriverMain.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMgr.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMgr.h vendor/lldb/dist/tools/lldb-mi/MIReadMe.txt Added: vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h Mon Feb 9 01:44:09 2015 (r278425) @@ -0,0 +1,186 @@ +//===-- SBLaunchInfo.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBLaunchInfo_h_ +#define LLDB_SBLaunchInfo_h_ + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class SBPlatform; +class SBTarget; + +class SBLaunchInfo +{ +public: + SBLaunchInfo (const char **argv); + + ~SBLaunchInfo(); + + lldb::pid_t + GetProcessID(); + + uint32_t + GetUserID(); + + uint32_t + GetGroupID(); + + bool + UserIDIsValid (); + + bool + GroupIDIsValid (); + + void + SetUserID (uint32_t uid); + + void + SetGroupID (uint32_t gid); + + SBFileSpec + GetExecutableFile (); + + //---------------------------------------------------------------------- + /// Set the executable file that will be used to launch the process and + /// optionally set it as the first argument in the argument vector. + /// + /// This only needs to be specified if clients wish to carefully control + /// the exact path will be used to launch a binary. If you create a + /// target with a symlink, that symlink will get resolved in the target + /// and the resolved path will get used to launch the process. Calling + /// this function can help you still launch your process using the + /// path of your choice. + /// + /// If this function is not called prior to launching with + /// SBTarget::Launch(...), the target will use the resolved executable + /// path that was used to create the target. + /// + /// @param[in] exe_file + /// The override path to use when launching the executable. + /// + /// @param[in] add_as_first_arg + /// If true, then the path will be inserted into the argument vector + /// prior to launching. Otherwise the argument vector will be left + /// alone. + //---------------------------------------------------------------------- + void + SetExecutableFile (SBFileSpec exe_file, bool add_as_first_arg); + + + //---------------------------------------------------------------------- + /// Get the listener that will be used to receive process events. + /// + /// If no listener has been set via a call to + /// SBLaunchInfo::SetListener(), then an invalid SBListener will be + /// returned (SBListener::IsValid() will return false). If a listener + /// has been set, then the valid listener object will be returned. + //---------------------------------------------------------------------- + SBListener + GetListener (); + + //---------------------------------------------------------------------- + /// Set the listener that will be used to receive process events. + /// + /// By default the SBDebugger, which has a listener, that the SBTarget + /// belongs to will listen for the process events. Calling this function + /// allows a different listener to be used to listen for process events. + //---------------------------------------------------------------------- + void + SetListener (SBListener &listener); + + uint32_t + GetNumArguments (); + + const char * + GetArgumentAtIndex (uint32_t idx); + + void + SetArguments (const char **argv, bool append); + + uint32_t + GetNumEnvironmentEntries (); + + const char * + GetEnvironmentEntryAtIndex (uint32_t idx); + + void + SetEnvironmentEntries (const char **envp, bool append); + + void + Clear (); + + const char * + GetWorkingDirectory () const; + + void + SetWorkingDirectory (const char *working_dir); + + uint32_t + GetLaunchFlags (); + + void + SetLaunchFlags (uint32_t flags); + + const char * + GetProcessPluginName (); + + void + SetProcessPluginName (const char *plugin_name); + + const char * + GetShell (); + + void + SetShell (const char * path); + + uint32_t + GetResumeCount (); + + void + SetResumeCount (uint32_t c); + + bool + AddCloseFileAction (int fd); + + bool + AddDuplicateFileAction (int fd, int dup_fd); + + bool + AddOpenFileAction (int fd, const char *path, bool read, bool write); + + bool + AddSuppressFileAction (int fd, bool read, bool write); + + void + SetLaunchEventData (const char *data); + + const char * + GetLaunchEventData () const; + + bool + GetDetachOnError() const; + + void + SetDetachOnError(bool enable); + +protected: + friend class SBPlatform; + friend class SBTarget; + + lldb_private::ProcessLaunchInfo & + ref (); + + ProcessLaunchInfoSP m_opaque_sp; +}; + +} // namespace lldb + +#endif // LLDB_SBLaunchInfo_h_ Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBPlatform.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBPlatform.h Mon Feb 9 01:44:09 2015 (r278425) @@ -12,11 +12,15 @@ #include "lldb/API/SBDefines.h" +#include + struct PlatformConnectOptions; struct PlatformShellCommand; namespace lldb { + class SBLaunchInfo; + class SBPlatformConnectOptions { public: @@ -171,6 +175,12 @@ namespace lldb { Run (SBPlatformShellCommand &shell_command); SBError + Launch (SBLaunchInfo &launch_info); + + SBError + Kill (const lldb::pid_t pid); + + SBError MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault); uint32_t @@ -190,6 +200,9 @@ namespace lldb { void SetSP (const lldb::PlatformSP& platform_sp); + SBError + ExecuteConnected (const std::function& func); + lldb::PlatformSP m_opaque_sp; }; Modified: vendor/lldb/dist/include/lldb/API/SBTarget.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBTarget.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBTarget.h Mon Feb 9 01:44:09 2015 (r278425) @@ -15,6 +15,7 @@ #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBFileSpecList.h" +#include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBSymbolContextList.h" #include "lldb/API/SBType.h" #include "lldb/API/SBValue.h" @@ -24,166 +25,6 @@ namespace lldb { class SBPlatform; -class SBLaunchInfo -{ -public: - SBLaunchInfo (const char **argv); - - ~SBLaunchInfo(); - - uint32_t - GetUserID(); - - uint32_t - GetGroupID(); - - bool - UserIDIsValid (); - - bool - GroupIDIsValid (); - - void - SetUserID (uint32_t uid); - - void - SetGroupID (uint32_t gid); - - SBFileSpec - GetExecutableFile (); - - //---------------------------------------------------------------------- - /// Set the executable file that will be used to launch the process and - /// optionally set it as the first argument in the argument vector. - /// - /// This only needs to be specified if clients wish to carefully control - /// the exact path will be used to launch a binary. If you create a - /// target with a symlink, that symlink will get resolved in the target - /// and the resolved path will get used to launch the process. Calling - /// this function can help you still launch your process using the - /// path of your choice. - /// - /// If this function is not called prior to launching with - /// SBTarget::Launch(...), the target will use the resolved executable - /// path that was used to create the target. - /// - /// @param[in] exe_file - /// The override path to use when launching the executable. - /// - /// @param[in] add_as_first_arg - /// If true, then the path will be inserted into the argument vector - /// prior to launching. Otherwise the argument vector will be left - /// alone. - //---------------------------------------------------------------------- - void - SetExecutableFile (SBFileSpec exe_file, bool add_as_first_arg); - - - //---------------------------------------------------------------------- - /// Get the listener that will be used to receive process events. - /// - /// If no listener has been set via a call to - /// SBLaunchInfo::SetListener(), then an invalid SBListener will be - /// returned (SBListener::IsValid() will return false). If a listener - /// has been set, then the valid listener object will be returned. - //---------------------------------------------------------------------- - SBListener - GetListener (); - - //---------------------------------------------------------------------- - /// Set the listener that will be used to receive process events. - /// - /// By default the SBDebugger, which has a listener, that the SBTarget - /// belongs to will listen for the process events. Calling this function - /// allows a different listener to be used to listen for process events. - //---------------------------------------------------------------------- - void - SetListener (SBListener &listener); - - uint32_t - GetNumArguments (); - - const char * - GetArgumentAtIndex (uint32_t idx); - - void - SetArguments (const char **argv, bool append); - - uint32_t - GetNumEnvironmentEntries (); - - const char * - GetEnvironmentEntryAtIndex (uint32_t idx); - - void - SetEnvironmentEntries (const char **envp, bool append); - - void - Clear (); - - const char * - GetWorkingDirectory () const; - - void - SetWorkingDirectory (const char *working_dir); - - uint32_t - GetLaunchFlags (); - - void - SetLaunchFlags (uint32_t flags); - - const char * - GetProcessPluginName (); - - void - SetProcessPluginName (const char *plugin_name); - - const char * - GetShell (); - - void - SetShell (const char * path); - - uint32_t - GetResumeCount (); - - void - SetResumeCount (uint32_t c); - - bool - AddCloseFileAction (int fd); - - bool - AddDuplicateFileAction (int fd, int dup_fd); - - bool - AddOpenFileAction (int fd, const char *path, bool read, bool write); - - bool - AddSuppressFileAction (int fd, bool read, bool write); - - void - SetLaunchEventData (const char *data); - - const char * - GetLaunchEventData () const; - - bool - GetDetachOnError() const; - - void - SetDetachOnError(bool enable); - -protected: - friend class SBTarget; - - lldb_private::ProcessLaunchInfo & - ref (); - - ProcessLaunchInfoSP m_opaque_sp; -}; - class SBAttachInfo { public: Modified: vendor/lldb/dist/include/lldb/API/SBType.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBType.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBType.h Mon Feb 9 01:44:09 2015 (r278425) @@ -153,6 +153,9 @@ public: IsArrayType (); bool + IsVectorType (); + + bool IsTypedefType (); lldb::SBType @@ -175,6 +178,9 @@ public: lldb::SBType GetArrayElementType (); + + lldb::SBType + GetVectorElementType (); lldb::SBType GetCanonicalType(); Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Mon Feb 9 01:44:09 2015 (r278425) @@ -714,6 +714,19 @@ protected: bool IgnoreCountShouldStop (); + void + IncrementHitCount() + { + m_hit_count++; + } + + void + DecrementHitCount() + { + assert (m_hit_count > 0); + m_hit_count--; + } + private: // This one should only be used by Target to copy breakpoints from target to target - primarily from the dummy // target to prime new targets. @@ -733,7 +746,10 @@ private: BreakpointLocationList m_locations; // The list of locations currently found for this breakpoint. std::string m_kind_description; bool m_resolve_indirect_symbols; - + uint32_t m_hit_count; // Number of times this breakpoint/watchpoint has been hit. This is kept + // separately from the locations hit counts, since locations can go away when + // their backing library gets unloaded, and we would lose hit counts. + void SendBreakpointChangedEvent (lldb::BreakpointEventType eventKind); Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h Mon Feb 9 01:44:09 2015 (r278425) @@ -390,6 +390,7 @@ protected: friend class BreakpointSite; friend class BreakpointLocationList; friend class Process; + friend class StopInfoBreakpoint; //------------------------------------------------------------------ /// Set the breakpoint site for this location to \a bp_site_sp. @@ -417,6 +418,9 @@ private: void BumpHitCount(); + void + UndoBumpHitCount(); + //------------------------------------------------------------------ // Constructors and Destructors Modified: vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h Mon Feb 9 01:44:09 2015 (r278425) @@ -134,6 +134,9 @@ protected: ++m_hit_count; } + void + DecrementHitCount (); + private: //------------------------------------------------------------------ // For StoppointLocation only Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ArchSpec.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ArchSpec.h Mon Feb 9 01:44:09 2015 (r278425) @@ -277,6 +277,21 @@ public: } //------------------------------------------------------------------ + /// Merges fields from another ArchSpec into this ArchSpec. + /// + /// This will use the supplied ArchSpec to fill in any fields of + /// the triple in this ArchSpec which were unspecified. This can + /// be used to refine a generic ArchSpec with a more specific one. + /// For example, if this ArchSpec's triple is something like + /// i386-unknown-unknown-unknown, and we have a triple which is + /// x64-pc-windows-msvc, then merging that triple into this one + /// will result in the triple i386-pc-windows-msvc. + /// + //------------------------------------------------------------------ + void + MergeFrom(const ArchSpec &other); + + //------------------------------------------------------------------ /// Sets this ArchSpec according to the given architecture name. /// /// The architecture name can be one of the generic system default Modified: vendor/lldb/dist/include/lldb/Core/Broadcaster.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Broadcaster.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Broadcaster.h Mon Feb 9 01:44:09 2015 (r278425) @@ -419,12 +419,7 @@ public: HijackBroadcaster (Listener *listener, uint32_t event_mask = UINT32_MAX); bool - IsHijackedForEvent (uint32_t event_mask) - { - if (m_hijacking_listeners.size() > 0) - return (event_mask & m_hijacking_masks.back()) != 0; - return false; - } + IsHijackedForEvent (uint32_t event_mask); //------------------------------------------------------------------ /// Restore the state of the Broadcaster from a previous hijack attempt. Modified: vendor/lldb/dist/include/lldb/Core/Connection.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Connection.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Connection.h Mon Feb 9 01:44:09 2015 (r278425) @@ -12,6 +12,7 @@ // C Includes // C++ Includes +#include // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" @@ -133,13 +134,13 @@ public: /// /// Subclasses must override this function. /// - /// @param[in] src - /// A source buffer that must be at least \a src_len bytes + /// @param[in] dst + /// A desination buffer that must be at least \a dst_len bytes /// long. /// - /// @param[in] src_len + /// @param[in] dst_len /// The number of bytes to attempt to write, and also the - /// number of bytes are currently available in \a src. + /// number of bytes are currently available in \a dst. /// /// @param[out] error_ptr /// A pointer to an error object that should be given an @@ -150,7 +151,18 @@ public: /// The number of bytes actually Written. //------------------------------------------------------------------ virtual size_t - Write (const void *buffer, size_t length, lldb::ConnectionStatus &status, Error *error_ptr) = 0; + Write (const void *dst, size_t dst_len, lldb::ConnectionStatus &status, Error *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Returns a URI that describes this connection object + /// + /// Subclasses may override this function. + /// + /// @return + /// Returns URI or an empty string if disconnecteds + //------------------------------------------------------------------ + virtual std::string + GetURI() = 0; private: //------------------------------------------------------------------ Modified: vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h Mon Feb 9 01:44:09 2015 (r278425) @@ -56,6 +56,9 @@ public: lldb::ConnectionStatus &status, lldb_private::Error *error_ptr); + virtual std::string + GetURI(); + lldb::ConnectionStatus BootstrapCheckIn (const char *port_name, lldb_private::Error *error_ptr); @@ -83,6 +86,7 @@ protected: mach_port_t m_port; private: + std::string m_uri; DISALLOW_COPY_AND_ASSIGN (ConnectionMachPort); Modified: vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h Mon Feb 9 01:44:09 2015 (r278425) @@ -53,6 +53,9 @@ public: virtual size_t Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr); + virtual std::string + GetURI(); + lldb::ConnectionStatus Open (bool create, const char *name, size_t size, Error *error_ptr); Modified: vendor/lldb/dist/include/lldb/Core/Debugger.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Debugger.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Debugger.h Mon Feb 9 01:44:09 2015 (r278425) @@ -19,6 +19,7 @@ #include "lldb/lldb-public.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Communication.h" +#include "lldb/Core/FormatEntity.h" #include "lldb/Core/IOHandler.h" #include "lldb/Core/Listener.h" #include "lldb/Core/SourceManager.h" @@ -158,8 +159,6 @@ public: // To get the target's source manager, call GetSourceManager on the target instead. SourceManager & GetSourceManager (); - -public: lldb::TargetSP GetSelectedTarget () @@ -224,6 +223,12 @@ public: ConstString GetTopIOHandlerControlSequence(char ch); + const char * + GetIOHandlerCommandPrefix(); + + const char * + GetIOHandlerHelpPrologue(); + bool HideTopIOHandler(); @@ -243,15 +248,7 @@ public: GetDebuggerAtIndex (size_t index); static bool - FormatPrompt (const char *format, - const SymbolContext *sc, - const ExecutionContext *exe_ctx, - const Address *addr, - Stream &s, - ValueObject* valobj = NULL); - - static bool - FormatDisassemblerAddress (const char *format, + FormatDisassemblerAddress (const FormatEntity::Entry *format, const SymbolContext *sc, const SymbolContext *prev_sc, const ExecutionContext *exe_ctx, @@ -296,13 +293,13 @@ public: bool GetAutoConfirm () const; - const char * + const FormatEntity::Entry * GetDisassemblyFormat() const; - const char * + const FormatEntity::Entry * GetFrameFormat() const; - const char * + const FormatEntity::Entry * GetThreadFormat() const; lldb::ScriptLanguage @@ -352,7 +349,6 @@ public: bool GetNotifyVoid () const; - const ConstString & GetInstanceName() Modified: vendor/lldb/dist/include/lldb/Core/Disassembler.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Disassembler.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Disassembler.h Mon Feb 9 01:44:09 2015 (r278425) @@ -117,7 +117,7 @@ public: /// the InstructionList. /// Only needed if show_address is true. /// - /// @param[in] disassembly_addr_format_spec + /// @param[in] disassembly_addr_format /// The format specification for how addresses are printed. /// Only needed if show_address is true. //------------------------------------------------------------------ @@ -130,7 +130,7 @@ public: const ExecutionContext* exe_ctx, const SymbolContext *sym_ctx, const SymbolContext *prev_sym_ctx, - const char *disassembly_addr_format_spec); + const FormatEntity::Entry *disassembly_addr_format); virtual bool DoesBranch () = 0; @@ -457,7 +457,7 @@ protected: //------------------------------------------------------------------ // Classes that inherit from Disassembler can see and modify these //------------------------------------------------------------------ - const ArchSpec m_arch; + ArchSpec m_arch; InstructionList m_instruction_list; lldb::addr_t m_base_addr; std::string m_flavor; Added: vendor/lldb/dist/include/lldb/Core/FormatEntity.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Core/FormatEntity.h Mon Feb 9 01:44:09 2015 (r278425) @@ -0,0 +1,260 @@ +//===-- FormatEntity.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_FormatEntity_h_ +#define liblldb_FormatEntity_h_ +#if defined(__cplusplus) + +#include +#include + +#include "lldb/lldb-private.h" +#include "lldb/Core/Error.h" + +namespace llvm +{ + class StringRef; +} + +namespace lldb_private +{ + class FormatEntity + { + public: + struct Entry + { + enum class Type { + Invalid, + ParentNumber, + ParentString, + InsertString, + Root, + String, + Scope, + Variable, + VariableSynthetic, + ScriptVariable, + ScriptVariableSynthetic, + AddressLoad, + AddressFile, + AddressLoadOrFile, + ProcessID, + ProcessFile, + ScriptProcess, + ThreadID, + ThreadProtocolID, + ThreadIndexID, + ThreadName, + ThreadQueue, + ThreadStopReason, + ThreadReturnValue, + ThreadCompletedExpression, + ScriptThread, + ThreadInfo, + TargetArch, + ScriptTarget, + ModuleFile, + File, + FrameIndex, + FrameRegisterPC, + FrameRegisterSP, + FrameRegisterFP, + FrameRegisterFlags, + FrameRegisterByName, + ScriptFrame, + FunctionID, + FunctionDidChange, + FunctionInitialFunction, + FunctionName, + FunctionNameWithArgs, + FunctionNameNoArgs, + FunctionAddrOffset, + FunctionAddrOffsetConcrete, + FunctionLineOffset, + FunctionPCOffset, + LineEntryFile, + LineEntryLineNumber, + LineEntryStartAddress, + LineEntryEndAddress, + CurrentPCArrow + }; + + enum FormatType + { + None, + UInt32, + UInt64, + CString + }; + + struct Definition + { + const char *name; + const char *string; // Insert this exact string into the output + Entry::Type type; + FormatType format_type; // uint32_t, uint64_t, cstr, or anything that can be formatted by printf or lldb::Format + uint64_t data; + uint32_t num_children; + Definition *children; // An array of "num_children" Definition entries, + bool keep_separator; + }; + + Entry (Type t = Type::Invalid, + const char *s = NULL, + const char *f = NULL) : + string (s ? s : ""), + printf_format (f ? f : ""), + children (), + definition (NULL), + type (t), + fmt (lldb::eFormatDefault), + number (0), + deref (false) + { + } + + Entry (llvm::StringRef s); + Entry (char ch); + + void + AppendChar (char ch); + + void + AppendText (const llvm::StringRef &s); + + void + AppendText (const char *cstr); + + void + AppendEntry (const Entry &&entry) + { + children.push_back(entry); + } + + void + Clear () + { + string.clear(); + printf_format.clear(); + children.clear(); + definition = NULL; + type = Type::Invalid; + fmt = lldb::eFormatDefault; + number = 0; + deref = false; + } + + static const char * + TypeToCString (Type t); + + void + Dump (Stream &s, int depth = 0) const; + + bool + operator == (const Entry &rhs) const + { + if (string != rhs.string) + return false; + if (printf_format != rhs.printf_format) + return false; + const size_t n = children.size(); + const size_t m = rhs.children.size(); + for (size_t i=0; i < std::min(n, m); ++i) + { + if (!(children[i] == rhs.children[i])) + return false; + } + if (children != rhs.children) + return false; + if (definition != rhs.definition) + return false; + if (type != rhs.type) + return false; + if (fmt != rhs.fmt) + return false; + if (deref != rhs.deref) + return false; + return true; + } + + std::string string; + std::string printf_format; + std::vector children; + Definition *definition; + Type type; + lldb::Format fmt; + lldb::addr_t number; + bool deref; + }; + + static bool + Format (const Entry &entry, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static bool + FormatStringRef (const llvm::StringRef &format, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static bool + FormatCString (const char *format, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static Error + Parse (const llvm::StringRef &format, Entry &entry); + + static Error + ExtractVariableInfo (llvm::StringRef &format_str, + llvm::StringRef &variable_name, + llvm::StringRef &variable_format); + + static size_t + AutoComplete (const char *s, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + + //---------------------------------------------------------------------- + // Format the current elements into the stream \a s. + // + // The root element will be stripped off and the format str passed in + // will be either an empty string (print a description of this object), + // or contain a . separated series like a domain name that identifies + // further sub elements to display. + //---------------------------------------------------------------------- + static bool + FormatFileSpec (const FileSpec &file, Stream &s, llvm::StringRef elements, llvm::StringRef element_format); + protected: + + static Error + ParseInternal (llvm::StringRef &format, Entry &parent_entry, uint32_t depth); + + }; + +} +#endif // #if defined(__cplusplus) +#endif // liblldb_FormatEntity_h_ Modified: vendor/lldb/dist/include/lldb/Core/Mangled.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Mangled.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Mangled.h Mon Feb 9 01:44:09 2015 (r278425) @@ -290,6 +290,25 @@ public: void SetValue (const ConstString &name); + //---------------------------------------------------------------------- + /// Get the language only if it is definitive what the language is from + /// the mangling. + /// + /// For a mangled name to have a language it must have both a mangled + /// and a demangled name and it must be definitive from the mangling + /// what the language is. + /// + /// Standard C function names will return eLanguageTypeUnknown because + /// they aren't mangled and it isn't clear what language the name + /// represents (there will be no mangled name). + /// + /// @return *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 01:45:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA4D8BD; Mon, 9 Feb 2015 01:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4AE0B; Mon, 9 Feb 2015 01:45:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t191j6ri037747; Mon, 9 Feb 2015 01:45:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t191j6p3037746; Mon, 9 Feb 2015 01:45:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502090145.t191j6p3037746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Feb 2015 01:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278426 - vendor/lldb/lldb-r228549 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 01:45:07 -0000 Author: emaste Date: Mon Feb 9 01:45:06 2015 New Revision: 278426 URL: https://svnweb.freebsd.org/changeset/base/278426 Log: Tag trimmed lldb r228549 Added: vendor/lldb/lldb-r228549/ - copied from r278425, vendor/lldb/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:12:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3843D55; Mon, 9 Feb 2015 02:12:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF6E2E9; Mon, 9 Feb 2015 02:12:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192CdUi051295; Mon, 9 Feb 2015 02:12:39 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192CdkD051294; Mon, 9 Feb 2015 02:12:39 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502090212.t192CdkD051294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 02:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278427 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:12:39 -0000 Author: nwhitehorn Date: Mon Feb 9 02:12:38 2015 New Revision: 278427 URL: https://svnweb.freebsd.org/changeset/base/278427 Log: Simplify trapcode setup by placing a copy of the generic trap handler at every possible trap address by default. This also makes sure the kernel notices (and panics at) traps from newer CPUs that the kernel was not expecting rather than executing gibberish memory. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Mon Feb 9 01:45:06 2015 (r278426) +++ head/sys/powerpc/aim/machdep.c Mon Feb 9 02:12:38 2015 (r278427) @@ -256,6 +256,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ vm_offset_t startkernel, endkernel; void *generictrap; size_t trap_offset, trapsize; + vm_offset_t trap; void *kmdp; char *env; register_t msr, scratch; @@ -481,20 +482,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #endif /* - * Copy a code snippet to restore 32-bit bridge mode - * to the top of every non-generic trap handler - */ - - trap_offset += (size_t)&restorebridgesize; - bcopy(&restorebridge, (void *)EXC_RST, trap_offset); - bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); - bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); - bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); - bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); - bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); - bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); - - /* * Set the common trap entry point to the one that * knows to restore 32-bit operation on execution. */ @@ -507,14 +494,35 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #else /* powerpc64 */ cpu_features |= PPC_FEATURE_64; generictrap = &trapcode; - - /* Set TOC base so that the interrupt code can get at it */ - *((void **)TRAP_GENTRAP) = &trapcode2; - *((register_t *)TRAP_TOCBASE) = toc; #endif trapsize = (size_t)&trapcodeend - (size_t)&trapcode; + /* + * Copy generic handler into every possible trap. Special cases will get + * different ones in a minute. + */ + for (trap = EXC_RST; trap < EXC_LAST; trap += 0x20) + bcopy(generictrap, (void *)trap, trapsize); + + #ifndef __powerpc64__ + if (cpu_features & PPC_FEATURE_64) { + /* + * Copy a code snippet to restore 32-bit bridge mode + * to the top of every non-generic trap handler + */ + + trap_offset += (size_t)&restorebridgesize; + bcopy(&restorebridge, (void *)EXC_RST, trap_offset); + bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); + bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); + bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); + bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); + bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); + bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); + } + #endif + bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstcodeend - (size_t)&rstcode); @@ -527,31 +535,20 @@ powerpc_init(vm_offset_t fdt, vm_offset_ (size_t)&dblow); bcopy(&dblow, (void *)(EXC_BPT + trap_offset), (size_t)&dbend - (size_t)&dblow); -#else - bcopy(generictrap, (void *)EXC_MCHK, trapsize); - bcopy(generictrap, (void *)EXC_PGM, trapsize); - bcopy(generictrap, (void *)EXC_TRC, trapsize); - bcopy(generictrap, (void *)EXC_BPT, trapsize); #endif bcopy(&alitrap, (void *)(EXC_ALI + trap_offset), (size_t)&aliend - (size_t)&alitrap); bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsiend - (size_t)&dsitrap); - bcopy(generictrap, (void *)EXC_ISI, trapsize); + #ifdef __powerpc64__ + /* Set TOC base so that the interrupt code can get at it */ + *((void **)TRAP_GENTRAP) = &trapcode2; + *((register_t *)TRAP_TOCBASE) = toc; + bcopy(&slbtrap, (void *)EXC_DSE,(size_t)&slbtrapend - (size_t)&slbtrap); bcopy(&slbtrap, (void *)EXC_ISE,(size_t)&slbtrapend - (size_t)&slbtrap); - #endif - bcopy(generictrap, (void *)EXC_EXI, trapsize); - bcopy(generictrap, (void *)EXC_FPU, trapsize); - bcopy(generictrap, (void *)EXC_DECR, trapsize); - bcopy(generictrap, (void *)EXC_SC, trapsize); - bcopy(generictrap, (void *)EXC_FPA, trapsize); - bcopy(generictrap, (void *)EXC_VEC, trapsize); - bcopy(generictrap, (void *)EXC_PERF, trapsize); - bcopy(generictrap, (void *)EXC_VECAST_G4, trapsize); - bcopy(generictrap, (void *)EXC_VECAST_G5, trapsize); - #ifndef __powerpc64__ + #else /* G2-specific TLB miss helper handlers */ bcopy(&imisstrap, (void *)EXC_IMISS, (size_t)&imisssize); bcopy(&dlmisstrap, (void *)EXC_DLMISS, (size_t)&dlmisssize); From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:13:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BC08E93; Mon, 9 Feb 2015 02:13:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2F30F2; Mon, 9 Feb 2015 02:13:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192DaUN051520; Mon, 9 Feb 2015 02:13:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192DaRM051519; Mon, 9 Feb 2015 02:13:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502090213.t192DaRM051519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 02:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278428 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:13:37 -0000 Author: nwhitehorn Date: Mon Feb 9 02:13:36 2015 New Revision: 278428 URL: https://svnweb.freebsd.org/changeset/base/278428 Log: Technically speaking, using one virtal processor area for all CPUs is a violation of the spec. Make duplicate entries for each CPU. Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 02:12:38 2015 (r278427) +++ head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 02:13:36 2015 (r278428) @@ -58,7 +58,7 @@ extern void *ap_pcpu; #endif #ifdef __powerpc64__ -static uint8_t splpar_vpa[640] __aligned(64); +static uint8_t splpar_vpa[MAXCPU][640] __aligned(128); /* XXX: dpcpu */ #endif static vm_offset_t realmaxaddr = VM_MAX_ADDRESS; @@ -124,6 +124,8 @@ chrp_probe(platform_t plat) static int chrp_attach(platform_t plat) { + int i; + #ifdef __powerpc64__ /* XXX: check for /rtas/ibm,hypertas-functions? */ if (!(mfmsr() & PSL_HV)) { @@ -136,14 +138,19 @@ chrp_attach(platform_t plat) cpu_idle_hook = phyp_cpu_idle; /* Set up important VPA fields */ - bzero(splpar_vpa, sizeof(splpar_vpa)); - splpar_vpa[4] = (uint8_t)((sizeof(splpar_vpa) >> 8) & 0xff); - splpar_vpa[5] = (uint8_t)(sizeof(splpar_vpa) & 0xff); - splpar_vpa[0xba] = 1; /* Maintain FPRs */ - splpar_vpa[0xbb] = 1; /* Maintain PMCs */ - splpar_vpa[0xfc] = 0xff; /* Maintain full SLB */ - splpar_vpa[0xfd] = 0xff; - splpar_vpa[0xff] = 1; /* Maintain Altivec */ + for (i = 0; i < MAXCPU; i++) { + bzero(splpar_vpa[i], sizeof(splpar_vpa)); + /* First two: VPA size */ + splpar_vpa[i][4] = + (uint8_t)((sizeof(splpar_vpa[i]) >> 8) & 0xff); + splpar_vpa[i][5] = + (uint8_t)(sizeof(splpar_vpa[i]) & 0xff); + splpar_vpa[i][0xba] = 1; /* Maintain FPRs */ + splpar_vpa[i][0xbb] = 1; /* Maintain PMCs */ + splpar_vpa[i][0xfc] = 0xff; /* Maintain full SLB */ + splpar_vpa[i][0xfd] = 0xff; + splpar_vpa[i][0xff] = 1; /* Maintain Altivec */ + } mb(); /* Set up hypervisor CPU stuff */ @@ -492,11 +499,12 @@ static void chrp_smp_ap_init(platform_t platform) { if (!(mfmsr() & PSL_HV)) { + /* Register VPA */ + phyp_hcall(H_REGISTER_VPA, 1UL, PCPU_GET(cpuid), + splpar_vpa[PCPU_GET(cpuid)]); + /* Set interrupt priority */ phyp_hcall(H_CPPR, 0xff); - - /* Register VPA */ - phyp_hcall(H_REGISTER_VPA, 1UL, PCPU_GET(cpuid), splpar_vpa); } } #else From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:17:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBE7216A; Mon, 9 Feb 2015 02:17:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF0E3110; Mon, 9 Feb 2015 02:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192HMur052162; Mon, 9 Feb 2015 02:17:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192HMn9052161; Mon, 9 Feb 2015 02:17:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502090217.t192HMn9052161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 02:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278429 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:17:23 -0000 Author: nwhitehorn Date: Mon Feb 9 02:17:21 2015 New Revision: 278429 URL: https://svnweb.freebsd.org/changeset/base/278429 Log: Fix an extremely subtle concurrency bug triggered by running on 32-thread POWER8 systems. During thread switch, there was a very small window when the stack pointer was set to the stack pointer of the outgoing thread, but after the lock on that thread had already been released. If, during that window, the outgoing thread were rescheduled on another CPU and begin execution and an exception were taken on the original CPU, the trap handler and the outgoing thread would simultaneously execute on the same stack, causing memory corruption. Fix this by making sure to release the old thread only after cpu_switch() is done with its stack. MFC after: 2 weeks Sponsored by: FreeBSD Foundation Modified: head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Mon Feb 9 02:13:36 2015 (r278428) +++ head/sys/powerpc/powerpc/swtch64.S Mon Feb 9 02:17:21 2015 (r278429) @@ -72,6 +72,8 @@ TOC_ENTRY(blocked_lock) */ ENTRY(cpu_throw) mr %r13, %r4 + li %r14,0 /* Tell cpu_switchin not to release a thread */ + b cpu_switchin /* @@ -139,10 +141,7 @@ ENTRY(cpu_switch) bl pmap_deactivate /* Deactivate the current pmap */ nop - addi %r1,%r1,48 - sync /* Make sure all of that finished */ - std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ cpu_switchin: #if defined(SMP) && defined(SCHED_ULE) @@ -154,14 +153,20 @@ blocked_loop: beq- blocked_loop isync #endif + + ld %r17,TD_PCB(%r13) /* Get new PCB */ + ld %r1,PCB_SP(%r17) /* Load the stack pointer */ - mfsprg %r7,0 /* Get the pcpu pointer */ + /* Release old thread now that we have a stack pointer set up */ + cmpdi %r14,0 + beq- 1f + std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + +1: mfsprg %r7,0 /* Get the pcpu pointer */ std %r13,PC_CURTHREAD(%r7) /* Store new current thread */ ld %r17,TD_PCB(%r13) /* Store new current PCB */ std %r17,PC_CURPCB(%r7) - stdu %r1,-48(%r1) - mr %r3,%r13 /* Get new thread ptr */ bl pmap_activate /* Activate the new address space */ nop From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:27:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 078A950F; Mon, 9 Feb 2015 02:27:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E77CA1F0; Mon, 9 Feb 2015 02:27:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192RY0m057153; Mon, 9 Feb 2015 02:27:34 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192RYXZ057149; Mon, 9 Feb 2015 02:27:34 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502090227.t192RYXZ057149@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 9 Feb 2015 02:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278430 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:27:35 -0000 Author: gonzo Date: Mon Feb 9 02:27:33 2015 New Revision: 278430 URL: https://svnweb.freebsd.org/changeset/base/278430 Log: Remove unused variables Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Feb 9 02:17:21 2015 (r278429) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Feb 9 02:27:33 2015 (r278430) @@ -252,7 +252,6 @@ VCHIQ_STATUS_T vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, void *offset, int size, int dir) { - PAGELIST_T *pagelist; BULKINFO_T *bi; int ret; @@ -518,7 +517,6 @@ free_pagelist(BULKINFO_T *bi, int actual { vm_page_t*pages; unsigned int num_pages, i; - void *page_address; PAGELIST_T *pagelist; pagelist = bi->pagelist; Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Feb 9 02:17:21 2015 (r278429) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Feb 9 02:27:33 2015 (r278430) @@ -2387,7 +2387,6 @@ vchiq_release_internal(VCHIQ_STATE_T *st VCHIQ_STATUS_T ret = VCHIQ_SUCCESS; char entity[16]; int *entity_uc; - int local_uc, local_entity_uc; if (!arm_state) goto out; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:31:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7558C7AF; Mon, 9 Feb 2015 02:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 614722B6; Mon, 9 Feb 2015 02:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192VSFs060752; Mon, 9 Feb 2015 02:31:28 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192VS6C060751; Mon, 9 Feb 2015 02:31:28 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502090231.t192VS6C060751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 9 Feb 2015 02:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:31:28 -0000 Author: gonzo Date: Mon Feb 9 02:31:27 2015 New Revision: 278431 URL: https://svnweb.freebsd.org/changeset/base/278431 Log: Do not mark shared structures as __packed, it leads to race condition If structure packed as __packed clang (and probably gcc) generates code that loads word fields (e.g. tx_pos) byte-by-byte and if it's modified by VideoCore in the same time as ARM loads the value result is going to be mixed combination of bytes from previous value and new one. Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Feb 9 02:27:33 2015 (r278430) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Feb 9 02:31:27 2015 (r278431) @@ -280,7 +280,7 @@ typedef struct vchiq_slot_info_struct { /* Use two counters rather than one to avoid the need for a mutex. */ short use_count; short release_count; -} __packed VCHIQ_SLOT_INFO_T; /* XXXGONZO: check it */ +} VCHIQ_SLOT_INFO_T; typedef struct vchiq_service_struct { VCHIQ_SERVICE_BASE_T base; @@ -381,7 +381,7 @@ typedef struct vchiq_shared_state_struct /* Debugging state */ int debug[DEBUG_MAX]; -} __packed VCHIQ_SHARED_STATE_T; +} VCHIQ_SHARED_STATE_T; typedef struct vchiq_slot_zero_struct { int magic; @@ -395,7 +395,7 @@ typedef struct vchiq_slot_zero_struct { VCHIQ_SHARED_STATE_T master; VCHIQ_SHARED_STATE_T slave; VCHIQ_SLOT_INFO_T slots[VCHIQ_MAX_SLOTS]; -} __packed VCHIQ_SLOT_ZERO_T; +} VCHIQ_SLOT_ZERO_T; struct vchiq_state_struct { int id; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 02:49:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02842A7E; Mon, 9 Feb 2015 02:49:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4FA33CC; Mon, 9 Feb 2015 02:49:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t192nBJZ066693; Mon, 9 Feb 2015 02:49:11 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192nBIa066691; Mon, 9 Feb 2015 02:49:11 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502090249.t192nBIa066691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 02:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278432 - in stable/10/sys/arm/ti: . am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:49:12 -0000 Author: rpaulo Date: Mon Feb 9 02:49:10 2015 New Revision: 278432 URL: https://svnweb.freebsd.org/changeset/base/278432 Log: MFC r277958, r278061: ti_pruss: make sure the mmap'ed memory region is uncacheable. am335x_clk_pruss_activate(): use the L3F clock. Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/ti_pruss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:49:10 2015 (r278432) @@ -502,7 +502,7 @@ am335x_clk_gpio_activate(struct ti_clock /* set *_CLKCTRL register MODULEMODE[1:0] to enable(2) */ /* set *_CLKCTRL register OPTFCLKEN_GPIO_1_G DBCLK[18] to FCLK_EN(1) */ prcm_write_4(clk_details->clkctrl_reg, 2 | (1 << 18)); - while ((prcm_read_4(clk_details->clkctrl_reg) & + while ((prcm_read_4(clk_details->clkctrl_reg) & (3 | (1 << 18) )) != (2 | (1 << 18))) DELAY(10); @@ -724,11 +724,11 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x4); /* Make sure it's in bypass mode */ - while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 8))) DELAY(10); - /* + /* * For now set frequency to 5xSYSFREQ * More flexible control might be required */ @@ -738,7 +738,7 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7); int timeout = 10000; - while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 0))) && timeout--) DELAY(10); @@ -786,9 +786,9 @@ am335x_clk_pruss_activate(struct ti_cloc while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<6)) == 0) DELAY(10); - /* Select DISP DPLL as OCP clock */ - prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 1); - while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 1) + /* Select L3F as OCP clock */ + prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 0); + while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 0) DELAY(10); /* Clear the RESET bit */ Modified: stable/10/sys/arm/ti/ti_pruss.c ============================================================================== --- stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:49:10 2015 (r278432) @@ -259,6 +259,7 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooff if (offset > rman_get_size(sc->sc_mem_res)) return (-1); *paddr = rman_get_start(sc->sc_mem_res) + offset; + *memattr = VM_MEMATTR_UNCACHEABLE; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 06:00:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 325864D2; Mon, 9 Feb 2015 06:00:59 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id E9ACAAD2; Mon, 9 Feb 2015 06:00:58 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 13BDA784423; Mon, 9 Feb 2015 17:00:50 +1100 (AEDT) Date: Mon, 9 Feb 2015 17:00:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Oleksandr Tymoshenko Subject: Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm In-Reply-To: <201502090231.t192VS6C060751@svn.freebsd.org> Message-ID: <20150209170045.S1037@besplex.bde.org> References: <201502090231.t192VS6C060751@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=j7Id98u7Vm7jTOBlUM4A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 06:00:59 -0000 On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: > Log: > Do not mark shared structures as __packed, it leads to race condition > > If structure packed as __packed clang (and probably gcc) generates > code that loads word fields (e.g. tx_pos) byte-by-byte and if it's > modified by VideoCore in the same time as ARM loads the value result > is going to be mixed combination of bytes from previous value and > new one. Most uses of __packed are bugs. It gives pessimizations as well as non-atomic accesses for sub-object accesses. I think the full bugs only occur when arch has strict alignment requirements and the alignment of the __packed objects is not known. This means that only lesser bugs occur on x86 (unless you enable alignment checking, but this arguably breaks the ABI). The compiler just generates possibly-misaligned full-width accesses if the arch doesn't have strict alignment requirements. Often the acceses turn out to be aligned at runtime. Otherwise, the hardware does them atomically, with a smaller efficiency penalty than split accesses. Many packed structs should also be declared as __aligned(N). This is rarely done. Old networking code in uses __packed just once, and this also uses __aligned(4) (for struct ip) Newer networking code in (for ipv6) is massively pessimized, with __packed used extensively and __aligned(N) never used with __packed. sctp is worse. It uses its own macro that defeats grepping for __packed. It has 82 instances of this in where ipv6 has only 34. Newer networking should need __packed less than old ones, since no one would misdesign a data struct so that it needs packing now. gcc documents the -Wpacked flag for finding some cases of bogus packing. It is rarely used. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 06:20:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D644D73D; Mon, 9 Feb 2015 06:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDE23C3D; Mon, 9 Feb 2015 06:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t196KZwO040707; Mon, 9 Feb 2015 06:20:35 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t196KZSk040702; Mon, 9 Feb 2015 06:20:35 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502090620.t196KZSk040702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 06:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 06:20:35 -0000 Author: rpaulo Date: Mon Feb 9 06:20:34 2015 New Revision: 278433 URL: https://svnweb.freebsd.org/changeset/base/278433 Log: Merge xz 5.2.0. This brings support for multi-threaded compression. This brings close N times faster compression where N is the number of CPU cores. Because of this, liblzma now depends on libthr. Soon libarchive will be modified to use the new lzma API. Thanks to antoine@ for the exp-run. Differential Revision: https://reviews.freebsd.org/D1786 Reviewed by: bapt Added: head/contrib/xz/src/liblzma/api/lzma/lzma12.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/api/lzma/lzma12.h head/contrib/xz/src/liblzma/common/block_buffer_encoder.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/block_buffer_encoder.h head/contrib/xz/src/liblzma/common/hardware_cputhreads.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/hardware_cputhreads.c head/contrib/xz/src/liblzma/common/memcmplen.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/memcmplen.h head/contrib/xz/src/liblzma/common/outqueue.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/outqueue.c head/contrib/xz/src/liblzma/common/outqueue.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/outqueue.h head/contrib/xz/src/liblzma/common/stream_encoder_mt.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/stream_encoder_mt.c head/contrib/xz/src/liblzma/liblzma.map - copied unchanged from r278308, vendor/xz/dist/src/liblzma/liblzma.map head/contrib/xz/src/liblzma/validate_map.sh - copied unchanged from r278308, vendor/xz/dist/src/liblzma/validate_map.sh head/contrib/xz/src/xz/mytime.c - copied unchanged from r278308, vendor/xz/dist/src/xz/mytime.c head/contrib/xz/src/xz/mytime.h - copied unchanged from r278308, vendor/xz/dist/src/xz/mytime.h Deleted: head/contrib/xz/src/liblzma/api/lzma/lzma.h head/contrib/xz/src/liblzma/common/stream_encoder.h Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/xz/ChangeLog head/contrib/xz/THANKS head/contrib/xz/TODO head/contrib/xz/src/common/mythread.h head/contrib/xz/src/common/sysdefs.h head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_physmem.c head/contrib/xz/src/liblzma/api/lzma.h head/contrib/xz/src/liblzma/api/lzma/base.h head/contrib/xz/src/liblzma/api/lzma/block.h head/contrib/xz/src/liblzma/api/lzma/container.h head/contrib/xz/src/liblzma/api/lzma/filter.h head/contrib/xz/src/liblzma/api/lzma/hardware.h head/contrib/xz/src/liblzma/api/lzma/index.h head/contrib/xz/src/liblzma/api/lzma/index_hash.h head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/check/check.h head/contrib/xz/src/liblzma/check/sha256.c head/contrib/xz/src/liblzma/common/alone_decoder.c head/contrib/xz/src/liblzma/common/alone_decoder.h head/contrib/xz/src/liblzma/common/alone_encoder.c head/contrib/xz/src/liblzma/common/auto_decoder.c head/contrib/xz/src/liblzma/common/block_buffer_decoder.c head/contrib/xz/src/liblzma/common/block_buffer_encoder.c head/contrib/xz/src/liblzma/common/block_decoder.c head/contrib/xz/src/liblzma/common/block_decoder.h head/contrib/xz/src/liblzma/common/block_encoder.c head/contrib/xz/src/liblzma/common/block_encoder.h head/contrib/xz/src/liblzma/common/block_header_decoder.c head/contrib/xz/src/liblzma/common/block_header_encoder.c head/contrib/xz/src/liblzma/common/block_util.c head/contrib/xz/src/liblzma/common/common.c head/contrib/xz/src/liblzma/common/common.h head/contrib/xz/src/liblzma/common/easy_buffer_encoder.c head/contrib/xz/src/liblzma/common/easy_encoder.c head/contrib/xz/src/liblzma/common/filter_buffer_decoder.c head/contrib/xz/src/liblzma/common/filter_buffer_encoder.c head/contrib/xz/src/liblzma/common/filter_common.c head/contrib/xz/src/liblzma/common/filter_common.h head/contrib/xz/src/liblzma/common/filter_decoder.c head/contrib/xz/src/liblzma/common/filter_decoder.h head/contrib/xz/src/liblzma/common/filter_encoder.c head/contrib/xz/src/liblzma/common/filter_encoder.h head/contrib/xz/src/liblzma/common/filter_flags_decoder.c head/contrib/xz/src/liblzma/common/index.c head/contrib/xz/src/liblzma/common/index_decoder.c head/contrib/xz/src/liblzma/common/index_encoder.c head/contrib/xz/src/liblzma/common/index_encoder.h head/contrib/xz/src/liblzma/common/index_hash.c head/contrib/xz/src/liblzma/common/stream_buffer_decoder.c head/contrib/xz/src/liblzma/common/stream_buffer_encoder.c head/contrib/xz/src/liblzma/common/stream_decoder.c head/contrib/xz/src/liblzma/common/stream_decoder.h head/contrib/xz/src/liblzma/common/stream_encoder.c head/contrib/xz/src/liblzma/delta/delta_common.c head/contrib/xz/src/liblzma/delta/delta_decoder.c head/contrib/xz/src/liblzma/delta/delta_decoder.h head/contrib/xz/src/liblzma/delta/delta_encoder.c head/contrib/xz/src/liblzma/delta/delta_encoder.h head/contrib/xz/src/liblzma/delta/delta_private.h head/contrib/xz/src/liblzma/liblzma.pc.in head/contrib/xz/src/liblzma/lz/lz_decoder.c head/contrib/xz/src/liblzma/lz/lz_decoder.h head/contrib/xz/src/liblzma/lz/lz_encoder.c head/contrib/xz/src/liblzma/lz/lz_encoder.h head/contrib/xz/src/liblzma/lz/lz_encoder_mf.c head/contrib/xz/src/liblzma/lzma/fastpos.h head/contrib/xz/src/liblzma/lzma/lzma2_decoder.c head/contrib/xz/src/liblzma/lzma/lzma2_decoder.h head/contrib/xz/src/liblzma/lzma/lzma2_encoder.c head/contrib/xz/src/liblzma/lzma/lzma2_encoder.h head/contrib/xz/src/liblzma/lzma/lzma_common.h head/contrib/xz/src/liblzma/lzma/lzma_decoder.c head/contrib/xz/src/liblzma/lzma/lzma_decoder.h head/contrib/xz/src/liblzma/lzma/lzma_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder.h head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h head/contrib/xz/src/liblzma/rangecoder/range_decoder.h head/contrib/xz/src/liblzma/simple/arm.c head/contrib/xz/src/liblzma/simple/armthumb.c head/contrib/xz/src/liblzma/simple/ia64.c head/contrib/xz/src/liblzma/simple/powerpc.c head/contrib/xz/src/liblzma/simple/simple_coder.c head/contrib/xz/src/liblzma/simple/simple_coder.h head/contrib/xz/src/liblzma/simple/simple_decoder.c head/contrib/xz/src/liblzma/simple/simple_decoder.h head/contrib/xz/src/liblzma/simple/simple_private.h head/contrib/xz/src/liblzma/simple/sparc.c head/contrib/xz/src/liblzma/simple/x86.c head/contrib/xz/src/xz/args.c head/contrib/xz/src/xz/args.h head/contrib/xz/src/xz/coder.c head/contrib/xz/src/xz/coder.h head/contrib/xz/src/xz/file_io.c head/contrib/xz/src/xz/file_io.h head/contrib/xz/src/xz/hardware.c head/contrib/xz/src/xz/hardware.h head/contrib/xz/src/xz/list.c head/contrib/xz/src/xz/main.c head/contrib/xz/src/xz/message.c head/contrib/xz/src/xz/options.c head/contrib/xz/src/xz/private.h head/contrib/xz/src/xz/signals.c head/contrib/xz/src/xz/suffix.c head/contrib/xz/src/xz/xz.1 head/lib/Makefile head/lib/liblzma/Makefile head/lib/liblzma/Symbol.map head/lib/liblzma/Versions.def head/lib/liblzma/config.h head/rescue/rescue/Makefile head/share/mk/src.libnames.mk head/usr.bin/xz/Makefile Directory Properties: head/contrib/xz/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Feb 9 02:49:10 2015 (r278432) +++ head/Makefile.inc1 Mon Feb 9 06:20:34 2015 (r278433) @@ -1671,6 +1671,7 @@ _lib_libcapsicum=lib/libcapsicum lib/libcapsicum__L: lib/libnv__L lib/libpjdlog__L: lib/libutil__L +lib/liblzma__L: lib/libthr__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} .for _DIR in ${LOCAL_LIB_DIRS} Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 9 02:49:10 2015 (r278432) +++ head/ObsoleteFiles.inc Mon Feb 9 06:20:34 2015 (r278433) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150209: liblzma header +OLD_FILES+=usr/include/lzma/lzma.h # 20150124: spl.9 and friends OLD_FILES+=usr/share/man/man9/spl.9 OLD_FILES+=usr/share/man/man9/spl0.9 Modified: head/contrib/xz/ChangeLog ============================================================================== --- head/contrib/xz/ChangeLog Mon Feb 9 02:49:10 2015 (r278432) +++ head/contrib/xz/ChangeLog Mon Feb 9 06:20:34 2015 (r278433) @@ -1,66 +1,923 @@ -commit 495aaf3a5b7200a5d2bf449bbbcc0e18834607af +commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a Author: Lasse Collin -Date: 2014-09-20 20:44:32 +0300 +Date: 2014-12-21 20:48:37 +0200 - Bump version and soname for 5.0.7. + DOS: Update Makefile. + + dos/Makefile | 1 + + 1 file changed, 1 insertion(+) + +commit b85ee0905ec4ab7656d22e63519fdd3bedb21f2e +Author: Lasse Collin +Date: 2014-12-21 19:50:38 +0200 + + Windows: Fix bin_i486 to bin_i686 in build.bash. + + windows/build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit cbafa710918195dbba3db02c3fab4f0538235206 +Author: Lasse Collin +Date: 2014-12-21 18:58:44 +0200 + + Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c. + + doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++---- + 1 file changed, 26 insertions(+), 4 deletions(-) + +commit 8dbb57238d372c7263cfeb3e7f7fd9a73173156a +Author: Lasse Collin +Date: 2014-12-21 18:56:44 +0200 + + Docs: Update docs/examples/00_README.txt. + + doc/examples/00_README.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6 +Author: Lasse Collin +Date: 2014-12-21 18:11:17 +0200 + + Bump version and soname for 5.2.0. + + I know that soname != app version, but I skip AGE=1 + in -version-info to make the soname match the liblzma + version anyway. It doesn't hurt anything as long as + it doesn't conflict with library versioning rules. src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/liblzma/api/lzma/version.h | 6 +++--- + src/liblzma/liblzma.map | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +commit 3e8bd1d15e417f2d588e9be50ce027ee3d48b2da +Author: Lasse Collin +Date: 2014-12-21 18:05:03 +0200 + + Avoid variable-length arrays in the debug programs. + + debug/full_flush.c | 3 ++- + debug/sync_flush.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +commit 72f7307cfdceb941aeb2bf30d424cc0d13621786 +Author: Lasse Collin +Date: 2014-12-21 18:01:45 +0200 + + Build: Include 04_compress_easy_mt.c in the tarball. + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit 2cb82ff21c62def11f3683a8bb0aaf363102aaa0 +Author: Lasse Collin +Date: 2014-12-21 18:00:38 +0200 + + Fix build when --disable-threads is used. + + src/common/mythread.h | 2 ++ + 1 file changed, 2 insertions(+) + +commit 9b9e3536e458ef958f66b0e8982efc9d36de4d17 +Author: Adrien Nader +Date: 2014-12-21 15:56:15 +0100 + + po/fr: improve wording for help for --lzma1/--lzma2. + + po/fr.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a8b6b569e7fadbf5b5b9139d53bc764015c15027 +Author: Adrien Nader +Date: 2014-12-21 15:55:48 +0100 + + po/fr: missing line in translation of --extreme. + + po/fr.po | 1 + + 1 file changed, 1 insertion(+) + +commit f168a6fd1a888cf4f0caaddcafcb21dadc6ab6e9 +Author: Lasse Collin +Date: 2014-12-21 14:32:33 +0200 + + Update NEWS for 5.2.0. + + NEWS | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +commit cec2ee863b3a88f4bf039cb00f73c4a4fc93a429 +Author: Lasse Collin +Date: 2014-12-21 14:32:22 +0200 + + Update NEWS for 5.0.8. + + NEWS | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 42e97a32649bf53ce43be2258b902a417c6e7fa1 +Author: Lasse Collin +Date: 2014-12-21 14:07:54 +0200 + + xz: Fix a comment. + + src/xz/options.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 29b95d5d6665cedffa6a9d6d3d914f981e852182 +Author: Lasse Collin +Date: 2014-12-20 20:43:14 +0200 + + Update INSTALL about the dependencies of the scripts. + + INSTALL | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +commit 3af91040bb42c21afbb81f5568c3313125e61192 +Author: Lasse Collin +Date: 2014-12-20 20:42:33 +0200 + + Windows: Update build instructions. + + INSTALL | 15 +++++++++------ + windows/INSTALL-Windows.txt | 44 +++++++++++++++++++++----------------------- + 2 files changed, 30 insertions(+), 29 deletions(-) + +commit 0152f72bf6289d744823dc6c849538f3a139ad70 +Author: Lasse Collin +Date: 2014-12-20 20:41:48 +0200 + + Windows: Update the build script and README-Windows.txt. + + The 32-bit build is now for i686 or newer because the + prebuilt MinGW-w64 toolchains include i686 code in the + executables even if one uses -march=i486. + + The build script builds 32-bit SSE2 enabled version too. + Run-time detection of SSE2 support would be nice (on any OS) + but it's not implemented in XZ Utils yet. + + windows/README-Windows.txt | 30 ++++++++++++++++-------------- + windows/build.bash | 23 ++++++++++++++--------- + 2 files changed, 30 insertions(+), 23 deletions(-) + +commit 4a1f6133ee5533cee8d91e06fcc22443e5f1881a +Author: Lasse Collin +Date: 2014-12-19 15:51:50 +0200 + + Windows: Define TUKLIB_SYMBOL_PREFIX in config.h. + + It is to keep all symbols in the lzma_ namespace. + + windows/config.h | 3 +++ + 1 file changed, 3 insertions(+) + +commit 7f7d093de79eee0c7dbfd7433647e46302f19f82 +Author: Lasse Collin +Date: 2014-12-16 21:00:09 +0200 + + xz: Update the man page about --threads. + + src/xz/xz.1 | 5 ----- + 1 file changed, 5 deletions(-) + +commit 009823448b82aa5f465668878a544c5842885407 +Author: Lasse Collin +Date: 2014-12-16 20:57:43 +0200 + + xz: Update the man page about --block-size. + + src/xz/xz.1 | 41 +++++++++++++++++++++++++++++++++-------- + 1 file changed, 33 insertions(+), 8 deletions(-) + +commit 7dddfbeb499e528940bc12047355c184644aafe9 +Author: Adrien Nader +Date: 2014-12-10 22:26:57 +0100 + + po/fr: several more translation updates: reword and handle --ignore-check. + + po/fr.po | 50 ++++++++++++++++++++++++++------------------------ + 1 file changed, 26 insertions(+), 24 deletions(-) + +commit 6eca5be40e04ddc4b738d493e4e56835956d8b69 +Author: Adrien Nader +Date: 2014-12-10 22:23:01 +0100 + + po/fr: yet another place where my email address had to be updated. + + po/fr.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d1003673e92ba47edd6aeeb3dbea05c18269d0e7 +Author: Adrien Nader +Date: 2014-12-10 22:22:20 +0100 + + po/fr: fix several typos that have been around since the beginning. + + po/fr.po | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit 4c5aa911a0df027e46171e368debc543d2fa72b2 +Author: Adrien Nader +Date: 2014-12-03 20:02:31 +0100 + + po/fr: last batch of new translations for now. + + Four new error messages. + + po/fr.po | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 3e3099e36d27059499e7996fb38a62e8ab01d356 +Author: Adrien Nader +Date: 2014-12-03 20:01:32 +0100 + + po/fr: translations for --threads, --block-size and --block-list. + + po/fr.po | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit e7d96a5933eec4e9d4a62569ee88df0ebb0f1d53 +Author: Adrien Nader +Date: 2014-12-03 20:00:53 +0100 + + po/fr: remove fuzzy marker for error messages that will be kept in English. + + The following is a copy of a comment inside fr.po: + + Note from translator on "file status flags". + The following entry is kept un-translated on purpose. It is difficult to + translate and should only happen in exceptional circumstances which means + that translating would: + - lose some of the meaning + - make it more difficult to look up in search engines; it might happen one + in + a million times, if we dilute the error message in 20 languages, it will be + almost impossible to find an explanation and support for the error. + + po/fr.po | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +commit 46cbb9033af8a21fafe543302d6919746e0d72af +Author: Adrien Nader +Date: 2014-12-03 19:58:25 +0100 + + po/fr: several minor updates and better wording. + + Meaning doesn't change at all: it's only for better wording and/or + formatting of a few strings. + + po/fr.po | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 7ce49d444f04e73145f79c832eb4d510594b074a +Author: Adrien Nader +Date: 2014-12-03 19:56:12 +0100 + + po/fr: update my email address and copyright years. + + po/fr.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 214c553ebc3047cd720da1ce5c80cf7c38118d3c +Author: Adrien Nader +Date: 2014-11-26 10:08:26 +0100 + + fr.po: commit file after only "update-po" so actual is readable. + + po/fr.po | 311 ++++++++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 199 insertions(+), 112 deletions(-) + +commit 1190c641af09cde85f8bd0fbe5c4906f4a29431b +Author: Lasse Collin +Date: 2014-12-02 20:04:07 +0200 + + liblzma: Document how lzma_mt.block_size affects memory usage. + + src/liblzma/api/lzma/container.h | 4 ++++ + 1 file changed, 4 insertions(+) + +commit e4fc1d2f9571fba79ce383595be2ea2a9257def0 +Author: Lasse Collin +Date: 2014-11-28 20:07:18 +0200 + + Update INSTALL about a "make check" failure in test_scripts.sh. + + INSTALL | 24 +++++++++++++++++------- + 1 file changed, 17 insertions(+), 7 deletions(-) + +commit 34f9e40a0a0c3bd2c2730cdb9cd550bbb8a3f2fe +Author: Lasse Collin +Date: 2014-11-26 20:12:27 +0200 + + Remove LZMA_UNSTABLE macro. + + src/liblzma/api/lzma/container.h | 4 ---- + src/liblzma/common/common.h | 2 -- + src/xz/private.h | 1 - + 3 files changed, 7 deletions(-) + +commit 6d9c0ce9f2677b159e32b224aba5b535b304a705 +Author: Lasse Collin +Date: 2014-11-26 20:10:33 +0200 + + liblzma: Update lzma_stream_encoder_mt() API docs. + + src/liblzma/api/lzma/container.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 2301f3f05dd9742f42cda8f0f318864f5dc39ab3 +Author: Lasse Collin +Date: 2014-11-25 12:32:05 +0200 + + liblzma: Verify the filter chain in threaded encoder initialization. + + This way an invalid filter chain is detected at the Stream + encoder initialization instead of delaying it to the first + call to lzma_code() which triggers the initialization of + the actual filter encoder(s). + + src/liblzma/common/stream_encoder_mt.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 107a263d5bb63cd3593fd6a5c938706539f84523 +Author: Lasse Collin +Date: 2014-11-17 19:11:49 +0200 + + Build: Update m4/ax_pthread.m4 from Autoconf Archive. + + m4/ax_pthread.m4 | 71 +++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 47 insertions(+), 24 deletions(-) + +commit b13a781833399ff5726cfc997f3cb2f0acbdbf31 +Author: Lasse Collin +Date: 2014-11-17 18:52:21 +0200 + + Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING. + + configure.ac | 36 ++++++++++++++++++------------------ + m4/tuklib_integer.m4 | 2 +- + 2 files changed, 19 insertions(+), 19 deletions(-) + +commit 542cac122ed3550148a2af0033af22b757491378 +Author: Lasse Collin +Date: 2014-11-17 18:43:19 +0200 + + Build: Fix Autoconf warnings about escaped backquotes. + + Thanks to Daniel Richard G. for pointing out that it's + good to sometimes run autoreconf -fi with -Wall. + + configure.ac | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit 7b03a15cea8cd4f19ed680b51c4bcbae3ce4142f +Author: Lasse Collin +Date: 2014-11-10 18:54:40 +0200 + + xzdiff: Use mkdir if mktemp isn't available. + + src/scripts/xzdiff.in | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +commit f8c13e5e3609581d5dd9f8777985ca07f2390ad7 +Author: Lasse Collin +Date: 2014-11-10 18:45:01 +0200 + + xzdiff: Create a temporary directory to hold a temporary file. + + This avoids the possibility of "File name too long" when + creating a temp file when the input file name is very long. + + This also means that other users on the system can no longer + see the input file names in /tmp (or whatever $TMPDIR is) + since the temporary directory will have a generic name. This + usually doesn't matter since on many systems one can see + the arguments given to all processes anyway. + + The number X chars to mktemp where increased from 6 to 10. + + Note that with some shells temp files or dirs won't be used at all. + + src/scripts/xzdiff.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 7716dcf9df7f457500cb657314e7a9aea5fedb06 +Author: Lasse Collin +Date: 2014-11-10 15:38:47 +0200 + + liblzma: Fix lzma_mt.preset in lzma_stream_encoder_mt_memusage(). + + It read the filter chain from a wrong variable. This is a similar + bug that was fixed in 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e. + + src/liblzma/common/stream_encoder_mt.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 230fa4a605542c84b4178a57381695a0af4e779b +Author: Lasse Collin +Date: 2014-11-10 14:49:55 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 4e4ae08bc7c1711e399c9f2d26eb375d39d08101 +Author: Lasse Collin +Date: 2014-10-29 21:28:25 +0200 + + Update .gitignore files. + + .gitignore | 2 ++ + m4/.gitignore | 3 +++ + 2 files changed, 5 insertions(+) + +commit c923b140b27d1a055db6284e10fd546ad1a7fcdb +Author: Lasse Collin +Date: 2014-10-29 21:15:35 +0200 + + Build: Prepare to support Automake's subdir-objects. + + Due to a bug in Automake, subdir-objects won't be enabled + for now. + + http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354 + + Thanks to Daniel Richard G. for the original patches. + + configure.ac | 7 ++++++- + src/Makefile.am | 22 +++++++++++++++++++++- + src/liblzma/Makefile.am | 4 ++-- + src/lzmainfo/Makefile.am | 4 ++-- + src/xz/Makefile.am | 10 +++++----- + src/xzdec/Makefile.am | 8 ++++---- + 6 files changed, 40 insertions(+), 15 deletions(-) + +commit 08c2aa16bea0df82828f665d51fba2e0a5e8997f +Author: Lasse Collin +Date: 2014-10-24 20:09:29 +0300 + + Translations: Update the Italian translation. + + Thanks to Milo Casagrande. + + po/it.po | 452 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 275 insertions(+), 177 deletions(-) + +commit 2f9f61aa83539c54ff6c118a2693890f0519b3dd +Author: Lasse Collin +Date: 2014-10-18 18:51:45 +0300 + + Translations: Update the Polish translation. + + Thanks to Jakub Bogusz. + + po/pl.po | 332 ++++++++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 214 insertions(+), 118 deletions(-) + +commit 4f9d233f67aea25e532824d11b7642cf7dee7a76 +Author: Andre Noll +Date: 2014-10-14 17:30:30 +0200 + + l10n: de.po: Change translator email address. + + Although the old address is still working, the new one should + be preferred. So this commit changes all three places in de.po + accordingly. + + Signed-off-by: Andre Noll + + po/de.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 00502b2bedad43f0cc167ac17ae0608837ee196b +Author: Andre Noll +Date: 2014-10-14 17:30:29 +0200 + + l10n: de.po: Update German translation + + Signed-off-by: Andre Noll + + po/de.po | 531 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 281 insertions(+), 250 deletions(-) + +commit 706b0496753fb609e69f1570ec603f11162189d1 +Author: Andre Noll +Date: 2014-10-14 17:30:28 +0200 + + l10n: de.po: Fix typo: Schießen -> Schließen. + + That's a funny one since "schießen" means to shoot :) + + Signed-off-by: Andre Noll + + po/de.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7c32e6a935c3d7ee366abad1679bd5f322f0c7d4 +Author: Lasse Collin +Date: 2014-10-09 19:42:26 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 076258cc458f1e705041ac7a729b15ffe8c5214a +Author: Lasse Collin +Date: 2014-10-09 19:41:51 +0300 + + Add support for AmigaOS/AROS to tuklib_physmem(). + + Thanks to Fredrik Wikstrom. + + m4/tuklib_physmem.m4 | 3 ++- + src/common/tuklib_physmem.c | 7 +++++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +commit efa7b0a210e1baa8e128fc98c5443a944c39ad24 +Author: Lasse Collin +Date: 2014-10-09 18:42:14 +0300 + + xzgrep: Avoid passing both -q and -l to grep. + + The behavior of grep -ql varies: + - GNU grep behaves like grep -q. + - OpenBSD grep behaves like grep -l. + + POSIX doesn't make it 100 % clear what behavior is expected. + Anyway, using both -q and -l at the same time makes no sense + so both options simply should never be used at the same time. + + Thanks to Christian Weisgerber. + + src/scripts/xzgrep.in | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 9c5f76098c9986b48d2fc574a0b764f4cde0c538 +Author: Trần Ngá»c Quân +Date: 2014-09-25 09:22:45 +0700 + + l10n: vi.po: Update Vietnamese translation + + Signed-off-by: Trần Ngá»c Quân + + po/vi.po | 136 +++++++++++++++++++++++++++++++++++++++------------------------ + 1 file changed, 84 insertions(+), 52 deletions(-) + +commit c4911f2db36d811896c73c008b4218d8fa9a4730 +Author: Lasse Collin +Date: 2014-09-25 18:38:48 +0300 + + Build: Detect supported compiler warning flags better. + + Clang and nowadays also GCC accept any -Wfoobar option + but then may give a warning that an unknown warning option + was specified. To avoid adding unsupported warning options, + the options are now tested with -Werror. + + Thanks to Charles Diza. + + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 76e75522ed6f5c228d55587dee5a997893f6e474 +Author: Lasse Collin +Date: 2014-09-20 21:01:21 +0300 + + Update NEWS for 5.0.7. + + NEWS | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit d62028b4c1174fc67b6929f126f5eb24c018c700 +Author: Lasse Collin +Date: 2014-09-20 19:42:56 +0300 + + liblzma: Fix a portability problem in Makefile.am. + + POSIX supports $< only in inference rules (suffix rules). + Using it elsewhere is a GNU make extension and doesn't + work e.g. with OpenBSD make. + + Thanks to Christian Weisgerber for the patch. + + src/liblzma/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c35de31d4283edad3e57d37ffe939406542cb7bb +Author: Lasse Collin +Date: 2014-09-14 21:54:09 +0300 + + Bump the version number to 5.1.4beta. + + src/liblzma/api/lzma/version.h | 4 ++-- + src/liblzma/liblzma.map | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit e9e097e22cacdaa23e5414fea7913535449cb340 +Author: Lasse Collin +Date: 2014-09-14 21:50:13 +0300 + + Update NEWS for 5.0.6 and 5.1.4beta. + + NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +commit 642f856bb8562ab66704b1e01ac7bc08b6d0a663 +Author: Lasse Collin +Date: 2014-09-14 21:02:41 +0300 + + Update TODO. + + TODO | 38 ++++++++++++++++++++++++++++++++++---- + 1 file changed, 34 insertions(+), 4 deletions(-) + +commit 6b5e3b9eff5b8cedb2aac5f524d4d60fc8a48124 +Author: Lasse Collin +Date: 2014-08-05 22:32:36 +0300 + + xz: Add --ignore-check. + + src/xz/args.c | 7 +++++++ + src/xz/args.h | 1 + + src/xz/coder.c | 10 +++++++++- + src/xz/message.c | 2 ++ + src/xz/xz.1 | 19 +++++++++++++++++++ + 5 files changed, 38 insertions(+), 1 deletion(-) + +commit 9adbc2ff373f979c917cdfd3679ce0ebd59f1040 +Author: Lasse Collin +Date: 2014-08-05 22:15:07 +0300 + + liblzma: Add support for LZMA_IGNORE_CHECK. + + src/liblzma/api/lzma/container.h | 24 ++++++++++++++++++++++++ + src/liblzma/common/common.h | 1 + + src/liblzma/common/stream_decoder.c | 14 ++++++++++++-- + 3 files changed, 37 insertions(+), 2 deletions(-) + +commit 0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6 +Author: Lasse Collin +Date: 2014-08-05 22:03:30 +0300 + + liblzma: Add support for lzma_block.ignore_check. + + Note that this slightly changes how lzma_block_header_decode() + has been documented. Earlier it said that the .version is set + to the lowest required value, but now it says that the .version + field is kept unchanged if possible. In practice this doesn't + affect any old code, because before this commit the only + possible .version was 0. + + src/liblzma/api/lzma/block.h | 50 ++++++++++++++++++++++++------- + src/liblzma/common/block_buffer_encoder.c | 2 +- + src/liblzma/common/block_decoder.c | 18 ++++++++--- + src/liblzma/common/block_encoder.c | 2 +- + src/liblzma/common/block_header_decoder.c | 12 ++++++-- + src/liblzma/common/block_header_encoder.c | 2 +- + src/liblzma/common/block_util.c | 2 +- + 7 files changed, 68 insertions(+), 20 deletions(-) + +commit 71e1437ab585b46f7a25f5a131557d3d1c0cbaa2 +Author: Lasse Collin +Date: 2014-08-04 19:25:58 +0300 + + liblzma: Use lzma_memcmplen() in the BT3 match finder. + + I had missed this when writing the commit + 5db75054e900fa06ef5ade5f2c21dffdd5d16141. + + Thanks to Jun I Jin. + + src/liblzma/lz/lz_encoder_mf.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit 41dc9ea06e1414ebe8ef52afc8fc15b6e3282b04 +Author: Lasse Collin +Date: 2014-08-04 00:25:44 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 5dcffdbcc23a68abc3ac3539b30be71bc9b5af84 +Author: Lasse Collin +Date: 2014-08-03 21:32:25 +0300 + + liblzma: SHA-256: Optimize the Maj macro slightly. + + The Maj macro is used where multiple things are added + together, so making Maj a sum of two expressions allows + some extra freedom for the compiler to schedule the + instructions. + + I learned this trick from + . + + src/liblzma/check/sha256.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a9477d1e0c6fd0e47e637d051e7b9e2a5d9af517 +Author: Lasse Collin +Date: 2014-08-03 21:08:12 +0300 + + liblzma: SHA-256: Optimize the way rotations are done. + + This looks weird because the rotations become sequential, + but it helps quite a bit on both 32-bit and 64-bit x86: + + - It requires fewer instructions on two-operand + instruction sets like x86. + + - It requires one register less which matters especially + on 32-bit x86. + + I hope this doesn't hurt other archs. + + I didn't invent this idea myself, but I don't remember where + I saw it first. + + src/liblzma/check/sha256.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +commit 5a76c7c8ee9a0afbeedb1c211db9224260404347 +Author: Lasse Collin +Date: 2014-08-03 20:38:13 +0300 + + liblzma: SHA-256: Remove the GCC #pragma that became unneeded. + + The unrolling in the previous commit should avoid the + situation where a compiler may think that an uninitialized + variable might be accessed. + + src/liblzma/check/sha256.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit 9a096f8e57509775c331950b8351bbca77bdcfa8 +Author: Lasse Collin +Date: 2014-08-03 20:33:38 +0300 + + liblzma: SHA-256: Unroll a little more. + + This way a branch isn't needed for each operation + to choose between blk0 and blk2, and still the code + doesn't grow as much as it would with full unrolling. + + src/liblzma/check/sha256.c | 25 ++++++++++++++++--------- + 1 file changed, 16 insertions(+), 9 deletions(-) + +commit bc7650d87bf27f85f1a2a806dc2db1780e09e6a5 +Author: Lasse Collin +Date: 2014-08-03 19:56:43 +0300 + + liblzma: SHA-256: Do the byteswapping without a temporary buffer. + + src/liblzma/check/sha256.c | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 +Author: Lasse Collin +Date: 2014-07-25 22:38:28 +0300 + + liblzma: Use lzma_memcmplen() in normal mode of LZMA. + + Two locations were not changed yet because the simplest change + assumes that the initial "len" may be greater than "limit". + + src/liblzma/lzma/lzma_encoder_optimum_normal.c | 20 +++++--------------- + 1 file changed, 5 insertions(+), 15 deletions(-) + +commit f48fce093b07aeda95c18850f5e086d9f2383380 +Author: Lasse Collin +Date: 2014-07-25 22:30:38 +0300 + + liblzma: Simplify LZMA fast mode code by using memcmp(). + + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +commit 6bf5308e34e23dede5b301b1b9b4f131dacd9218 +Author: Lasse Collin +Date: 2014-07-25 22:29:49 +0300 + + liblzma: Use lzma_memcmplen() in fast mode of LZMA. + + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 353212137e51e45b105a3a3fc2e6879f1cf0d492 +Author: Lasse Collin +Date: 2014-07-25 21:16:23 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 5db75054e900fa06ef5ade5f2c21dffdd5d16141 +Author: Lasse Collin +Date: 2014-07-25 21:15:07 +0300 + + liblzma: Use lzma_memcmplen() in the match finders. + + This doesn't change the match finder output. + + src/liblzma/lz/lz_encoder.c | 13 ++++++++++++- + src/liblzma/lz/lz_encoder_mf.c | 33 +++++++++++---------------------- + 2 files changed, 23 insertions(+), 23 deletions(-) + +commit e1c8f1d01f4a4e2136173edab2dc63c71ef038f4 +Author: Lasse Collin +Date: 2014-07-25 20:57:20 +0300 + + liblzma: Add lzma_memcmplen() for fast memory comparison. + + This commit just adds the function. Its uses will be in + separate commits. + + This hasn't been tested much yet and it's perhaps a bit early + to commit it but if there are bugs they should get found quite + quickly. + + Thanks to Jun I Jin from Intel for help and for pointing out + that string comparison needs to be optimized in liblzma. + + configure.ac | 13 +++ + src/liblzma/common/Makefile.inc | 1 + + src/liblzma/common/memcmplen.h | 170 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 184 insertions(+) -commit ac6c8921d1d8d2d749d5c97f9a0b0594cc863cea +commit 765735cf52e5123586e74a51b9c073b5257f631f Author: Lasse Collin -Date: 2014-09-20 20:43:29 +0300 +Date: 2014-07-12 21:10:09 +0300 - Update NEWS for 5.0.7. + Update THANKS. - NEWS | 11 +++++++++++ - 1 file changed, 11 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit d1b0276aafd441a3d4db9dfd5dd9880e9f834d49 +commit 59da01785ef66c7e62f36e70ca808fd2824bb995 Author: Lasse Collin -Date: 2014-09-20 20:21:18 +0300 +Date: 2014-07-12 20:06:08 +0300 - liblzma: Fix invalid Libs.private value in liblzma.pc. + Translations: Add Vietnamese translation. + + Thanks to Trần Ngá»c Quân. - src/liblzma/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/LINGUAS | 1 + + po/vi.po | 1007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1008 insertions(+) -commit cac72956b1e56788182ac14bfb25519636afd503 +commit 17215f751c354852700e7f8592ccf319570a0721 Author: Lasse Collin -Date: 2014-09-20 19:42:56 +0300 +Date: 2014-06-29 20:54:14 +0300 - liblzma: Fix a portability problem in Makefile.am. - - POSIX supports $< only in inference rules (suffix rules). - Using it elsewhere is a GNU make extension and doesn't - work e.g. with OpenBSD make. + xz: Update the help message of a few options. - Thanks to Christian Weisgerber for the patch. + Updated: --threads, --block-size, and --block-list + Added: --flush-timeout - src/liblzma/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/message.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) -commit 2cdf0875dedca3e89b02ad5ac8aa1109f902ae11 +commit 96864a6ddf91ad693d102ea165f3d7918744d582 Author: Lasse Collin -Date: 2014-09-14 19:35:45 +0300 +Date: 2014-06-18 22:07:06 +0300 - Bump version and soname for 5.0.6. + xz: Use lzma_cputhreads() instead of own copy of tuklib_cpucores(). - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xz/Makefile.am | 1 - + src/xz/hardware.c | 12 +++++++++--- + 2 files changed, 9 insertions(+), 4 deletions(-) -commit 0168b6c8fbc88cae61b1f5fb41d6c33c9e127967 +commit a115cc3748482e277f42a968baa3cd266f031dba Author: Lasse Collin -Date: 2014-09-14 19:33:46 +0300 +Date: 2014-06-18 22:04:24 +0300 - Update NEWS for 5.0.6. + liblzma: Add lzma_cputhreads(). - NEWS | 7 +++++++ - 1 file changed, 7 insertions(+) + src/liblzma/Makefile.am | 8 +++++++- + src/liblzma/api/lzma/hardware.h | 14 ++++++++++++++ + src/liblzma/common/Makefile.inc | 1 + + src/liblzma/common/hardware_cputhreads.c | 22 ++++++++++++++++++++++ + src/liblzma/liblzma.map | 1 + + 5 files changed, 45 insertions(+), 1 deletion(-) -commit 13337714e89d002af7af48d6853f977de985d7de +commit 3ce3e7976904fbab4e6482bafa442856f77a51fa +Author: Lasse Collin +Date: 2014-06-18 19:11:52 +0300 + + xz: Check for filter chain compatibility for --flush-timeout. + + This avoids LZMA_PROG_ERROR from lzma_code() with filter chains + that don't support LZMA_SYNC_FLUSH. + + src/xz/coder.c | 30 +++++++++++++++++++++--------- + 1 file changed, 21 insertions(+), 9 deletions(-) + +commit 381ac14ed79e5d38809f251705be8b3193bba417 Author: Lasse Collin Date: 2014-06-13 19:21:54 +0300 @@ -69,7 +926,7 @@ Date: 2014-06-13 19:21:54 +0300 tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -commit ccc728d8290c0464c7af62790b1c5528eceaae35 +commit 4244b65b06d5ecaf6f9dd0387ac7e3166bd2364e Author: Lasse Collin Date: 2014-06-13 18:58:22 +0300 @@ -83,7 +940,7 @@ Date: 2014-06-13 18:58:22 +0300 tests/xzgrep_expected_output | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 11 deletions(-) -commit 948f5865fe65061e215baa8ed63be570bae152ea +commit 1e60f2c0a0ee6c18b02943ce56214799a70aac26 Author: Lasse Collin *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 06:23:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 548FA897; Mon, 9 Feb 2015 06:23:23 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26A01CE3; Mon, 9 Feb 2015 06:23:22 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJH00BAZR2T6C20@st11p02mm-asmtp002.mac.com>; Mon, 09 Feb 2015 06:23:20 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_01:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090066 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... From: Rui Paulo In-reply-to: <201502090620.t196KZSk040702@svn.freebsd.org> Date: Sun, 08 Feb 2015 22:23:17 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502090620.t196KZSk040702@svn.freebsd.org> To: Rui Paulo X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 06:23:23 -0000 On Feb 8, 2015, at 22:20, Rui Paulo wrote: >=20 > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 >=20 > Log: > Merge xz 5.2.0. >=20 > This brings support for multi-threaded compression. This brings = close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. Gah, terrible wording. I bet I couldn't repeat the word "this" three = times in a row if I wanted to... -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:08:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D96A11DC; Mon, 9 Feb 2015 07:08:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C561A13C; Mon, 9 Feb 2015 07:08:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1978s8X063074; Mon, 9 Feb 2015 07:08:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1978swm063073; Mon, 9 Feb 2015 07:08:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502090708.t1978swm063073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 07:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278434 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:08:55 -0000 Author: nwhitehorn Date: Mon Feb 9 07:08:54 2015 New Revision: 278434 URL: https://svnweb.freebsd.org/changeset/base/278434 Log: Fix typo in PTE insertion overflow handling: use the page we're actually returning, not the one we just looked at. Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 06:20:34 2015 (r278433) +++ head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 07:08:54 2015 (r278434) @@ -299,7 +299,10 @@ mphyp_pte_spillable_ident(u_int ptegidx, } } - phyp_pft_hcall(H_READ, 0, slot, 0, 0, &to_evict->pte_hi, + if (k == -1) + return (k); + + phyp_pft_hcall(H_READ, 0, k, 0, 0, &to_evict->pte_hi, &to_evict->pte_lo, &junk); return (k); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:45:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68934781; Mon, 9 Feb 2015 07:45:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54200795; Mon, 9 Feb 2015 07:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197jlSh081213; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197jlLL081212; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090745.t197jlLL081212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:45:47 -0000 Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -202,8 +202,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:45:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D113782; Mon, 9 Feb 2015 07:45:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECE1C796; Mon, 9 Feb 2015 07:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197jlp5081219; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197jleb081218; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090745.t197jleb081218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:45:48 -0000 Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -170,8 +170,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:49:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14F6AAB1; Mon, 9 Feb 2015 07:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 008F17D1; Mon, 9 Feb 2015 07:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197nfvD081749; Mon, 9 Feb 2015 07:49:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197nfvI081748; Mon, 9 Feb 2015 07:49:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090749.t197nfvI081748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:49:42 -0000 Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sys/cdefs.h ============================================================================== --- stable/9/sys/sys/cdefs.h Mon Feb 9 07:45:46 2015 (r278435) +++ stable/9/sys/sys/cdefs.h Mon Feb 9 07:49:41 2015 (r278436) @@ -250,7 +250,8 @@ #ifdef __COUNTER__ #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:49:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 885DDAB2; Mon, 9 Feb 2015 07:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7423A7D2; Mon, 9 Feb 2015 07:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197ng1r081756; Mon, 9 Feb 2015 07:49:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197ngK7081755; Mon, 9 Feb 2015 07:49:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090749.t197ngK7081755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:49:42 -0000 Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Mon Feb 9 07:45:46 2015 (r278435) +++ stable/10/sys/sys/cdefs.h Mon Feb 9 07:49:41 2015 (r278436) @@ -289,7 +289,8 @@ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:52:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C3FD31; Mon, 9 Feb 2015 07:52:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3625882; Mon, 9 Feb 2015 07:52:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197qjRH085594; Mon, 9 Feb 2015 07:52:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197qjxK085593; Mon, 9 Feb 2015 07:52:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090752.t197qjxK085593@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:52:46 -0000 Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~~~~~~~~~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~~~~~~~~~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:49:41 2015 (r278436) +++ stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:52:45 2015 (r278437) @@ -1019,7 +1019,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1174,11 +1174,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:52:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B39CD32; Mon, 9 Feb 2015 07:52:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D05D883; Mon, 9 Feb 2015 07:52:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197qkNO085600; Mon, 9 Feb 2015 07:52:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197qkJv085599; Mon, 9 Feb 2015 07:52:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090752.t197qkJv085599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:52:46 -0000 Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~~~~~~~~~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~~~~~~~~~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:49:41 2015 (r278436) +++ stable/10/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:52:45 2015 (r278437) @@ -1020,7 +1020,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1175,11 +1175,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 07:56:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 062AE149; Mon, 9 Feb 2015 07:56:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC83A8B9; Mon, 9 Feb 2015 07:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t197upGT086165; Mon, 9 Feb 2015 07:56:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197upWX086163; Mon, 9 Feb 2015 07:56:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090756.t197upWX086163@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278438 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:56:52 -0000 Author: dim Date: Mon Feb 9 07:56:50 2015 New Revision: 278438 URL: https://svnweb.freebsd.org/changeset/base/278438 Log: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1748 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c ============================================================================== --- head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (const u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (const u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (const u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (const u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: head/sys/dev/drm2/radeon/si.c ============================================================================== --- head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (const u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (const u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (const u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 08:05:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 945294D8; Mon, 9 Feb 2015 08:05:45 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 668F49BD; Mon, 9 Feb 2015 08:05:44 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJH0049SVRON720@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 08:04:40 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_01:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090085 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... From: Rui Paulo In-reply-to: <201502090620.t196KZSk040702@svn.freebsd.org> Date: Mon, 09 Feb 2015 00:04:36 -0800 Content-transfer-encoding: quoted-printable Message-id: <49CF99E3-959F-43CE-B606-78FA5FF998A0@me.com> References: <201502090620.t196KZSk040702@svn.freebsd.org> To: Rui Paulo X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 08:05:45 -0000 On Feb 8, 2015, at 22:20, Rui Paulo wrote: >=20 > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 >=20 > Log: > Merge xz 5.2.0. >=20 > This brings support for multi-threaded compression. This brings = close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. For those that want to try it, this patch adds support to multi-threaded = compression when using lzma in libarchive: https://people.freebsd.org/~rpaulo/libarchive-lzma-mt.diff It uses all the available CPU cores by default. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:03:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A63AF97; Mon, 9 Feb 2015 09:03:21 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1834E61; Mon, 9 Feb 2015 09:03:20 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1993F6W010954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Feb 2015 11:03:15 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1993F6W010954 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1993F1j010953; Mon, 9 Feb 2015 11:03:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 9 Feb 2015 11:03:15 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm Message-ID: <20150209090315.GD42409@kib.kiev.ua> References: <201502090231.t192VS6C060751@svn.freebsd.org> <20150209170045.S1037@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150209170045.S1037@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, Oleksandr Tymoshenko , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:03:21 -0000 On Mon, Feb 09, 2015 at 05:00:49PM +1100, Bruce Evans wrote: > On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: > > > Log: > > Do not mark shared structures as __packed, it leads to race condition > > > > If structure packed as __packed clang (and probably gcc) generates > > code that loads word fields (e.g. tx_pos) byte-by-byte and if it's > > modified by VideoCore in the same time as ARM loads the value result > > is going to be mixed combination of bytes from previous value and > > new one. > > Most uses of __packed are bugs. It gives pessimizations as well as > non-atomic accesses for sub-object accesses. > > I think the full bugs only occur when arch has strict alignment > requirements and the alignment of the __packed objects is not known. > This means that only lesser bugs occur on x86 (unless you enable > alignment checking, but this arguably breaks the ABI). The compiler > just generates possibly-misaligned full-width accesses if the arch > doesn't have strict alignment requirements. Often the acceses turn > out to be aligned at runtime. Otherwise, the hardware does them > atomically, with a smaller efficiency penalty than split accesses. On x86 unaligned access is non-atomic. This was very visible on Core2 CPUs where DPCPU code mishandled the alignment, resulting in the mutexes from the per-cpu areas breaking badly. Modern CPUs should not lock several cache lines simultaneously either. From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:08:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA79226D; Mon, 9 Feb 2015 09:08:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCB1ADE; Mon, 9 Feb 2015 09:08:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1998u7Z019393; Mon, 9 Feb 2015 09:08:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1998ujP019392; Mon, 9 Feb 2015 09:08:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090908.t1998ujP019392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278439 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:08:57 -0000 Author: mav Date: Mon Feb 9 09:08:55 2015 New Revision: 278439 URL: https://svnweb.freebsd.org/changeset/base/278439 Log: MFC r278098, r278099: Add some fields and constants from RFC7144. Modified: stable/10/sys/dev/iscsi/iscsi_proto.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi_proto.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi_proto.h Mon Feb 9 07:56:50 2015 (r278438) +++ stable/10/sys/dev/iscsi/iscsi_proto.h Mon Feb 9 09:08:55 2015 (r278439) @@ -115,7 +115,9 @@ struct iscsi_bhs_scsi_response { uint8_t bhssr_status; uint8_t bhssr_total_ahs_len; uint8_t bhssr_data_segment_len[3]; - uint64_t bhssr_reserved; + uint16_t bhssr_status_qualifier; + uint16_t bhssr_reserved; + uint32_t bhssr_reserved2; uint32_t bhssr_initiator_task_tag; uint32_t bhssr_snack_tag; uint32_t bhssr_statsn; @@ -135,6 +137,10 @@ CTASSERT(sizeof(struct iscsi_bhs_scsi_re #define BHSTMR_FUNCTION_TARGET_WARM_RESET 6 #define BHSTMR_FUNCTION_TARGET_COLD_RESET 7 #define BHSTMR_FUNCTION_TASK_REASSIGN 8 +#define BHSTMR_FUNCTION_QUERY_TASK 9 +#define BHSTMR_FUNCTION_QUERY_TASK_SET 10 +#define BHSTMR_FUNCTION_I_T_NEXUS_RESET 11 +#define BHSTMR_FUNCTION_QUERY_ASYNC_EVENT 12 struct iscsi_bhs_task_management_request { uint8_t bhstmr_opcode; @@ -154,7 +160,14 @@ struct iscsi_bhs_task_management_request CTASSERT(sizeof(struct iscsi_bhs_task_management_request) == ISCSI_BHS_SIZE); #define BHSTMR_RESPONSE_FUNCTION_COMPLETE 0 +#define BHSTMR_RESPONSE_TASK_DOES_NOT_EXIST 1 +#define BHSTMR_RESPONSE_LUN_DOES_NOT_EXIST 2 +#define BHSTMR_RESPONSE_TASK_STILL_ALLEGIANT 3 +#define BHSTMR_RESPONSE_TASK_ALL_REASS_NOT_SUPP 4 #define BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED 5 +#define BHSTMR_RESPONSE_FUNCTION_AUTH_FAIL 6 +#define BHSTMR_RESPONSE_FUNCTION_SUCCEEDED 7 +#define BHSTMR_RESPONSE_FUNCTION_REJECTED 255 struct iscsi_bhs_task_management_response { uint8_t bhstmr_opcode; @@ -163,7 +176,8 @@ struct iscsi_bhs_task_management_respons uint8_t bhstmr_reserved; uint8_t bhstmr_total_ahs_len; uint8_t bhstmr_data_segment_len[3]; - uint64_t bhstmr_reserved2; + uint8_t bhstmr_additional_reponse_information[3]; + uint8_t bhstmr_reserved2[5]; uint32_t bhstmr_initiator_task_tag; uint32_t bhstmr_reserved3; uint32_t bhstmr_statsn; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:10:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28C313D9; Mon, 9 Feb 2015 09:10:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A213194; Mon, 9 Feb 2015 09:10:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199All5020202; Mon, 9 Feb 2015 09:10:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199Al6I020193; Mon, 9 Feb 2015 09:10:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090910.t199Al6I020193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278440 - in stable/10/sys/cam: . scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:10:48 -0000 Author: mav Date: Mon Feb 9 09:10:46 2015 New Revision: 278440 URL: https://svnweb.freebsd.org/changeset/base/278440 Log: MFC r278111: Retry indefinitely on SCSI BUSY status from VMware disks and CDs. VMware returns BUSY status when storage has transient connectivity issues. It is often better to wait and let VM admin fix the problem then crash. Modified: stable/10/sys/cam/cam.h stable/10/sys/cam/cam_periph.c stable/10/sys/cam/scsi/scsi_cd.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam.h ============================================================================== --- stable/10/sys/cam/cam.h Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/cam.h Mon Feb 9 09:10:46 2015 (r278440) @@ -125,7 +125,8 @@ enum { SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request reponses */ SF_PRINT_ALWAYS = 0x08, /* Always print error status. */ SF_NO_RECOVERY = 0x10, /* Don't do active error recovery. */ - SF_NO_RETRY = 0x20 /* Don't do any retries. */ + SF_NO_RETRY = 0x20, /* Don't do any retries. */ + SF_RETRY_BUSY = 0x40 /* Retry BUSY status. */ }; /* CAM Status field values */ Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/cam_periph.c Mon Feb 9 09:10:46 2015 (r278440) @@ -1359,8 +1359,8 @@ camperiphscsistatuserror(union ccb *ccb, * Restart the queue after either another * command completes or a 1 second timeout. */ - if (ccb->ccb_h.retry_count > 0) { - ccb->ccb_h.retry_count--; + if ((sense_flags & SF_RETRY_BUSY) != 0 || + (ccb->ccb_h.retry_count--) > 0) { error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; Modified: stable/10/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:10:46 2015 (r278440) @@ -87,14 +87,16 @@ typedef enum { CD_Q_NONE = 0x00, CD_Q_NO_TOUCH = 0x01, CD_Q_BCD_TRACKS = 0x02, - CD_Q_10_BYTE_ONLY = 0x10 + CD_Q_10_BYTE_ONLY = 0x10, + CD_Q_RETRY_BUSY = 0x40 } cd_quirks; #define CD_Q_BIT_STRING \ "\020" \ "\001NO_TOUCH" \ "\002BCD_TRACKS" \ - "\00510_BYTE_ONLY" + "\00510_BYTE_ONLY" \ + "\007RETRY_BUSY" typedef enum { CD_FLAG_INVALID = 0x0001, @@ -189,6 +191,14 @@ static struct cd_quirk_entry cd_quirk_ta { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS + }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_CDROM, SIP_MEDIA_REMOVABLE, "NECVMWar", "VMware IDE CDR10", "*"}, + /*quirks*/ CD_Q_RETRY_BUSY } }; @@ -2584,6 +2594,9 @@ cderror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & CD_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Feb 9 09:10:46 2015 (r278440) @@ -101,7 +101,8 @@ typedef enum { DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, DA_Q_NO_RC16 = 0x10, - DA_Q_NO_UNMAP = 0x20 + DA_Q_NO_UNMAP = 0x20, + DA_Q_RETRY_BUSY = 0x40 } da_quirks; #define DA_Q_BIT_STRING \ @@ -110,7 +111,9 @@ typedef enum { "\002NO_6_BYTE" \ "\003NO_PREVENT" \ "\0044K" \ - "\005NO_RC16" + "\005NO_RC16" \ + "\006NO_UNMAP" \ + "\007RETRY_BUSY" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -359,6 +362,14 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + /*quirks*/ DA_Q_RETRY_BUSY + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3627,6 +3638,9 @@ daerror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & DA_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:14:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2444565; Mon, 9 Feb 2015 09:14:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B316D1C5; Mon, 9 Feb 2015 09:14:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199EODi023648; Mon, 9 Feb 2015 09:14:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199ENJV023644; Mon, 9 Feb 2015 09:14:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090914.t199ENJV023644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278441 - in stable/9/sys/cam: . scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:14:24 -0000 Author: mav Date: Mon Feb 9 09:14:22 2015 New Revision: 278441 URL: https://svnweb.freebsd.org/changeset/base/278441 Log: MFC r278111: Retry indefinitely on SCSI BUSY status from VMware disks and CDs. VMware returns BUSY status when storage has transient connectivity issues. It is often better to wait and let VM admin fix the problem then crash. Modified: stable/9/sys/cam/cam.h stable/9/sys/cam/cam_periph.c stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam.h ============================================================================== --- stable/9/sys/cam/cam.h Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/cam.h Mon Feb 9 09:14:22 2015 (r278441) @@ -115,7 +115,8 @@ enum { SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request reponses */ SF_PRINT_ALWAYS = 0x08, /* Always print error status. */ SF_NO_RECOVERY = 0x10, /* Don't do active error recovery. */ - SF_NO_RETRY = 0x20 /* Don't do any retries. */ + SF_NO_RETRY = 0x20, /* Don't do any retries. */ + SF_RETRY_BUSY = 0x40 /* Retry BUSY status. */ }; /* CAM Status field values */ Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/cam_periph.c Mon Feb 9 09:14:22 2015 (r278441) @@ -1366,8 +1366,8 @@ camperiphscsistatuserror(union ccb *ccb, * Restart the queue after either another * command completes or a 1 second timeout. */ - if (ccb->ccb_h.retry_count > 0) { - ccb->ccb_h.retry_count--; + if ((sense_flags & SF_RETRY_BUSY) != 0 || + (ccb->ccb_h.retry_count--) > 0) { error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:14:22 2015 (r278441) @@ -89,7 +89,8 @@ typedef enum { CD_Q_BCD_TRACKS = 0x02, CD_Q_NO_CHANGER = 0x04, CD_Q_CHANGER = 0x08, - CD_Q_10_BYTE_ONLY = 0x10 + CD_Q_10_BYTE_ONLY = 0x10, + CD_Q_RETRY_BUSY = 0x40 } cd_quirks; #define CD_Q_BIT_STRING \ @@ -98,7 +99,8 @@ typedef enum { "\002BCD_TRACKS" \ "\003NO_CHANGER" \ "\004CHANGER" \ - "\00510_BYTE_ONLY" + "\00510_BYTE_ONLY" \ + "\007RETRY_BUSY" typedef enum { CD_FLAG_INVALID = 0x0001, @@ -224,6 +226,14 @@ static struct cd_quirk_entry cd_quirk_ta { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS + }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_CDROM, SIP_MEDIA_REMOVABLE, "NECVMWar", "VMware IDE CDR10", "*"}, + /*quirks*/ CD_Q_RETRY_BUSY } }; @@ -3275,6 +3285,9 @@ cderror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & CD_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/scsi/scsi_da.c Mon Feb 9 09:14:22 2015 (r278441) @@ -101,7 +101,8 @@ typedef enum { DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, DA_Q_NO_RC16 = 0x10, - DA_Q_NO_UNMAP = 0x20 + DA_Q_NO_UNMAP = 0x20, + DA_Q_RETRY_BUSY = 0x40 } da_quirks; #define DA_Q_BIT_STRING \ @@ -110,7 +111,9 @@ typedef enum { "\002NO_6_BYTE" \ "\003NO_PREVENT" \ "\0044K" \ - "\005NO_RC16" + "\005NO_RC16" \ + "\006NO_UNMAP" \ + "\007RETRY_BUSY" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -360,6 +363,14 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + /*quirks*/ DA_Q_RETRY_BUSY + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3603,6 +3614,9 @@ daerror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & DA_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:17:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A034777A; Mon, 9 Feb 2015 09:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9D41FE; Mon, 9 Feb 2015 09:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199H14i024074; Mon, 9 Feb 2015 09:17:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199H1Bc024073; Mon, 9 Feb 2015 09:17:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502090917.t199H1Bc024073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 9 Feb 2015 09:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278442 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:17:01 -0000 Author: delphij Date: Mon Feb 9 09:17:00 2015 New Revision: 278442 URL: https://svnweb.freebsd.org/changeset/base/278442 Log: Chase r278433: bump __FreeBSD_version for xz 5.2.0 which adds multi-thread capability to liblzma. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Feb 9 09:14:22 2015 (r278441) +++ head/sys/sys/param.h Mon Feb 9 09:17:00 2015 (r278442) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100058 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100059 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:22:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27C02915; Mon, 9 Feb 2015 09:22:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED3702F3; Mon, 9 Feb 2015 09:22:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199MlQb028243; Mon, 9 Feb 2015 09:22:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199Mlc4028242; Mon, 9 Feb 2015 09:22:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502090922.t199Mlc4028242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 09:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278443 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:22:48 -0000 Author: brooks Date: Mon Feb 9 09:22:47 2015 New Revision: 278443 URL: https://svnweb.freebsd.org/changeset/base/278443 Log: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:17:00 2015 (r278442) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:22:47 2015 (r278443) @@ -2820,18 +2820,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:45:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08399A7; Mon, 9 Feb 2015 09:45:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDCDD784; Mon, 9 Feb 2015 09:45:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199jw5R038327; Mon, 9 Feb 2015 09:45:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199jw1f038326; Mon, 9 Feb 2015 09:45:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502090945.t199jw1f038326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 09:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278444 - stable/9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:45:59 -0000 Author: brooks Date: Mon Feb 9 09:45:58 2015 New Revision: 278444 URL: https://svnweb.freebsd.org/changeset/base/278444 Log: MFC r278337: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:22:47 2015 (r278443) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:45:58 2015 (r278444) @@ -2820,18 +2820,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:51:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A00038F; Mon, 9 Feb 2015 09:51:13 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id DF50F869; Mon, 9 Feb 2015 09:51:12 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id C4EB4D66DAD; Mon, 9 Feb 2015 20:51:04 +1100 (AEDT) Date: Mon, 9 Feb 2015 20:51:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm In-Reply-To: <20150209090315.GD42409@kib.kiev.ua> Message-ID: <20150209203647.L1800@besplex.bde.org> References: <201502090231.t192VS6C060751@svn.freebsd.org> <20150209170045.S1037@besplex.bde.org> <20150209090315.GD42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=baJSDo/B c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=lNZLphJAkYUQkshLDegA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Oleksandr Tymoshenko , svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:51:13 -0000 On Mon, 9 Feb 2015, Konstantin Belousov wrote: > On Mon, Feb 09, 2015 at 05:00:49PM +1100, Bruce Evans wrote: >> On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: >> ... >> I think the full bugs only occur when arch has strict alignment >> requirements and the alignment of the __packed objects is not known. >> This means that only lesser bugs occur on x86 (unless you enable >> alignment checking, but this arguably breaks the ABI). The compiler >> just generates possibly-misaligned full-width accesses if the arch >> doesn't have strict alignment requirements. Often the acceses turn >> out to be aligned at runtime. Otherwise, the hardware does them >> atomically, with a smaller efficiency penalty than split accesses. > > On x86 unaligned access is non-atomic. This was very visible on > Core2 CPUs where DPCPU code mishandled the alignment, resulting in > the mutexes from the per-cpu areas breaking badly. > > Modern CPUs should not lock several cache lines simultaneously either. Interesting. I thought that this was relatively easy to handle in hardware and required for compatibility, so hardware did it. This gives a reason other than efficiency to enable alignment checking so as to find all places that do misaligned accesses. I last tried this more than 20 years ago. Compilers mostly generated aligned accesses. One exception was for copying small (sub)structs. Inlining of the copy assumed maximal alignment or no alignment traps. Library functions are more of a problem. FreeBSD amd64 and i386 memcpy also assume this. Similarly for the MD mem* in the kernel. Mostly things are suitably aligned, so it is the correct optimization to not do extra work to align. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 09:56:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4B025A2; Mon, 9 Feb 2015 09:56:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0E3B8AD; Mon, 9 Feb 2015 09:56:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t199uMjV043365; Mon, 9 Feb 2015 09:56:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199uMqd043364; Mon, 9 Feb 2015 09:56:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502090956.t199uMqd043364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 9 Feb 2015 09:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278445 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:56:22 -0000 Author: gjb Date: Mon Feb 9 09:56:21 2015 New Revision: 278445 URL: https://svnweb.freebsd.org/changeset/base/278445 Log: Define FREEBSD_VERSION in release/Makefile, derived from sys/sys/param.h. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon Feb 9 09:45:58 2015 (r278444) +++ head/release/Makefile Mon Feb 9 09:56:21 2015 (r278445) @@ -54,6 +54,10 @@ TARGET_ARCH= ${TARGET} IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= dist +# Get the __FreeBSD_version for the build +FREEBSD_VERSION!= awk '/^\#define __FreeBSD_version/ {print $$3}' \ + ${.CURDIR}/../sys/sys/param.h + # Define OSRELEASE by using newvars.sh .if !defined(OSRELEASE) || empty(OSRELEASE) .for _V in TYPE BRANCH REVISION From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 10:09:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98A227C6; Mon, 9 Feb 2015 10:09:46 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF4A9B5; Mon, 9 Feb 2015 10:09:46 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t19A9fCw033052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Feb 2015 12:09:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t19A9fCw033052 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t19A9fSp033051; Mon, 9 Feb 2015 12:09:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 9 Feb 2015 12:09:41 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm Message-ID: <20150209100940.GF42409@kib.kiev.ua> References: <201502090231.t192VS6C060751@svn.freebsd.org> <20150209170045.S1037@besplex.bde.org> <20150209090315.GD42409@kib.kiev.ua> <20150209203647.L1800@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150209203647.L1800@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, Oleksandr Tymoshenko , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 10:09:46 -0000 On Mon, Feb 09, 2015 at 08:51:02PM +1100, Bruce Evans wrote: > On Mon, 9 Feb 2015, Konstantin Belousov wrote: > > > On Mon, Feb 09, 2015 at 05:00:49PM +1100, Bruce Evans wrote: > >> On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: > >> ... > >> I think the full bugs only occur when arch has strict alignment > >> requirements and the alignment of the __packed objects is not known. > >> This means that only lesser bugs occur on x86 (unless you enable > >> alignment checking, but this arguably breaks the ABI). The compiler > >> just generates possibly-misaligned full-width accesses if the arch > >> doesn't have strict alignment requirements. Often the acceses turn > >> out to be aligned at runtime. Otherwise, the hardware does them > >> atomically, with a smaller efficiency penalty than split accesses. > > > > On x86 unaligned access is non-atomic. This was very visible on > > Core2 CPUs where DPCPU code mishandled the alignment, resulting in > > the mutexes from the per-cpu areas breaking badly. > > > > Modern CPUs should not lock several cache lines simultaneously either. > > Interesting. I thought that this was relatively easy to handle in > hardware and required for compatibility, so hardware did it. Trying to lock to cache lines easily results in deadlock. FWIW, multi-socket Intel platforms are already deadlock-prone due to the cache, and have some facilities to debug this. > > This gives a reason other than efficiency to enable alignment checking > so as to find all places that do misaligned accesses. I last tried this > more than 20 years ago. Compilers mostly generated aligned accesses. > One exception was for copying small (sub)structs. Inlining of the copy > assumed maximal alignment or no alignment traps. Library functions are > more of a problem. FreeBSD amd64 and i386 memcpy also assume this. > Similarly for the MD mem* in the kernel. Mostly things are suitably > aligned, so it is the correct optimization to not do extra work to align. I also did experiments with preloadable dso which sets EFLAGS.AC bit. Last time I tried, it broke in the very early libc initialization code, due to unaligned access generated by compiler, as you described. This was with in-tree gcc. Tried with the clang-compiled world, I got SIGBUS due to unaligned access in ld-elf.so.1. AC does not work in ring 0, and Intel re-purposed the bit for kernel recently for 'security' theater. From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 10:09:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 943147C8; Mon, 9 Feb 2015 10:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DA69B7; Mon, 9 Feb 2015 10:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19A9lGk048567; Mon, 9 Feb 2015 10:09:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19A9lqR048566; Mon, 9 Feb 2015 10:09:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502091009.t19A9lqR048566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 10:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278446 - stable/8/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 10:09:47 -0000 Author: brooks Date: Mon Feb 9 10:09:46 2015 New Revision: 278446 URL: https://svnweb.freebsd.org/changeset/base/278446 Log: MFC r278337: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:56:21 2015 (r278445) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 10:09:46 2015 (r278446) @@ -2771,18 +2771,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 10:42:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A9B3EC8; Mon, 9 Feb 2015 10:42:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C610D59; Mon, 9 Feb 2015 10:42:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19AgSDq066656; Mon, 9 Feb 2015 10:42:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19AgS9J066654; Mon, 9 Feb 2015 10:42:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502091042.t19AgS9J066654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 9 Feb 2015 10:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278449 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 10:42:29 -0000 Author: gjb Date: Mon Feb 9 10:42:27 2015 New Revision: 278449 URL: https://svnweb.freebsd.org/changeset/base/278449 Log: Enable multi-threaded xz(1) compression, after r278433. Allow multi-threaded xz(1) to be turned off by specifying NO_XZTHREADS, and allow number of threads to be overridden by specifying XZ_THREADS=N. MFC after: 1 week X-MFC-needs: r278433 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/Makefile.vm Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon Feb 9 10:38:52 2015 (r278448) +++ head/release/Makefile Mon Feb 9 10:42:27 2015 (r278449) @@ -33,6 +33,9 @@ # with xz(1) (extremely time consuming) # WITH_CLOUDWARE: if set, build cloud hosting disk images with the release # TARGET/TARGET_ARCH: architecture of built release +# XZ_FLAGS: Additional arguments to pass to xz(1) +# XZ_THREADS: Number of xz(1) threads to use +# NO_XZTHREADS: Disable multi-threaded xz(1) compression # WORLDDIR?= ${.CURDIR}/.. @@ -40,6 +43,8 @@ PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 XZCMD?= /usr/bin/xz +XZ_FLAGS?= +XZ_THREADS?= .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} @@ -58,6 +63,15 @@ DISTDIR= dist FREEBSD_VERSION!= awk '/^\#define __FreeBSD_version/ {print $$3}' \ ${.CURDIR}/../sys/sys/param.h +.if !defined(NO_XZTHREADS) && empty(XZ_THREADS) +XZ_THREADS= 0 +.else +XZ_THREADS= ${XZ_THREADS} +.endif +.if !empty(XZ_THREADS) +XZ_FLAGS+= -T ${XZ_THREADS} +.endif + # Define OSRELEASE by using newvars.sh .if !defined(OSRELEASE) || empty(OSRELEASE) .for _V in TYPE BRANCH REVISION @@ -299,7 +313,7 @@ release-install: .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} . if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) - ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} + ${XZCMD} ${XZ_FLAGS} -k ${DESTDIR}/${OSRELEASE}-${I} . endif .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Mon Feb 9 10:38:52 2015 (r278448) +++ head/release/Makefile.vm Mon Feb 9 10:42:27 2015 (r278449) @@ -101,7 +101,7 @@ vm-install: # the DESTDIR. . for FORMAT in ${VMFORMATS} # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} + ${XZCMD} ${XZ_FLAGS} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . endif cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 10:46:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0670CFF; Mon, 9 Feb 2015 10:46:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66E4D9E; Mon, 9 Feb 2015 10:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19AkdcL067272; Mon, 9 Feb 2015 10:46:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19AkdCM067270; Mon, 9 Feb 2015 10:46:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502091046.t19AkdCM067270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 9 Feb 2015 10:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278450 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 10:46:40 -0000 Author: gjb Date: Mon Feb 9 10:46:39 2015 New Revision: 278450 URL: https://svnweb.freebsd.org/changeset/base/278450 Log: Revert r278445. I was going to use __FreeBSD_version to determine if xz(1) should be multi-threaded by default, but doing this will cause problems if/when the changes are merged from head. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon Feb 9 10:42:27 2015 (r278449) +++ head/release/Makefile Mon Feb 9 10:46:39 2015 (r278450) @@ -59,10 +59,6 @@ TARGET_ARCH= ${TARGET} IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= dist -# Get the __FreeBSD_version for the build -FREEBSD_VERSION!= awk '/^\#define __FreeBSD_version/ {print $$3}' \ - ${.CURDIR}/../sys/sys/param.h - .if !defined(NO_XZTHREADS) && empty(XZ_THREADS) XZ_THREADS= 0 .else From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 11:34:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3273D5A; Mon, 9 Feb 2015 11:34:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA27438E; Mon, 9 Feb 2015 11:34:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19BYkUP090688; Mon, 9 Feb 2015 11:34:46 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19BYkaN090687; Mon, 9 Feb 2015 11:34:46 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201502091134.t19BYkaN090687@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 9 Feb 2015 11:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278452 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 11:34:47 -0000 Author: bz Date: Mon Feb 9 11:34:45 2015 New Revision: 278452 URL: https://svnweb.freebsd.org/changeset/base/278452 Log: Properly hide a variable under #ifdef as it is only used inside the specific #ifdef block otherwise leaving an unused variable and breaking other kernel builds. Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 11:11:17 2015 (r278451) +++ head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 11:34:45 2015 (r278452) @@ -124,9 +124,9 @@ chrp_probe(platform_t plat) static int chrp_attach(platform_t plat) { +#ifdef __powerpc64__ int i; -#ifdef __powerpc64__ /* XXX: check for /rtas/ibm,hypertas-functions? */ if (!(mfmsr() & PSL_HV)) { struct mem_region *phys, *avail; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 12:25:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CECC96DE; Mon, 9 Feb 2015 12:25:43 +0000 (UTC) Date: Mon, 9 Feb 2015 12:25:40 +0000 From: Glen Barber To: Rui Paulo Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... Message-ID: <20150209122540.GE84467@hub.FreeBSD.org> References: <201502090620.t196KZSk040702@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: <201502090620.t196KZSk040702@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 12:25:44 -0000 --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 06:20:35AM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 >=20 > Log: > Merge xz 5.2.0. > =20 > This brings support for multi-threaded compression. This brings close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. > =20 This is fantastic, thank you for doing this update. FWIW, compressing VM images (some sparse files, some not) would take upwards of 45 minutes, which after this update, just takes a few minutes. root@releng2:/R2/vmimages # time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.qco= w2 \ time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.raw; \ time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vhd; \ time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vmdk 1027.602u 40.376s 1:09.57 1535.1% 81+192k 0+19774io 0pf+0w 1032.978u 38.823s 1:08.17 1572.2% 81+192k 0+19696io 0pf+0w 1033.908u 38.593s 1:11.70 1495.8% 81+192k 0+19729io 0pf+0w 1091.749u 42.371s 1:04.27 1764.6% 81+192k 0+19751io 0pf+0w Glen --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU2KdEAAoJEAMUWKVHj+KTUtEP+wcJ6xOcamqEv2Ye/pIN/5oo yrnBI73D1/84IsPzEfeCANwcgbXyuNC/KXWWo9kQCD8RNEWUBrsWGIqZc4QGALe3 JG+kL86EZlXwYd10/BLfajVOn7RhqET8WUKd9Q2Ns6r3j30UlEqgQZvQ4DVu1s2C hburyqn/SzUk6mLTVwjXqvxef8GKuVReLj2FLWV19hIkcfgZJnJGKXvbCj7n4o2V ZtfHglrKibxDs3ISbNcdh9LVqXvTP4mQQZHYFWG3LJKLhUz6JpJuZNHFe4ZfqVNT 0H681M/n81iVMDYDeRqHi3PKiVL5/9U3C+c7QVSrqWlj+TyZHP73XW9I35p/4glf 0ESriI4EhuPQrsuIu1ihX6wIdkfH16ggJnyUEY1kUhgr7GvqdawXu9IqfVkWC6YU 6FkUfsOwvlzvLAYhWR30uoHLPaQ+xCFRrY1Szz8hbc0kPXTwuPOOeQ8aUF6GeoCq q/sbnY2wvdE7zy7aieQnXlvAtNDDnQzckE96CSdPfqhX9QNKKOx6UK6fCrlIMKfy mB5SVdKjYJmC/4kyrKjEnKonU3u+5HCxR31rlesvNRZomaU5NsIMu5v3zjV6URAs JvU4sB/sEnxHNZ5P2PPNh5JEs8+e/kIcCY02B96Ax5+8XQ3EjQKPVFk1ygUyxJ/o vydxMj0KgLzh+WGQWOpo =CrXP -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 12:31:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65E138DC; Mon, 9 Feb 2015 12:31:02 +0000 (UTC) Date: Mon, 9 Feb 2015 12:30:57 +0000 From: Glen Barber To: Rui Paulo Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... Message-ID: <20150209123057.GF84467@hub.FreeBSD.org> References: <201502090620.t196KZSk040702@svn.freebsd.org> <20150209122540.GE84467@hub.FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GxcwvYAGnODwn7V8" Content-Disposition: inline In-Reply-To: <20150209122540.GE84467@hub.FreeBSD.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 12:31:03 -0000 --GxcwvYAGnODwn7V8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 12:25:40PM +0000, Glen Barber wrote: > On Mon, Feb 09, 2015 at 06:20:35AM +0000, Rui Paulo wrote: > > Author: rpaulo > > Date: Mon Feb 9 06:20:34 2015 > > New Revision: 278433 > > URL: https://svnweb.freebsd.org/changeset/base/278433 > >=20 > > Log: > > Merge xz 5.2.0. > > =20 > > This brings support for multi-threaded compression. This brings close > > N times faster compression where N is the number of CPU cores. > > Because of this, liblzma now depends on libthr. > > =20 >=20 > This is fantastic, thank you for doing this update. >=20 > FWIW, compressing VM images (some sparse files, some not) would take > upwards of 45 minutes, which after this update, just takes a few > minutes. >=20 > root@releng2:/R2/vmimages # time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.q= cow2 \ > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.raw; \ > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vhd; \ > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vmdk > 1027.602u 40.376s 1:09.57 1535.1% 81+192k 0+19774io 0pf+0w > 1032.978u 38.823s 1:08.17 1572.2% 81+192k 0+19696io 0pf+0w > 1033.908u 38.593s 1:11.70 1495.8% 81+192k 0+19729io 0pf+0w > 1091.749u 42.371s 1:04.27 1764.6% 81+192k 0+19751io 0pf+0w >=20 I meant to include that this is on a 48-core machine. Glen --GxcwvYAGnODwn7V8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU2KiBAAoJEAMUWKVHj+KTEPoQAKPk/fulNsmA7Uw6HagIIsf1 j0I0LZJCyew/oNuDCTOUjb5dpfRoADhnztnemCL4ioXm2uf+NltAn8SWKVCn/wFR 7dPJniyb9mYJE3ZSOeYI6ieYOlsbDiezypFiJxtOugnk9hTeogsOHolZaW//I1R+ k+S/degFYiBPAbnjfzmgeggi5YsHBbmFXI/mYcMggDf7CiWN6fS5yuWVqnsOOPRK 4RFVsRSYJlP0Bg74knT64WSpVpAbGDvVLe8EQcA6wB5gBS8zPQe59DJI29icaXP0 +LCpeM2Y395HL8M3irQH01Aor8zUAkF9jw0JGDFA/fyeUThM4mxDi08JK2f8C+gC VqWSsud2Xjp+9mfTk+aiKISqGGfbnGS4DuBATdSLgxKbfrvkjZr9YQ9fxRRSA6oy 2q7Eel1wYOtBopjFdElZhQcA2mTMzNV5nrc9NXeazjCPTbt058fcMQoasEFOn3zc Dhy1ty8I8BWlJ4ziPI48+E7T4f2gegWNvaJDItDnRpxY6lJrgmxZSWTJdIqAB7fE q/rxWCI3KgCiegrM+XIzXWMNqZugRZVJAdCx8ToO9C6B6KTUN4iUDhnBtt+3rlxX fulXnZij+3KnQn381OHFml2xEiROEzdB+/B0OyduD9Eb1gLDjuFZXTAdV6fTabPA YQx+Pgj0VBPoH3UG90Br =CCHA -----END PGP SIGNATURE----- --GxcwvYAGnODwn7V8-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 13:11:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 449F2351; Mon, 9 Feb 2015 13:11:37 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98C49F4E; Mon, 9 Feb 2015 13:11:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t19D80RH096398; Mon, 9 Feb 2015 16:09:00 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 9 Feb 2015 16:08:00 +0300 (MSK) From: Dmitry Morozovsky To: Glen Barber Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... In-Reply-To: <20150209123057.GF84467@hub.FreeBSD.org> Message-ID: References: <201502090620.t196KZSk040702@svn.freebsd.org> <20150209122540.GE84467@hub.FreeBSD.org> <20150209123057.GF84467@hub.FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Mon, 09 Feb 2015 16:09:07 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 13:11:37 -0000 Glen, On Mon, 9 Feb 2015, Glen Barber wrote: > > > Log: > > > Merge xz 5.2.0. > > > > > > This brings support for multi-threaded compression. This brings close > > > N times faster compression where N is the number of CPU cores. > > > Because of this, liblzma now depends on libthr. > > > > This is fantastic, thank you for doing this update. > > > > FWIW, compressing VM images (some sparse files, some not) would take > > upwards of 45 minutes, which after this update, just takes a few > > minutes. > > > > root@releng2:/R2/vmimages # time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.qcow2 \ > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.raw; \ > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vhd; \ > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vmdk > > 1027.602u 40.376s 1:09.57 1535.1% 81+192k 0+19774io 0pf+0w > > 1032.978u 38.823s 1:08.17 1572.2% 81+192k 0+19696io 0pf+0w > > 1033.908u 38.593s 1:11.70 1495.8% 81+192k 0+19729io 0pf+0w > > 1091.749u 42.371s 1:04.27 1764.6% 81+192k 0+19751io 0pf+0w > > > > I meant to include that this is on a 48-core machine. Hm, I can't beleive you didn't use pxz ;) Anyway, having this in base, and not depending on external tool, is amazingly great. BTW, Rui, did you some comparative tests with pxz? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 15:58:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C60119DF; Mon, 9 Feb 2015 15:58:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 979B83B2; Mon, 9 Feb 2015 15:58:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19FwSZL013253; Mon, 9 Feb 2015 15:58:28 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19FwSfu013252; Mon, 9 Feb 2015 15:58:28 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502091558.t19FwSfu013252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 15:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278456 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 15:58:28 -0000 Author: nwhitehorn Date: Mon Feb 9 15:58:27 2015 New Revision: 278456 URL: https://svnweb.freebsd.org/changeset/base/278456 Log: Mark invalid page table entries correctly for PMAP as well as for the hypervisor. This prevents an infinite loop where processes with evicted pages would page fault forever when PMAP decided the evicted pages on which the process was faulting was actually present and did not need to be restored. Found while building LLVM with make -j32. Sponsored by: FreeBSD Foundation Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 13:41:29 2015 (r278455) +++ head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 15:58:27 2015 (r278456) @@ -240,6 +240,7 @@ mphyp_pte_unset(mmu_t mmu, uintptr_t slo uint64_t junk; int err; + pvo_pt->pte_hi &= ~LPTE_VALID; err = phyp_pft_hcall(H_REMOVE, 1UL << 31, slot, pvo_pt->pte_hi & LPTE_AVPN_MASK, 0, &pte.pte_hi, &pte.pte_lo, &junk); @@ -265,6 +266,7 @@ mphyp_pte_change(mmu_t mmu, uintptr_t sl /* XXX: optimization using H_PROTECT for common case? */ mphyp_pte_unset(mmu, slot, pvo_pt, vpn); + pvo_pt->pte_hi |= LPTE_VALID; result = phyp_pft_hcall(H_ENTER, H_EXACT, slot, pvo_pt->pte_hi, pvo_pt->pte_lo, &index, &evicted.pte_lo, &junk); if (result != H_SUCCESS) @@ -286,7 +288,7 @@ mphyp_pte_spillable_ident(u_int ptegidx, phyp_pft_hcall(H_READ, 0, slot, 0, 0, &pt.pte_hi, &pt.pte_lo, &junk); - if (pt.pte_hi & LPTE_SWBITS) + if (pt.pte_hi & LPTE_WIRED) continue; /* This is a candidate, so remember it */ @@ -391,7 +393,7 @@ mphyp_pte_insert(mmu_t mmu, u_int ptegid } } - KASSERT(pvo->pvo_pte.lpte.pte_hi == evicted.pte_hi, + KASSERT((pvo->pvo_pte.lpte.pte_hi | LPTE_VALID) == evicted.pte_hi, ("Unable to find PVO for spilled PTE")); /* From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:00:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99498BB4; Mon, 9 Feb 2015 16:00:50 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E172645; Mon, 9 Feb 2015 16:00:50 +0000 (UTC) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.14.9) with ESMTPSA id t19FobEk032425 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 9 Feb 2015 07:50:37 -0800 Message-ID: <54D8D74C.2000803@freebsd.org> Date: Mon, 09 Feb 2015 07:50:36 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278452 - head/sys/powerpc/pseries References: <201502091134.t19BYkaN090687@svn.freebsd.org> In-Reply-To: <201502091134.t19BYkaN090687@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVa56PQnebpu3PllVWlq6F7lrUB+0gKXYPHPXDPFc3Q6LLrRQ7iAq4RR9cg8OmuxgT8FPqJDsbY1Cg2KUzx3WwQU7+G+0zNYWKA= X-Sonic-ID: C;+jPSY3Ow5BGy/mS47jkJAQ== M;mMUpZHOw5BGy/mS47jkJAQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:00:50 -0000 Thank you -- sorry for missing this! -Nathan On 02/09/15 03:34, Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Feb 9 11:34:45 2015 > New Revision: 278452 > URL: https://svnweb.freebsd.org/changeset/base/278452 > > Log: > Properly hide a variable under #ifdef as it is only used inside the > specific #ifdef block otherwise leaving an unused variable and breaking > other kernel builds. > > Modified: > head/sys/powerpc/pseries/platform_chrp.c > > Modified: head/sys/powerpc/pseries/platform_chrp.c > ============================================================================== > --- head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 11:11:17 2015 (r278451) > +++ head/sys/powerpc/pseries/platform_chrp.c Mon Feb 9 11:34:45 2015 (r278452) > @@ -124,9 +124,9 @@ chrp_probe(platform_t plat) > static int > chrp_attach(platform_t plat) > { > +#ifdef __powerpc64__ > int i; > > -#ifdef __powerpc64__ > /* XXX: check for /rtas/ibm,hypertas-functions? */ > if (!(mfmsr() & PSL_HV)) { > struct mem_region *phys, *avail; > From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:03:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76D13DA1; Mon, 9 Feb 2015 16:03:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F1167A; Mon, 9 Feb 2015 16:03:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19G3uH9017473; Mon, 9 Feb 2015 16:03:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19G3tB1017471; Mon, 9 Feb 2015 16:03:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091603.t19G3tB1017471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278457 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:03:56 -0000 Author: imp Date: Mon Feb 9 16:03:55 2015 New Revision: 278457 URL: https://svnweb.freebsd.org/changeset/base/278457 Log: Enforce that MK_foo options shall be either "yes" or "no" and nothing else. Modified: head/share/mk/bsd.mkopt.mk head/sys/conf/kern.opts.mk Modified: head/share/mk/bsd.mkopt.mk ============================================================================== --- head/share/mk/bsd.mkopt.mk Mon Feb 9 15:58:27 2015 (r278456) +++ head/share/mk/bsd.mkopt.mk Mon Feb 9 16:03:55 2015 (r278457) @@ -33,7 +33,11 @@ MK_${var}:= no .else MK_${var}:= yes .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_YES_OPTIONS @@ -47,6 +51,10 @@ MK_${var}:= yes .else MK_${var}:= no .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_NO_OPTIONS Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Feb 9 15:58:27 2015 (r278456) +++ head/sys/conf/kern.opts.mk Mon Feb 9 16:03:55 2015 (r278457) @@ -58,7 +58,11 @@ MK_${var}:= no .else MK_${var}:= yes .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_YES_OPTIONS @@ -70,7 +74,11 @@ MK_${var}:= yes .else MK_${var}:= no .endif +.else +.if ${MK_${var}} != "yes" && ${MK_${var}} != "no" +.error "Illegal value for MK_${var}: ${MK_${var}}" .endif +.endif # !defined(MK_${var}) .endfor .undef __DEFAULT_NO_OPTIONS From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:04:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5447DE78; Mon, 9 Feb 2015 16:04:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 413DD67C; Mon, 9 Feb 2015 16:04:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19G40pm017529; Mon, 9 Feb 2015 16:04:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19G40Tx017523; Mon, 9 Feb 2015 16:04:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091604.t19G40Tx017523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278458 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:04:00 -0000 Author: imp Date: Mon Feb 9 16:03:59 2015 New Revision: 278458 URL: https://svnweb.freebsd.org/changeset/base/278458 Log: Pass MODULES_EXTRA to the modules build. While I'm here, also always pass WITHOUT_MODULES down. There's no need to make this conditional. Submitted by: Guy Yur Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Feb 9 16:03:55 2015 (r278457) +++ head/sys/conf/kern.pre.mk Mon Feb 9 16:03:59 2015 (r278458) @@ -186,15 +186,13 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} +MKMODULESENV+= MODULES_EXTRA=${MODULES_EXTRA} WITHOUT_MODULES=${WITHOUT_MODULES} .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif .if defined(MODULES_OVERRIDE) MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif -.if defined(WITHOUT_MODULES) -MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}" -.endif .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:04:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D738A12C; Mon, 9 Feb 2015 16:04:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4C2E682; Mon, 9 Feb 2015 16:04:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19G49fM017651; Mon, 9 Feb 2015 16:04:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19G49Yh017650; Mon, 9 Feb 2015 16:04:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091604.t19G49Yh017650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278460 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:04:09 -0000 Author: imp Date: Mon Feb 9 16:04:08 2015 New Revision: 278460 URL: https://svnweb.freebsd.org/changeset/base/278460 Log: We need to create /boot/dtb since some use cases don't create a full root with BSD.root.mtree, so it often times will not exist. Rather than force the latter for an installkernel, just create the directory with a comment about why. Submitted by: Guy Yur Modified: head/sys/conf/dtb.mk Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Mon Feb 9 16:04:01 2015 (r278459) +++ head/sys/conf/dtb.mk Mon Feb 9 16:04:08 2015 (r278460) @@ -67,6 +67,10 @@ CLEANFILES+=${_dts:R:S/$/.dtb/} realinstall: _dtbinstall .ORDER: beforeinstall _kmodinstall _dtbinstall: +# Need to create this because installkernel doens't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. This may break ownership of ${DTBDIR} +# for no-root build. + mkdir -p ${DESTDIR}${DTBDIR} .for _dtb in ${DTB} ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:04:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BB1BF4C; Mon, 9 Feb 2015 16:04:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4927667D; Mon, 9 Feb 2015 16:04:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19G42Z6017583; Mon, 9 Feb 2015 16:04:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19G42C6017582; Mon, 9 Feb 2015 16:04:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091604.t19G42C6017582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278459 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:04:02 -0000 Author: imp Date: Mon Feb 9 16:04:01 2015 New Revision: 278459 URL: https://svnweb.freebsd.org/changeset/base/278459 Log: Make sure that we define DTB{OWN,GRP,MODE} so install works. Submitted by: Guy Yur Modified: head/sys/conf/dtb.mk Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Mon Feb 9 16:03:59 2015 (r278458) +++ head/sys/conf/dtb.mk Mon Feb 9 16:04:01 2015 (r278459) @@ -46,6 +46,9 @@ SYSDIR= ${_dir} .PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} DTBDIR?=/boot/dtb +DTBOWN?=root +DTBGRP?=wheel +DTBMODE?=444 DTB=${DTS:R:S/$/.dtb/} all: ${DTB} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:10:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0393F964; Mon, 9 Feb 2015 16:10:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E457B758; Mon, 9 Feb 2015 16:10:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19GAUe4019257; Mon, 9 Feb 2015 16:10:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19GAUv5019256; Mon, 9 Feb 2015 16:10:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091610.t19GAUv5019256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278461 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:10:31 -0000 Author: imp Date: Mon Feb 9 16:10:30 2015 New Revision: 278461 URL: https://svnweb.freebsd.org/changeset/base/278461 Log: Fix typo. Submitted by: jhb@ Modified: head/sys/conf/dtb.mk Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Mon Feb 9 16:04:08 2015 (r278460) +++ head/sys/conf/dtb.mk Mon Feb 9 16:10:30 2015 (r278461) @@ -67,7 +67,7 @@ CLEANFILES+=${_dts:R:S/$/.dtb/} realinstall: _dtbinstall .ORDER: beforeinstall _kmodinstall _dtbinstall: -# Need to create this because installkernel doens't invoke mtree with BSD.root.mtree +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree # to make sure the tree is setup properly. This may break ownership of ${DTBDIR} # for no-root build. mkdir -p ${DESTDIR}${DTBDIR} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:16:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1F19E70; Mon, 9 Feb 2015 16:16:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A88EA82E; Mon, 9 Feb 2015 16:16:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B6989B91E; Mon, 9 Feb 2015 11:16:38 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... Date: Mon, 09 Feb 2015 11:16:13 -0500 Message-ID: <46013627.EoFa6fsn0l@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502090620.t196KZSk040702@svn.freebsd.org> References: <201502090620.t196KZSk040702@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 11:16:38 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:16:39 -0000 On Monday, February 09, 2015 06:20:35 AM Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 > > Log: > Merge xz 5.2.0. > > This brings support for multi-threaded compression. This brings close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. > > Soon libarchive will be modified to use the new lzma API. > > Thanks to antoine@ for the exp-run. It looks like this uses hw.ncpu to determine the number of cores. Can you make this cpuset friendly by querying the current process's CPU mask and counting the cores it contains instead? Somethign like: cpuset_t set; cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, &set, sizeof(set)); (I have a CPU_COUNT() macro I should commit that will then let you do:) ncpus = CPU_COUNT(&set); -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:17:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 285BFFE8; Mon, 9 Feb 2015 16:17:42 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 03B7783C; Mon, 9 Feb 2015 16:17:41 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 1BB135A9F25; Mon, 9 Feb 2015 16:17:41 +0000 (UTC) Date: Mon, 9 Feb 2015 16:17:41 +0000 From: Brooks Davis To: Warner Losh Subject: Re: svn commit: r278460 - head/sys/conf Message-ID: <20150209161740.GA39452@spindle.one-eyed-alien.net> References: <201502091604.t19G49Yh017650@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <201502091604.t19G49Yh017650@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:17:42 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 04:04:09PM +0000, Warner Losh wrote: > Author: imp > Date: Mon Feb 9 16:04:08 2015 > New Revision: 278460 > URL: https://svnweb.freebsd.org/changeset/base/278460 >=20 > Log: > We need to create /boot/dtb since some use cases don't create a full > root with BSD.root.mtree, so it often times will not exist. Rather > than force the latter for an installkernel, just create the directory > with a comment about why. > =20 > Submitted by: Guy Yur >=20 > Modified: > head/sys/conf/dtb.mk >=20 > Modified: head/sys/conf/dtb.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/dtb.mk Mon Feb 9 16:04:01 2015 (r278459) > +++ head/sys/conf/dtb.mk Mon Feb 9 16:04:08 2015 (r278460) > @@ -67,6 +67,10 @@ CLEANFILES+=3D${_dts:R:S/$/.dtb/} > realinstall: _dtbinstall > .ORDER: beforeinstall _kmodinstall > _dtbinstall: > +# Need to create this because installkernel doens't invoke mtree with BS= D.root.mtree > +# to make sure the tree is setup properly. This may break ownership of $= {DTBDIR} > +# for no-root build. > + mkdir -p ${DESTDIR}${DTBDIR} You could use -d avoid the ownership issue in the no-root case, but then yo= u'll end up with duplicate ${DTBDIR} entries if you have run installworld. Conditional= creation might be the least bad solution. i.e.: test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -u root -g wheel ${DESTDIR}${D= TBDIR} -- Brooks --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTY3aMACgkQXY6L6fI4GtS0gwCeLjEomuYL+W6SbiYM1UXWu2Vu QcoAoLf9iXTRdVnRpyMAWrTG5U4vHz1c =04Gi -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:21:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB5C02E1; Mon, 9 Feb 2015 16:21:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B77538FD; Mon, 9 Feb 2015 16:21:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19GLo2m026890; Mon, 9 Feb 2015 16:21:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19GLoHW026888; Mon, 9 Feb 2015 16:21:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091621.t19GLoHW026888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278462 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:21:50 -0000 Author: imp Date: Mon Feb 9 16:21:49 2015 New Revision: 278462 URL: https://svnweb.freebsd.org/changeset/base/278462 Log: Move these definitions to bsd.own.mk along side the kernel directory / user defines. Make this work with WITH_INSTALL_AS_USER as well. Noticed by: ian@ Modified: head/share/mk/bsd.own.mk head/sys/conf/dtb.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Mon Feb 9 16:10:30 2015 (r278461) +++ head/share/mk/bsd.own.mk Mon Feb 9 16:21:49 2015 (r278462) @@ -141,7 +141,7 @@ _uid!= id -u USER!= id -un .endif _gid!= id -gn -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${_gid} .endfor @@ -164,6 +164,10 @@ KMODDIR?= /boot/kernel KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} +DTBDIR?= /boot/dtb +DTBOWN?= root +DTBGRP?= wheel +DTBMODE?= 444 LIBDIR?= /usr/lib LIBCOMPATDIR?= /usr/lib/compat Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Mon Feb 9 16:10:30 2015 (r278461) +++ head/sys/conf/dtb.mk Mon Feb 9 16:21:49 2015 (r278462) @@ -45,10 +45,6 @@ SYSDIR= ${_dir} .PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} -DTBDIR?=/boot/dtb -DTBOWN?=root -DTBGRP?=wheel -DTBMODE?=444 DTB=${DTS:R:S/$/.dtb/} all: ${DTB} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:29:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE8F37D8; Mon, 9 Feb 2015 16:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAF8397A; Mon, 9 Feb 2015 16:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19GTjNR028329; Mon, 9 Feb 2015 16:29:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19GTjCL028328; Mon, 9 Feb 2015 16:29:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502091629.t19GTjCL028328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Feb 2015 16:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278463 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:29:46 -0000 Author: imp Date: Mon Feb 9 16:29:44 2015 New Revision: 278463 URL: https://svnweb.freebsd.org/changeset/base/278463 Log: Prefer install over mkdir to create the directory. Add test to ensure the directory doesn't exist before creating it. This makes the NO_ROOT case actually work. Suggested by: brooks@ Modified: head/sys/conf/dtb.mk Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Mon Feb 9 16:21:49 2015 (r278462) +++ head/sys/conf/dtb.mk Mon Feb 9 16:29:44 2015 (r278463) @@ -64,9 +64,9 @@ realinstall: _dtbinstall .ORDER: beforeinstall _kmodinstall _dtbinstall: # Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree -# to make sure the tree is setup properly. This may break ownership of ${DTBDIR} -# for no-root build. - mkdir -p ${DESTDIR}${DTBDIR} +# to make sure the tree is setup properly. We don't recreate it to avoid duplicate +# entries in the NO_ROOT case. + test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} .for _dtb in ${DTB} ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:41:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B969DC0; Mon, 9 Feb 2015 16:41:51 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DB13B5A; Mon, 9 Feb 2015 16:41:50 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJI00DFGJPIBE40@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 16:41:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_02:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090169 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... From: Rui Paulo In-reply-to: <46013627.EoFa6fsn0l@ralph.baldwin.cx> Date: Mon, 09 Feb 2015 08:41:42 -0800 Content-transfer-encoding: quoted-printable Message-id: <663179A3-95DD-4BC2-B645-1187CCF0DAA3@me.com> References: <201502090620.t196KZSk040702@svn.freebsd.org> <46013627.EoFa6fsn0l@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:41:51 -0000 On Feb 9, 2015, at 08:16, John Baldwin wrote: >=20 > On Monday, February 09, 2015 06:20:35 AM Rui Paulo wrote: >> Author: rpaulo >> Date: Mon Feb 9 06:20:34 2015 >> New Revision: 278433 >> URL: https://svnweb.freebsd.org/changeset/base/278433 >>=20 >> Log: >> Merge xz 5.2.0. >>=20 >> This brings support for multi-threaded compression. This brings = close >> N times faster compression where N is the number of CPU cores. >> Because of this, liblzma now depends on libthr. >>=20 >> Soon libarchive will be modified to use the new lzma API. >>=20 >> Thanks to antoine@ for the exp-run. >=20 > It looks like this uses hw.ncpu to determine the number of cores. Can = you=20 > make this cpuset friendly by querying the current process's CPU mask = and=20 > counting the cores it contains instead? >=20 > Somethign like: >=20 > cpuset_t set; >=20 > cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, &set, = sizeof(set)); >=20 > (I have a CPU_COUNT() macro I should commit that will then let you = do:) >=20 > ncpus =3D CPU_COUNT(&set); Yes, makes sense. I'll wait for CPU_COUNT(). -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:44:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA1B7E2; Mon, 9 Feb 2015 16:44:57 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E697BD3; Mon, 9 Feb 2015 16:44:57 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJI00D82JUPPU40@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 16:44:52 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_02:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090169 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278450 - head/release From: Rui Paulo In-reply-to: <201502091046.t19AkdCM067270@svn.freebsd.org> Date: Mon, 09 Feb 2015 08:44:48 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502091046.t19AkdCM067270@svn.freebsd.org> To: Glen Barber X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:44:57 -0000 On Feb 9, 2015, at 02:46, Glen Barber wrote: >=20 > Author: gjb > Date: Mon Feb 9 10:46:39 2015 > New Revision: 278450 > URL: https://svnweb.freebsd.org/changeset/base/278450 >=20 > Log: > Revert r278445. >=20 > I was going to use __FreeBSD_version to determine if > xz(1) should be multi-threaded by default, but doing > this will cause problems if/when the changes are merged > from head. You can do "nm -D liblzma" and check for lzma_stream_encoder_mt. Or you = could check if xz(1) has threading support via xz -h (ugly). -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:45:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967E422C; Mon, 9 Feb 2015 16:45:51 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66648BDF; Mon, 9 Feb 2015 16:45:50 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJI00D82JUPPU40@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 16:45:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_02:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=18 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090169 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... From: Rui Paulo In-reply-to: Date: Mon, 09 Feb 2015 08:45:43 -0800 Content-transfer-encoding: 7bit Message-id: <01002F39-EDBC-4CBF-BE87-762ECFB56372@me.com> References: <201502090620.t196KZSk040702@svn.freebsd.org> <20150209122540.GE84467@hub.FreeBSD.org> <20150209123057.GF84467@hub.FreeBSD.org> To: Dmitry Morozovsky X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:45:51 -0000 On Feb 9, 2015, at 05:08, Dmitry Morozovsky wrote: > BTW, Rui, did you some comparative tests with pxz? No, I didn't, but now it should be easy for you to try! :-) -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 16:50:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41AF93B0; Mon, 9 Feb 2015 16:50:35 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1193FC0E; Mon, 9 Feb 2015 16:50:34 +0000 (UTC) Received: by iebtr6 with SMTP id tr6so17841004ieb.4; Mon, 09 Feb 2015 08:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SVvt11M6WsczupP1a6l3QniM9PzedHlR2I20//a59BY=; b=x7DxYy4viCKDF5rC0XKlckQ2U9/Zxwc8fL7NTg0gi2UH9jN3GipaaQHr0WoEVAH6tv 6djVWs4salvB1/eP0rXITHIQBTVpd3VbCp4Exux0W9qUYItagUC4tBDO/0OsSTXfB+Lr v/nNYWeetnMNKDGFpAw81B7A6TiMWLT4+6j1aKIgjaD1piA6RyEV/bS7a5nwWRydkm0g q7PE7BR29bTVvmEKU/G2J4TdyPpQXXNQr75c2cYvoOPIHL0oqFO2oIrM7T/+q0/iTEFm X9CIFQ6JDHkuWfVyvuWeqiibwg5bQzsZCOuVOe9ewvoyOORRHeB13vrCm0ycEUK7yT9y SXJA== MIME-Version: 1.0 X-Received: by 10.107.31.16 with SMTP id f16mr26617859iof.88.1423500628760; Mon, 09 Feb 2015 08:50:28 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.17.7 with HTTP; Mon, 9 Feb 2015 08:50:28 -0800 (PST) In-Reply-To: References: <201502091046.t19AkdCM067270@svn.freebsd.org> Date: Mon, 9 Feb 2015 08:50:28 -0800 X-Google-Sender-Auth: kq9bB_dMv80PVM66_K3SdV-cQr0 Message-ID: Subject: Re: svn commit: r278450 - head/release From: Adrian Chadd To: Rui Paulo Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , Glen Barber , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 16:50:35 -0000 ... this is why we should have some kind of version identifier in each tool, or capability lists. Otherwise lulz will ensue like this. -adrian On 9 February 2015 at 08:44, Rui Paulo wrote: > On Feb 9, 2015, at 02:46, Glen Barber wrote: >> >> Author: gjb >> Date: Mon Feb 9 10:46:39 2015 >> New Revision: 278450 >> URL: https://svnweb.freebsd.org/changeset/base/278450 >> >> Log: >> Revert r278445. >> >> I was going to use __FreeBSD_version to determine if >> xz(1) should be multi-threaded by default, but doing >> this will cause problems if/when the changes are merged >> from head. > > You can do "nm -D liblzma" and check for lzma_stream_encoder_mt. Or you could check if xz(1) has threading support via xz -h (ugly). > > -- > Rui Paulo > > > > From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 17:18:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2AC6B8C; Mon, 9 Feb 2015 17:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844DBF47; Mon, 9 Feb 2015 17:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19HICb6051624; Mon, 9 Feb 2015 17:18:12 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19HIA52051615; Mon, 9 Feb 2015 17:18:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502091718.t19HIA52051615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 9 Feb 2015 17:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278464 - in head/usr.sbin/bsdconfig: console includes share timezone/share usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 17:18:12 -0000 Author: dteske Date: Mon Feb 9 17:18:10 2015 New Revision: 278464 URL: https://svnweb.freebsd.org/changeset/base/278464 Log: Replace the only instance of sed(1) in bsdconfig(8) with awk(1). MFC after: 3 days Modified: head/usr.sbin/bsdconfig/console/INDEX head/usr.sbin/bsdconfig/includes/INDEX head/usr.sbin/bsdconfig/share/keymap.subr head/usr.sbin/bsdconfig/timezone/share/continents.subr head/usr.sbin/bsdconfig/timezone/share/countries.subr head/usr.sbin/bsdconfig/usermgmt/share/user.subr Modified: head/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/console/INDEX Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/console/INDEX Mon Feb 9 17:18:10 2015 (r278464) @@ -46,6 +46,13 @@ menu_help="Customize system console beha # can be i18n'ed but `command' is the name of a script. # menu_selection="console|console" +menu_selection="vt_font|font" +menu_selection="vt_keymap|keymap" +menu_selection="vt_repeat|repeat" +menu_selection="vt_saver|saver" +menu_selection="vt_screenmap|screenmap" +menu_selection="vt_ttys|ttys" +# For backward compatibility menu_selection="syscons_font|font" menu_selection="syscons_keymap|keymap" menu_selection="syscons_repeat|repeat" Modified: head/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 17:18:10 2015 (r278464) @@ -45,6 +45,7 @@ menu_help="" # can be i18n'ed but `command' is the name of a script. # menu_selection="includes|includes" +menu_selection="api|includes" # # ------------ Items below this line do NOT need i18n translation ------------ Modified: head/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:18:10 2015 (r278464) @@ -219,7 +219,7 @@ f_keymap_get_all() echo -n "$k " # NOTE: Translate '8x8' to '8x08' before sending to # sort(1) so that things work out as we might expect. - debug= keymap_$k get desc | sed -e 's/8x8/8x08/g' + debug= keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' done | sort -k2 | awk '{ printf "%s%s", (started ? " " : ""), $1; started = 1 }' Modified: head/usr.sbin/bsdconfig/timezone/share/continents.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/continents.subr Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/timezone/share/continents.subr Mon Feb 9 17:18:10 2015 (r278464) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ export continent_utc_title ############################################################ FUNCTIONS -# f_continent $cont $property +# f_continent $cont $property [$var_to_set] # # Returns a single property of a given continent. Available properties are: # @@ -102,37 +102,60 @@ export continent_utc_title # (which appears after continent selection). # menu_list Menu-list of regions for this continent. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_continent() { - local cont="$1" property="$2" - eval echo \"\${continent_${cont}_$property}\" + f_getvar "continent_${1}_$2" $3 } -# f_find_continent $title +# f_find_continent $title [$var_to_set] # # Returns continent identifier given continent title. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_find_continent() { - local cont - for cont in $CONTINENTS; do - if [ "$1" = "$( f_continent $cont title )" ]; then - echo "$cont" + local __cont __title + for __cont in $CONTINENTS; do + f_continent $__cont title __title + if [ "$1" = "$__title" ]; then + if [ "$2" ]; then + setvar "$2" $__cont + else + echo "$__cont" + fi return $SUCCESS fi done return $FAILURE } -# f_OCEANP $cont +# f_OCEANP $cont [$var_to_set] # # Returns "1" if the first argument is an ocean, otherwise NULL. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_OCEANP() { case "$1" in arctic|atlantic|indian|pacific) - echo 1 + if [ "$2" ]; then + setvar "$2" 1 + else + echo 1 + fi + ;; + *) + [ "$2" ] && setvar "$2" "" esac } Modified: head/usr.sbin/bsdconfig/timezone/share/countries.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/countries.subr Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/timezone/share/countries.subr Mon Feb 9 17:18:10 2015 (r278464) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; then _TIMEZONE_COUNTRIES_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +25,10 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ FUNCTIONS -# f_country $code $property +# f_country $code $property [$var_to_set] # # Returns a single property of a given country. Available properties are: # @@ -44,10 +46,13 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # descr_N Like name, but for the Nth zone when the country has # multiple zones (nzones > 0) # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_country() { - local code="$1" property="$2" - eval echo \"\${country_${code}_$property}\" + f_getvar "country_${1}_$2" $3 } # f_sort_countries @@ -59,22 +64,42 @@ f_country() # afterward is the sh(1) function which utilizes the below awk script. # f_sort_countries_awk=' +function _asorti(src, dest) { - split($0, array, /[[:space:]]+/) + k = nitems = 0 + for (i in src) dest[++nitems] = i + for (i = 1; i <= nitems; k = i++) { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) { + dest[k+1] = dest[k]; k-- + } + dest[k+1] = idx + } + return nitems +} +BEGIN { + split(ENVIRON["COUNTRIES"], array, /[[:space:]]+/) for (item in array) { tlc = array[item] - print ENVIRON["country_" tlc "_name"] " " tlc + name = ENVIRON["country_" tlc "_name"] + countries[name] = tlc } + n = _asorti(countries, sorted_countries) + for (i = 1, i <= n; i++) + print countries[sorted_countries[i]] + exit } ' f_sort_countries() { - COUNTRIES=$( echo "$COUNTRIES" | awk "$f_sort_countries_awk" | - sort | awk '{print $NF}' ) - export COUNTRIES + export COUNTRIES # for awk(1) ENVIRON[] visibility + COUNTRIES=$( awk "$f_sort_countries_awk" ) + export COUNTRIES # Pedantic } +############################################################ MAIN + f_dprintf "%s: Successfully loaded." timezone/countries.subr fi # ! $_TIMEZONE_COUNTRIES_SUBR Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user.subr Mon Feb 9 16:29:44 2015 (r278463) +++ head/usr.sbin/bsdconfig/usermgmt/share/user.subr Mon Feb 9 17:18:10 2015 (r278464) @@ -830,8 +830,7 @@ f_user_delete() f_eval_catch $funcname \ pw '%s -H 0' "$cmd" else - f_eval_catch $funcname \ - pw '%s -h -' "$cmd" + f_eval_catch $funcname pw '%s -h -' "$cmd" fi fi fi From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 17:22:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34AB1D44; Mon, 9 Feb 2015 17:22:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1754F82; Mon, 9 Feb 2015 17:22:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19HMuul055700; Mon, 9 Feb 2015 17:22:56 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19HMtAi055691; Mon, 9 Feb 2015 17:22:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502091722.t19HMtAi055691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 9 Feb 2015 17:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278465 - in head/usr.sbin/bsdconfig: console includes share timezone/share usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 17:22:57 -0000 Author: dteske Date: Mon Feb 9 17:22:54 2015 New Revision: 278465 URL: https://svnweb.freebsd.org/changeset/base/278465 Log: Revert SVN r278464 -- fingers were in perforce mode (premature commit of future stuffs not yet ready). Modified: head/usr.sbin/bsdconfig/console/INDEX head/usr.sbin/bsdconfig/includes/INDEX head/usr.sbin/bsdconfig/share/keymap.subr head/usr.sbin/bsdconfig/timezone/share/continents.subr head/usr.sbin/bsdconfig/timezone/share/countries.subr head/usr.sbin/bsdconfig/usermgmt/share/user.subr Modified: head/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/console/INDEX Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/console/INDEX Mon Feb 9 17:22:54 2015 (r278465) @@ -46,13 +46,6 @@ menu_help="Customize system console beha # can be i18n'ed but `command' is the name of a script. # menu_selection="console|console" -menu_selection="vt_font|font" -menu_selection="vt_keymap|keymap" -menu_selection="vt_repeat|repeat" -menu_selection="vt_saver|saver" -menu_selection="vt_screenmap|screenmap" -menu_selection="vt_ttys|ttys" -# For backward compatibility menu_selection="syscons_font|font" menu_selection="syscons_keymap|keymap" menu_selection="syscons_repeat|repeat" Modified: head/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 17:22:54 2015 (r278465) @@ -45,7 +45,6 @@ menu_help="" # can be i18n'ed but `command' is the name of a script. # menu_selection="includes|includes" -menu_selection="api|includes" # # ------------ Items below this line do NOT need i18n translation ------------ Modified: head/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:22:54 2015 (r278465) @@ -219,7 +219,7 @@ f_keymap_get_all() echo -n "$k " # NOTE: Translate '8x8' to '8x08' before sending to # sort(1) so that things work out as we might expect. - debug= keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' + debug= keymap_$k get desc | sed -e 's/8x8/8x08/g' done | sort -k2 | awk '{ printf "%s%s", (started ? " " : ""), $1; started = 1 }' Modified: head/usr.sbin/bsdconfig/timezone/share/continents.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/continents.subr Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/timezone/share/continents.subr Mon Feb 9 17:22:54 2015 (r278465) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1 # -# Copyright (c) 2011-2014 Devin Teske +# Copyright (c) 2011-2012 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ export continent_utc_title ############################################################ FUNCTIONS -# f_continent $cont $property [$var_to_set] +# f_continent $cont $property # # Returns a single property of a given continent. Available properties are: # @@ -102,60 +102,37 @@ export continent_utc_title # (which appears after continent selection). # menu_list Menu-list of regions for this continent. # -# If $var_to_set is missing or NULL, the value of $var_to_get is printed to -# standard output for capturing in a sub-shell (which is less-recommended -# because of performance degredation; for example, when called in a loop). -# f_continent() { - f_getvar "continent_${1}_$2" $3 + local cont="$1" property="$2" + eval echo \"\${continent_${cont}_$property}\" } -# f_find_continent $title [$var_to_set] +# f_find_continent $title # # Returns continent identifier given continent title. # -# If $var_to_set is missing or NULL, the value of $var_to_get is printed to -# standard output for capturing in a sub-shell (which is less-recommended -# because of performance degredation; for example, when called in a loop). -# f_find_continent() { - local __cont __title - for __cont in $CONTINENTS; do - f_continent $__cont title __title - if [ "$1" = "$__title" ]; then - if [ "$2" ]; then - setvar "$2" $__cont - else - echo "$__cont" - fi + local cont + for cont in $CONTINENTS; do + if [ "$1" = "$( f_continent $cont title )" ]; then + echo "$cont" return $SUCCESS fi done return $FAILURE } -# f_OCEANP $cont [$var_to_set] +# f_OCEANP $cont # # Returns "1" if the first argument is an ocean, otherwise NULL. # -# If $var_to_set is missing or NULL, the value of $var_to_get is printed to -# standard output for capturing in a sub-shell (which is less-recommended -# because of performance degredation; for example, when called in a loop). -# f_OCEANP() { case "$1" in arctic|atlantic|indian|pacific) - if [ "$2" ]; then - setvar "$2" 1 - else - echo 1 - fi - ;; - *) - [ "$2" ] && setvar "$2" "" + echo 1 esac } Modified: head/usr.sbin/bsdconfig/timezone/share/countries.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/countries.subr Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/timezone/share/countries.subr Mon Feb 9 17:22:54 2015 (r278465) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; then _TIMEZONE_COUNTRIES_SUBR=1 # -# Copyright (c) 2011-2014 Devin Teske +# Copyright (c) 2011-2012 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,10 +25,8 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # SUCH DAMAGE. # # $FreeBSD$ -# -############################################################ FUNCTIONS -# f_country $code $property [$var_to_set] +# f_country $code $property # # Returns a single property of a given country. Available properties are: # @@ -46,13 +44,10 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # descr_N Like name, but for the Nth zone when the country has # multiple zones (nzones > 0) # -# If $var_to_set is missing or NULL, the value of $var_to_get is printed to -# standard output for capturing in a sub-shell (which is less-recommended -# because of performance degredation; for example, when called in a loop). -# f_country() { - f_getvar "country_${1}_$2" $3 + local code="$1" property="$2" + eval echo \"\${country_${code}_$property}\" } # f_sort_countries @@ -64,42 +59,22 @@ f_country() # afterward is the sh(1) function which utilizes the below awk script. # f_sort_countries_awk=' -function _asorti(src, dest) { - k = nitems = 0 - for (i in src) dest[++nitems] = i - for (i = 1; i <= nitems; k = i++) { - idx = dest[i] - while ((k > 0) && (dest[k] > idx)) { - dest[k+1] = dest[k]; k-- - } - dest[k+1] = idx - } - return nitems -} -BEGIN { - split(ENVIRON["COUNTRIES"], array, /[[:space:]]+/) + split($0, array, /[[:space:]]+/) for (item in array) { tlc = array[item] - name = ENVIRON["country_" tlc "_name"] - countries[name] = tlc + print ENVIRON["country_" tlc "_name"] " " tlc } - n = _asorti(countries, sorted_countries) - for (i = 1, i <= n; i++) - print countries[sorted_countries[i]] - exit } ' f_sort_countries() { - export COUNTRIES # for awk(1) ENVIRON[] visibility - COUNTRIES=$( awk "$f_sort_countries_awk" ) - export COUNTRIES # Pedantic + COUNTRIES=$( echo "$COUNTRIES" | awk "$f_sort_countries_awk" | + sort | awk '{print $NF}' ) + export COUNTRIES } -############################################################ MAIN - f_dprintf "%s: Successfully loaded." timezone/countries.subr fi # ! $_TIMEZONE_COUNTRIES_SUBR Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user.subr Mon Feb 9 17:18:10 2015 (r278464) +++ head/usr.sbin/bsdconfig/usermgmt/share/user.subr Mon Feb 9 17:22:54 2015 (r278465) @@ -830,7 +830,8 @@ f_user_delete() f_eval_catch $funcname \ pw '%s -H 0' "$cmd" else - f_eval_catch $funcname pw '%s -h -' "$cmd" + f_eval_catch $funcname \ + pw '%s -h -' "$cmd" fi fi fi From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 17:24:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 756AAED5; Mon, 9 Feb 2015 17:24:12 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47E21BB; Mon, 9 Feb 2015 17:24:12 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJI0052OLNVV550@st11p02mm-asmtp002.mac.com>; Mon, 09 Feb 2015 17:23:57 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_02:2015-02-09,2015-02-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090175 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278450 - head/release From: Rui Paulo In-reply-to: Date: Mon, 09 Feb 2015 09:23:54 -0800 Content-transfer-encoding: quoted-printable Message-id: <04669536-8407-4F8E-936D-8AFA35122671@me.com> References: <201502091046.t19AkdCM067270@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2070.6) Cc: "svn-src-head@freebsd.org" , Glen Barber , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 17:24:12 -0000 On Feb 9, 2015, at 08:50, Adrian Chadd wrote: >=20 > ... this is why we should have some kind of version identifier in each > tool, or capability lists. Otherwise lulz will ensue like this. Well, we have: xz --version will output a version string that should be = easy to parse. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 17:53:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EC48EEE; Mon, 9 Feb 2015 17:53:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF465643; Mon, 9 Feb 2015 17:53:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19HrGC0069775; Mon, 9 Feb 2015 17:53:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19HrGGB069774; Mon, 9 Feb 2015 17:53:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502091753.t19HrGGB069774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 9 Feb 2015 17:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278466 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 17:53:17 -0000 Author: ngie Date: Mon Feb 9 17:53:16 2015 New Revision: 278466 URL: https://svnweb.freebsd.org/changeset/base/278466 Log: Remove explicit routing/sendmail rc.d inclusion in FILES Reported by: Guy Yur MFC after: 14 days X-MFC with: r278249 Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Feb 9 17:22:54 2015 (r278465) +++ head/etc/rc.d/Makefile Mon Feb 9 17:53:16 2015 (r278466) @@ -99,7 +99,6 @@ FILES= DAEMON \ rfcomm_pppd_server \ root \ route6d \ - routed \ routing \ rpcbind \ rtadvd \ @@ -107,7 +106,6 @@ FILES= DAEMON \ savecore \ sdpd \ securelevel \ - sendmail \ serial \ sppp \ ${_sshd} \ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 18:01:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40759405; Mon, 9 Feb 2015 18:01:32 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC382793; Mon, 9 Feb 2015 18:01:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t19I16G6001106; Mon, 9 Feb 2015 21:01:06 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 9 Feb 2015 21:01:06 +0300 (MSK) From: Dmitry Morozovsky To: Rui Paulo Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... In-Reply-To: <01002F39-EDBC-4CBF-BE87-762ECFB56372@me.com> Message-ID: References: <201502090620.t196KZSk040702@svn.freebsd.org> <20150209122540.GE84467@hub.FreeBSD.org> <20150209123057.GF84467@hub.FreeBSD.org> <01002F39-EDBC-4CBF-BE87-762ECFB56372@me.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Mon, 09 Feb 2015 21:01:06 +0300 (MSK) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 18:01:32 -0000 Rui, On Mon, 9 Feb 2015, Rui Paulo wrote: > No, I didn't, but now it should be easy for you to try! :-) Unfortunately, the most powerful machine @myhands is 2*8core root@briareus:~# sysctl hw.model hw.model: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz root@briareus:~# sysctl hw.ncpu hw.ncpu: 16 and even this one is mostly loaded with $JOB ;) I'll try comparing with my home fileserver, which is on marck@hamster:~> sysctl hw.model hw.model: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz marck@hamster:~> sysctl hw.ncpu hw.ncpu: 4 and load is rather moderate, especially if I stop smbd ;) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:16:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1001F8AD; Mon, 9 Feb 2015 19:16:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F04D1F8E; Mon, 9 Feb 2015 19:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JGJXv061056; Mon, 9 Feb 2015 19:16:19 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JGJcO061055; Mon, 9 Feb 2015 19:16:19 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502091916.t19JGJcO061055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 9 Feb 2015 19:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278467 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:16:20 -0000 Author: dteske Date: Mon Feb 9 19:16:19 2015 New Revision: 278467 URL: https://svnweb.freebsd.org/changeset/base/278467 Log: Replace the only instance of sed(1) in bsdconfig(8) with awk(1). MFC after: 3 days Modified: head/usr.sbin/bsdconfig/share/keymap.subr Modified: head/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:53:16 2015 (r278466) +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 19:16:19 2015 (r278467) @@ -219,7 +219,7 @@ f_keymap_get_all() echo -n "$k " # NOTE: Translate '8x8' to '8x08' before sending to # sort(1) so that things work out as we might expect. - debug= keymap_$k get desc | sed -e 's/8x8/8x08/g' + debug= keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' done | sort -k2 | awk '{ printf "%s%s", (started ? " " : ""), $1; started = 1 }' From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:19:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BCCEA3D; Mon, 9 Feb 2015 19:19:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 388F3FB5; Mon, 9 Feb 2015 19:19:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JJE39061445; Mon, 9 Feb 2015 19:19:14 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JJElS061444; Mon, 9 Feb 2015 19:19:14 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502091919.t19JJElS061444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 19:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278468 - head/contrib/xz X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:19:14 -0000 Author: rpaulo Date: Mon Feb 9 19:19:13 2015 New Revision: 278468 URL: https://svnweb.freebsd.org/changeset/base/278468 Log: Add a few more instructions to xz/FREEBSD-upgrade. Modified: head/contrib/xz/FREEBSD-upgrade Modified: head/contrib/xz/FREEBSD-upgrade ============================================================================== --- head/contrib/xz/FREEBSD-upgrade Mon Feb 9 19:16:19 2015 (r278467) +++ head/contrib/xz/FREEBSD-upgrade Mon Feb 9 19:19:13 2015 (r278468) @@ -16,6 +16,9 @@ sh -c 'for F in `cat FREEBSD-Xlist | gre You may check if there are any new files that we don't need. +You should run ``configure'' to make sure you use a more recent +config.h. Running ``make check'' in the xz source tree is also useful. + The instructions for importing new release and merging to HEAD can be found at FreeBSD wiki: From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:19:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D60A6B80; Mon, 9 Feb 2015 19:19:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0BD4FC0; Mon, 9 Feb 2015 19:19:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JJjIc061544; Mon, 9 Feb 2015 19:19:45 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JJjbg061542; Mon, 9 Feb 2015 19:19:45 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201502091919.t19JJjbg061542@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Mon, 9 Feb 2015 19:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278469 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:19:45 -0000 Author: rrs Date: Mon Feb 9 19:19:44 2015 New Revision: 278469 URL: https://svnweb.freebsd.org/changeset/base/278469 Log: This fixes two conditions that can incur when migration is being done in the callout code and harmonizes the macro use.: 1) The callout_active() will lie. Basically if a migration is occuring and the callout is about to expire and the migration has been deferred, the callout_active will no longer return true until after the migration. This confuses and breaks callers that are doing callout_init(&c, 1); such as TCP. 2) The migration code had a bug in it where when migrating, if a two calls to callout_reset came in and they both collided with the callout on the wheel about to run, then the second call to callout_reset would corrupt the list the callout wheel uses putting the callout thread into a endless loop. 3) Per imp, I have fixed all the macro occurance in the code that were for the most part being ignored. Phabricator D1711 and looked at by lstewart and jhb and sbruno. Reviewed by: kostikbel, imp, adrian, hselasky MFC after: 3 days Sponsored by: Netflix Inc. Modified: head/sys/kern/kern_timeout.c head/sys/sys/callout.h Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Mon Feb 9 19:19:13 2015 (r278468) +++ head/sys/kern/kern_timeout.c Mon Feb 9 19:19:44 2015 (r278469) @@ -166,26 +166,16 @@ struct callout_cpu { char cc_ktr_event_name[20]; }; -#define cc_exec_curr cc_exec_entity[0].cc_curr -#define cc_exec_next cc_exec_entity[0].cc_next -#define cc_exec_cancel cc_exec_entity[0].cc_cancel -#define cc_exec_waiting cc_exec_entity[0].cc_waiting -#define cc_exec_curr_dir cc_exec_entity[1].cc_curr -#define cc_exec_next_dir cc_exec_entity[1].cc_next -#define cc_exec_cancel_dir cc_exec_entity[1].cc_cancel -#define cc_exec_waiting_dir cc_exec_entity[1].cc_waiting - +#define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr +#define cc_exec_next(cc, dir) cc->cc_exec_entity[dir].cc_next +#define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel +#define cc_exec_waiting(cc, dir) cc->cc_exec_entity[dir].cc_waiting #ifdef SMP -#define cc_migration_func cc_exec_entity[0].ce_migration_func -#define cc_migration_arg cc_exec_entity[0].ce_migration_arg -#define cc_migration_cpu cc_exec_entity[0].ce_migration_cpu -#define cc_migration_time cc_exec_entity[0].ce_migration_time -#define cc_migration_prec cc_exec_entity[0].ce_migration_prec -#define cc_migration_func_dir cc_exec_entity[1].ce_migration_func -#define cc_migration_arg_dir cc_exec_entity[1].ce_migration_arg -#define cc_migration_cpu_dir cc_exec_entity[1].ce_migration_cpu -#define cc_migration_time_dir cc_exec_entity[1].ce_migration_time -#define cc_migration_prec_dir cc_exec_entity[1].ce_migration_prec +#define cc_migration_func(cc, dir) cc->cc_exec_entity[dir].ce_migration_func +#define cc_migration_arg(cc, dir) cc->cc_exec_entity[dir].ce_migration_arg +#define cc_migration_cpu(cc, dir) cc->cc_exec_entity[dir].ce_migration_cpu +#define cc_migration_time(cc, dir) cc->cc_exec_entity[dir].ce_migration_time +#define cc_migration_prec(cc, dir) cc->cc_exec_entity[dir].ce_migration_prec struct callout_cpu cc_cpu[MAXCPU]; #define CPUBLOCK MAXCPU @@ -235,16 +225,16 @@ static void cc_cce_cleanup(struct callout_cpu *cc, int direct) { - cc->cc_exec_entity[direct].cc_curr = NULL; - cc->cc_exec_entity[direct].cc_next = NULL; - cc->cc_exec_entity[direct].cc_cancel = false; - cc->cc_exec_entity[direct].cc_waiting = false; + cc_exec_curr(cc, direct) = NULL; + cc_exec_next(cc, direct) = NULL; + cc_exec_cancel(cc, direct) = false; + cc_exec_waiting(cc, direct) = false; #ifdef SMP - cc->cc_exec_entity[direct].ce_migration_cpu = CPUBLOCK; - cc->cc_exec_entity[direct].ce_migration_time = 0; - cc->cc_exec_entity[direct].ce_migration_prec = 0; - cc->cc_exec_entity[direct].ce_migration_func = NULL; - cc->cc_exec_entity[direct].ce_migration_arg = NULL; + cc_migration_cpu(cc, direct) = CPUBLOCK; + cc_migration_time(cc, direct) = 0; + cc_migration_prec(cc, direct) = 0; + cc_migration_func(cc, direct) = NULL; + cc_migration_arg(cc, direct) = NULL; #endif } @@ -256,7 +246,7 @@ cc_cce_migrating(struct callout_cpu *cc, { #ifdef SMP - return (cc->cc_exec_entity[direct].ce_migration_cpu != CPUBLOCK); + return (cc_migration_cpu(cc, direct) != CPUBLOCK); #else return (0); #endif @@ -492,7 +482,7 @@ callout_process(sbintime_t now) #ifdef CALLOUT_PROFILING ++depth_dir; #endif - cc->cc_exec_next_dir = + cc_exec_next(cc, 1) = LIST_NEXT(tmp, c_links.le); cc->cc_bucket = firstb & callwheelmask; LIST_REMOVE(tmp, c_links.le); @@ -501,7 +491,7 @@ callout_process(sbintime_t now) &mpcalls_dir, &lockcalls_dir, NULL, #endif 1); - tmp = cc->cc_exec_next_dir; + tmp = cc_exec_next(cc, 1); } else { tmpn = LIST_NEXT(tmp, c_links.le); LIST_REMOVE(tmp, c_links.le); @@ -585,7 +575,7 @@ callout_lock(struct callout *c) static void callout_cc_add(struct callout *c, struct callout_cpu *cc, sbintime_t sbt, sbintime_t precision, void (*func)(void *), - void *arg, int cpu, int flags) + void *arg, int cpu, int flags, int direct) { int bucket; @@ -606,7 +596,7 @@ callout_cc_add(struct callout *c, struct (u_int)(c->c_precision & 0xffffffff)); LIST_INSERT_HEAD(&cc->cc_callwheel[bucket], c, c_links.le); if (cc->cc_bucket == bucket) - cc->cc_exec_next_dir = c; + cc_exec_next(cc, direct) = c; #ifndef NO_EVENTTIMERS /* * Inform the eventtimers(4) subsystem there's a new callout @@ -679,8 +669,9 @@ softclock_call_cc(struct callout *c, str c->c_flags = CALLOUT_LOCAL_ALLOC; else c->c_flags &= ~CALLOUT_PENDING; - cc->cc_exec_entity[direct].cc_curr = c; - cc->cc_exec_entity[direct].cc_cancel = false; + + cc_exec_curr(cc, direct) = c; + cc_exec_cancel(cc, direct) = false; CC_UNLOCK(cc); if (c_lock != NULL) { class->lc_lock(c_lock, lock_status); @@ -688,12 +679,12 @@ softclock_call_cc(struct callout *c, str * The callout may have been cancelled * while we switched locks. */ - if (cc->cc_exec_entity[direct].cc_cancel) { + if (cc_exec_cancel(cc, direct)) { class->lc_unlock(c_lock); goto skip; } /* The callout cannot be stopped now. */ - cc->cc_exec_entity[direct].cc_cancel = true; + cc_exec_cancel(cc, direct) = true; if (c_lock == &Giant.lock_object) { #ifdef CALLOUT_PROFILING (*gcalls)++; @@ -744,9 +735,9 @@ softclock_call_cc(struct callout *c, str class->lc_unlock(c_lock); skip: CC_LOCK(cc); - KASSERT(cc->cc_exec_entity[direct].cc_curr == c, ("mishandled cc_curr")); - cc->cc_exec_entity[direct].cc_curr = NULL; - if (cc->cc_exec_entity[direct].cc_waiting) { + KASSERT(cc_exec_curr(cc, direct) == c, ("mishandled cc_curr")); + cc_exec_curr(cc, direct) = NULL; + if (cc_exec_waiting(cc, direct)) { /* * There is someone waiting for the * callout to complete. @@ -762,9 +753,9 @@ skip: */ c->c_flags &= ~CALLOUT_DFRMIGRATION; } - cc->cc_exec_entity[direct].cc_waiting = false; + cc_exec_waiting(cc, direct) = false; CC_UNLOCK(cc); - wakeup(&cc->cc_exec_entity[direct].cc_waiting); + wakeup(&cc_exec_waiting(cc, direct)); CC_LOCK(cc); } else if (cc_cce_migrating(cc, direct)) { KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0, @@ -774,11 +765,11 @@ skip: * If the callout was scheduled for * migration just perform it now. */ - new_cpu = cc->cc_exec_entity[direct].ce_migration_cpu; - new_time = cc->cc_exec_entity[direct].ce_migration_time; - new_prec = cc->cc_exec_entity[direct].ce_migration_prec; - new_func = cc->cc_exec_entity[direct].ce_migration_func; - new_arg = cc->cc_exec_entity[direct].ce_migration_arg; + new_cpu = cc_migration_cpu(cc, direct); + new_time = cc_migration_time(cc, direct); + new_prec = cc_migration_prec(cc, direct); + new_func = cc_migration_func(cc, direct); + new_arg = cc_migration_arg(cc, direct); cc_cce_cleanup(cc, direct); /* @@ -787,7 +778,7 @@ skip: * * As first thing, handle deferred callout stops. */ - if ((c->c_flags & CALLOUT_DFRMIGRATION) == 0) { + if (!callout_migrating(c)) { CTR3(KTR_CALLOUT, "deferred cancelled %p func %p arg %p", c, new_func, new_arg); @@ -799,7 +790,7 @@ skip: new_cc = callout_cpu_switch(c, cc, new_cpu); flags = (direct) ? C_DIRECT_EXEC : 0; callout_cc_add(c, new_cc, new_time, new_prec, new_func, - new_arg, new_cpu, flags); + new_arg, new_cpu, flags, direct); CC_UNLOCK(new_cc); CC_LOCK(cc); #else @@ -1007,15 +998,15 @@ callout_reset_sbt_on(struct callout *c, KASSERT(!direct || c->c_lock == NULL, ("%s: direct callout %p has lock", __func__, c)); cc = callout_lock(c); - if (cc->cc_exec_entity[direct].cc_curr == c) { + if (cc_exec_curr(cc, direct) == c) { /* * We're being asked to reschedule a callout which is * currently in progress. If there is a lock then we * can cancel the callout if it has not really started. */ - if (c->c_lock != NULL && !cc->cc_exec_entity[direct].cc_cancel) - cancelled = cc->cc_exec_entity[direct].cc_cancel = true; - if (cc->cc_exec_entity[direct].cc_waiting) { + if (c->c_lock != NULL && cc_exec_cancel(cc, direct)) + cancelled = cc_exec_cancel(cc, direct) = true; + if (cc_exec_waiting(cc, direct)) { /* * Someone has called callout_drain to kill this * callout. Don't reschedule. @@ -1026,11 +1017,30 @@ callout_reset_sbt_on(struct callout *c, CC_UNLOCK(cc); return (cancelled); } +#ifdef SMP + if (callout_migrating(c)) { + /* + * This only occurs when a second callout_reset_sbt_on + * is made after a previous one moved it into + * deferred migration (below). Note we do *not* change + * the prev_cpu even though the previous target may + * be different. + */ + cc_migration_cpu(cc, direct) = cpu; + cc_migration_time(cc, direct) = to_sbt; + cc_migration_prec(cc, direct) = precision; + cc_migration_func(cc, direct) = ftn; + cc_migration_arg(cc, direct) = arg; + cancelled = 1; + CC_UNLOCK(cc); + return (cancelled); + } +#endif } if (c->c_flags & CALLOUT_PENDING) { if ((c->c_flags & CALLOUT_PROCESSED) == 0) { - if (cc->cc_exec_next_dir == c) - cc->cc_exec_next_dir = LIST_NEXT(c, c_links.le); + if (cc_exec_next(cc, direct) == c) + cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le); LIST_REMOVE(c, c_links.le); } else TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); @@ -1045,15 +1055,29 @@ callout_reset_sbt_on(struct callout *c, * to a more appropriate moment. */ if (c->c_cpu != cpu) { - if (cc->cc_exec_entity[direct].cc_curr == c) { - cc->cc_exec_entity[direct].ce_migration_cpu = cpu; - cc->cc_exec_entity[direct].ce_migration_time - = to_sbt; - cc->cc_exec_entity[direct].ce_migration_prec - = precision; - cc->cc_exec_entity[direct].ce_migration_func = ftn; - cc->cc_exec_entity[direct].ce_migration_arg = arg; - c->c_flags |= CALLOUT_DFRMIGRATION; + if (cc_exec_curr(cc, direct) == c) { + /* + * Pending will have been removed since we are + * actually executing the callout on another + * CPU. That callout should be waiting on the + * lock the caller holds. If we set both + * active/and/pending after we return and the + * lock on the executing callout proceeds, it + * will then see pending is true and return. + * At the return from the actual callout execution + * the migration will occur in softclock_call_cc + * and this new callout will be placed on the + * new CPU via a call to callout_cpu_switch() which + * will get the lock on the right CPU followed + * by a call callout_cc_add() which will add it there. + * (see above in softclock_call_cc()). + */ + cc_migration_cpu(cc, direct) = cpu; + cc_migration_time(cc, direct) = to_sbt; + cc_migration_prec(cc, direct) = precision; + cc_migration_func(cc, direct) = ftn; + cc_migration_arg(cc, direct) = arg; + c->c_flags |= (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING); CTR6(KTR_CALLOUT, "migration of %p func %p arg %p in %d.%08x to %u deferred", c, c->c_func, c->c_arg, (int)(to_sbt >> 32), @@ -1065,7 +1089,7 @@ callout_reset_sbt_on(struct callout *c, } #endif - callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags); + callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags, direct); CTR6(KTR_CALLOUT, "%sscheduled %p func %p arg %p in %d.%08x", cancelled ? "re" : "", c, c->c_func, c->c_arg, (int)(to_sbt >> 32), (u_int)(to_sbt & 0xffffffff)); @@ -1095,6 +1119,7 @@ _callout_stop_safe(struct callout *c, in struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; + int not_on_a_list; if (safe) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1120,6 +1145,26 @@ _callout_stop_safe(struct callout *c, in again: cc = callout_lock(c); + if ((c->c_flags & (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING)) == + (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING)) { + /* + * Special case where this slipped in while we + * were migrating *as* the callout is about to + * execute. The caller probably holds the lock + * the callout wants. + * + * Get rid of the migration first. Then set + * the flag that tells this code *not* to + * try to remove it from any lists (its not + * on one yet). When the callout wheel runs, + * it will ignore this callout. + */ + c->c_flags &= ~(CALLOUT_PENDING|CALLOUT_ACTIVE); + not_on_a_list = 1; + } else { + not_on_a_list = 0; + } + /* * If the callout was migrating while the callout cpu lock was * dropped, just drop the sleepqueue lock and check the states @@ -1128,7 +1173,7 @@ again: if (sq_locked != 0 && cc != old_cc) { #ifdef SMP CC_UNLOCK(cc); - sleepq_release(&old_cc->cc_exec_entity[direct].cc_waiting); + sleepq_release(&cc_exec_waiting(old_cc, direct)); sq_locked = 0; old_cc = NULL; goto again; @@ -1149,13 +1194,12 @@ again: * If it wasn't on the queue and it isn't the current * callout, then we can't stop it, so just bail. */ - if (cc->cc_exec_entity[direct].cc_curr != c) { + if (cc_exec_curr(cc, direct) != c) { CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); CC_UNLOCK(cc); if (sq_locked) - sleepq_release( - &cc->cc_exec_entity[direct].cc_waiting); + sleepq_release(&cc_exec_waiting(cc, direct)); return (0); } @@ -1166,7 +1210,7 @@ again: * just wait for the current invocation to * finish. */ - while (cc->cc_exec_entity[direct].cc_curr == c) { + while (cc_exec_curr(cc, direct) == c) { /* * Use direct calls to sleepqueue interface * instead of cv/msleep in order to avoid @@ -1187,7 +1231,7 @@ again: if (!sq_locked) { CC_UNLOCK(cc); sleepq_lock( - &cc->cc_exec_entity[direct].cc_waiting); + &cc_exec_waiting(cc, direct)); sq_locked = 1; old_cc = cc; goto again; @@ -1199,15 +1243,15 @@ again: * will be packed up, just let softclock() * take care of it. */ - cc->cc_exec_entity[direct].cc_waiting = true; + cc_exec_waiting(cc, direct) = true; DROP_GIANT(); CC_UNLOCK(cc); sleepq_add( - &cc->cc_exec_entity[direct].cc_waiting, + &cc_exec_waiting(cc, direct), &cc->cc_lock.lock_object, "codrain", SLEEPQ_SLEEP, 0); sleepq_wait( - &cc->cc_exec_entity[direct].cc_waiting, + &cc_exec_waiting(cc, direct), 0); sq_locked = 0; old_cc = NULL; @@ -1217,7 +1261,8 @@ again: CC_LOCK(cc); } } else if (use_lock && - !cc->cc_exec_entity[direct].cc_cancel) { + !cc_exec_cancel(cc, direct)) { + /* * The current callout is waiting for its * lock which we hold. Cancel the callout @@ -1225,7 +1270,7 @@ again: * lock, the callout will be skipped in * softclock(). */ - cc->cc_exec_entity[direct].cc_cancel = true; + cc_exec_cancel(cc, direct) = true; CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p", c, c->c_func, c->c_arg); KASSERT(!cc_cce_migrating(cc, direct), @@ -1233,12 +1278,34 @@ again: CC_UNLOCK(cc); KASSERT(!sq_locked, ("sleepqueue chain locked")); return (1); - } else if ((c->c_flags & CALLOUT_DFRMIGRATION) != 0) { + } else if (callout_migrating(c)) { + /* + * The callout is currently being serviced + * and the "next" callout is scheduled at + * its completion with a migration. We remove + * the migration flag so it *won't* get rescheduled, + * but we can't stop the one thats running so + * we return 0. + */ c->c_flags &= ~CALLOUT_DFRMIGRATION; +#ifdef SMP + /* + * We can't call cc_cce_cleanup here since + * if we do it will remove .ce_curr and + * its still running. This will prevent a + * reschedule of the callout when the + * execution completes. + */ + cc_migration_cpu(cc, direct) = CPUBLOCK; + cc_migration_time(cc, direct) = 0; + cc_migration_prec(cc, direct) = 0; + cc_migration_func(cc, direct) = NULL; + cc_migration_arg(cc, direct) = NULL; +#endif CTR3(KTR_CALLOUT, "postponing stop %p func %p arg %p", c, c->c_func, c->c_arg); CC_UNLOCK(cc); - return (1); + return (0); } CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); @@ -1247,20 +1314,21 @@ again: return (0); } if (sq_locked) - sleepq_release(&cc->cc_exec_entity[direct].cc_waiting); + sleepq_release(&cc_exec_waiting(cc, direct)); c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p", c, c->c_func, c->c_arg); - if ((c->c_flags & CALLOUT_PROCESSED) == 0) { - if (cc->cc_exec_next_dir == c) - cc->cc_exec_next_dir = LIST_NEXT(c, c_links.le); - LIST_REMOVE(c, c_links.le); - } else - TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); + if (not_on_a_list == 0) { + if ((c->c_flags & CALLOUT_PROCESSED) == 0) { + if (cc_exec_next(cc, direct) == c) + cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le); + LIST_REMOVE(c, c_links.le); + } else + TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); + } callout_cc_del(c, cc); - CC_UNLOCK(cc); return (1); } Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Mon Feb 9 19:19:13 2015 (r278468) +++ head/sys/sys/callout.h Mon Feb 9 19:19:44 2015 (r278469) @@ -64,6 +64,7 @@ struct callout_handle { #ifdef _KERNEL #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) +#define callout_migrating(c) ((c)->c_flags & CALLOUT_DFRMIGRATION) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) #define callout_drain(c) _callout_stop_safe(c, 1) void callout_init(struct callout *, int); From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:21:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4238AD4E; Mon, 9 Feb 2015 19:21:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F46DEF; Mon, 9 Feb 2015 19:21:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JL0Pu064822; Mon, 9 Feb 2015 19:21:00 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JL0S8064817; Mon, 9 Feb 2015 19:21:00 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502091921.t19JL0S8064817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 9 Feb 2015 19:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278470 - head/usr.sbin/bsdconfig/includes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:21:00 -0000 Author: dteske Date: Mon Feb 9 19:20:59 2015 New Revision: 278470 URL: https://svnweb.freebsd.org/changeset/base/278470 Log: Add new alias "bsdconfig api" (same as "bsdconfig includes") NB: My fingers like typing "api" a lot more than "includes" MFC after: 3 days Modified: head/usr.sbin/bsdconfig/includes/INDEX Modified: head/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 19:19:44 2015 (r278469) +++ head/usr.sbin/bsdconfig/includes/INDEX Mon Feb 9 19:20:59 2015 (r278470) @@ -45,6 +45,7 @@ menu_help="" # can be i18n'ed but `command' is the name of a script. # menu_selection="includes|includes" +menu_selection="api|includes" # # ------------ Items below this line do NOT need i18n translation ------------ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:21:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 139A0F7F; Mon, 9 Feb 2015 19:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3F90102; Mon, 9 Feb 2015 19:21:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JLsLd065468; Mon, 9 Feb 2015 19:21:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JLs8F065467; Mon, 9 Feb 2015 19:21:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502091921.t19JLs8F065467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 9 Feb 2015 19:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278471 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:21:55 -0000 Author: nwhitehorn Date: Mon Feb 9 19:21:54 2015 New Revision: 278471 URL: https://svnweb.freebsd.org/changeset/base/278471 Log: Distribute interrupts across multiple CPUs in SMP configurations instead of sending them all to CPU 0. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Mon Feb 9 19:20:59 2015 (r278470) +++ head/sys/powerpc/pseries/xics.c Mon Feb 9 19:21:54 2015 (r278471) @@ -197,13 +197,25 @@ xicp_bind(device_t dev, u_int irq, cpuse { struct xicp_softc *sc = device_get_softc(dev); cell_t status, cpu; + int ncpus, i; /* - * This doesn't appear to actually support affinity groups, so just - * use the first CPU. + * This doesn't appear to actually support affinity groups, so pick a + * random CPU. */ CPU_FOREACH(cpu) - if (CPU_ISSET(cpu, &cpumask)) break; + if (CPU_ISSET(cpu, &cpumask)) ncpus++; + + i = mftb() % ncpus; + ncpus = 0; + CPU_FOREACH(cpu) { + if (!CPU_ISSET(cpu, &cpumask)) + continue; + if (ncpus == i) + break; + ncpus++; + } + rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, XICP_PRIORITY, &status); From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:24:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48A05233; Mon, 9 Feb 2015 19:24:45 +0000 (UTC) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAF83122; Mon, 9 Feb 2015 19:24:44 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x13so8953939wgg.12; Mon, 09 Feb 2015 11:24:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zdn0MCwk6aImxTrO9Nr3E9swg1Uo4/bU8ov4+9lrVD8=; b=VNkN0FrmBgZ+wURkchEJzp5hdfebLjoqBh6nmI5WElXYH4VFExynMSZLk+5LDkh4qL Z8k4bx5oIa4G7KVcijJGljyNiUZpKv0oRwdABkrCqAVvfXPExbeYx+oQOTzP4+40WRFr /y6GVFE7M3TUTSUHSqWarroMDZT9Jp2h8Qs4/1rpkLk2yWKzv1Kv/+JDQmOBuXWFwwZF wGqMWk3cLTYCyY9RM2B/uKsnFQ0n4r7rnTUrg/MzI2ZUoVi9G799M3oaBOZaZN6sPP78 2VzNOYY3bLM7R5QWx6VtbDFtK5Xs1QjImcUg1AusDpLsf/lPnRmsSiSFIVxn3uijV4xH MXSQ== X-Received: by 10.180.73.241 with SMTP id o17mr31314441wiv.16.1423509883241; Mon, 09 Feb 2015 11:24:43 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id fo17sm17619088wjc.19.2015.02.09.11.24.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 11:24:42 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 9 Feb 2015 20:24:40 +0100 From: Baptiste Daroussin To: Devin Teske Subject: Re: svn commit: r278467 - head/usr.sbin/bsdconfig/share Message-ID: <20150209192440.GL29891@ivaldir.etoilebsd.net> References: <201502091916.t19JGJcO061055@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="37cJpJlYZwAfNbm5" Content-Disposition: inline In-Reply-To: <201502091916.t19JGJcO061055@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:24:45 -0000 --37cJpJlYZwAfNbm5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 07:16:19PM +0000, Devin Teske wrote: > Author: dteske > Date: Mon Feb 9 19:16:19 2015 > New Revision: 278467 > URL: https://svnweb.freebsd.org/changeset/base/278467 >=20 > Log: > Replace the only instance of sed(1) in bsdconfig(8) with awk(1). > =20 > MFC after: 3 days >=20 > Modified: > head/usr.sbin/bsdconfig/share/keymap.subr >=20 > Modified: head/usr.sbin/bsdconfig/share/keymap.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 17:53:16 2015 (r= 278466) > +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 19:16:19 2015 (r= 278467) > @@ -219,7 +219,7 @@ f_keymap_get_all() > echo -n "$k " > # NOTE: Translate '8x8' to '8x08' before sending to > # sort(1) so that things work out as we might expect. > - debug=3D keymap_$k get desc | sed -e 's/8x8/8x08/g' > + debug=3D keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' > done | sort -k2 | awk '{ > printf "%s%s", (started ? " " : ""), $1; started =3D 1 > }' Out of curiosity what is the point of preferring awk over sed? the awk bina= ry being larger and depending on 2 libraries versus sed only depending on one? Best regards, Bapt --37cJpJlYZwAfNbm5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTZCXgACgkQ8kTtMUmk6EyOJACgjY6q9gMxurf/We39qh9NaglW SNYAoLJpxSASyEcv6T8QY1cVRJu7jt3y =o4o2 -----END PGP SIGNATURE----- --37cJpJlYZwAfNbm5-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:28:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FF184B6; Mon, 9 Feb 2015 19:28:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217FC171; Mon, 9 Feb 2015 19:28:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19JSC3b066300; Mon, 9 Feb 2015 19:28:12 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19JSC5P066293; Mon, 9 Feb 2015 19:28:12 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201502091928.t19JSC5P066293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Mon, 9 Feb 2015 19:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278472 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:28:13 -0000 Author: rrs Date: Mon Feb 9 19:28:11 2015 New Revision: 278472 URL: https://svnweb.freebsd.org/changeset/base/278472 Log: This fixes a bug in the way that the LLE timers for nd6 and arp were being used. They basically would pass in the mutex to the callout_init. Because they used this method to the callout system, it was possible to "stop" the callout. When flushing the table and you stopped the running callout, the callout_stop code would return 1 indicating that it was going to stop the callout (that was about to run on the callout_wheel blocked by the function calling the stop). Now when 1 was returned, it would lower the reference count one extra time for the stopped timer, then a few lines later delete the memory. Of course the callout_wheel was stuck in the lock code and would then crash since it was accessing freed memory. By using callout_init(c, 1) we always get a 0 back and the reference counting bug does not rear its head. We do have to make a few adjustments to the callouts themselves though to make sure it does the proper thing if rescheduled as well as gets the lock. Commented upon by hiren and sbruno See Phabricator D1777 for more details. Commented upon by hiren and sbruno Reviewed by: adrian, jhb and bz Sponsored by: Netflix Inc. Modified: head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet6/in6.c head/sys/netinet6/nd6.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Feb 9 19:21:54 2015 (r278471) +++ head/sys/netinet/if_ether.c Mon Feb 9 19:28:11 2015 (r278472) @@ -166,10 +166,28 @@ arptimer(void *arg) struct ifnet *ifp; if (lle->la_flags & LLE_STATIC) { - LLE_WUNLOCK(lle); return; } - + LLE_WLOCK(lle); + if (callout_pending(&lle->la_timer)) { + /* + * Here we are a bit odd here in the treatment of + * active/pending. If the pending bit is set, it got + * rescheduled before I ran. The active + * bit we ignore, since if it was stopped + * in ll_tablefree() and was currently running + * it would have return 0 so the code would + * not have deleted it since the callout could + * not be stopped so we want to go through + * with the delete here now. If the callout + * was restarted, the pending bit will be back on and + * we just want to bail since the callout_reset would + * return 1 and our reference would have been removed + * by arpresolve() below. + */ + LLE_WUNLOCK(lle); + return; + } ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Feb 9 19:21:54 2015 (r278471) +++ head/sys/netinet/in.c Mon Feb 9 19:28:11 2015 (r278472) @@ -962,8 +962,7 @@ in_lltable_new(const struct sockaddr *l3 lle->base.lle_refcnt = 1; lle->base.lle_free = in_lltable_free; LLE_LOCK_INIT(&lle->base); - callout_init_rw(&lle->base.la_timer, &lle->base.lle_lock, - CALLOUT_RETURNUNLOCKED); + callout_init(&lle->base.la_timer, 1); return (&lle->base); } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Feb 9 19:21:54 2015 (r278471) +++ head/sys/netinet6/in6.c Mon Feb 9 19:28:11 2015 (r278472) @@ -2047,8 +2047,7 @@ in6_lltable_new(const struct sockaddr *l lle->base.lle_refcnt = 1; lle->base.lle_free = in6_lltable_free; LLE_LOCK_INIT(&lle->base); - callout_init_rw(&lle->base.ln_timer_ch, &lle->base.lle_lock, - CALLOUT_RETURNUNLOCKED); + callout_init(&lle->base.ln_timer_ch, 1); return (&lle->base); } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Feb 9 19:21:54 2015 (r278471) +++ head/sys/netinet6/nd6.c Mon Feb 9 19:28:11 2015 (r278472) @@ -473,9 +473,28 @@ nd6_llinfo_timer(void *arg) KASSERT(arg != NULL, ("%s: arg NULL", __func__)); ln = (struct llentry *)arg; - LLE_WLOCK_ASSERT(ln); + LLE_WLOCK(ln); + if (callout_pending(&ln->la_timer)) { + /* + * Here we are a bit odd here in the treatment of + * active/pending. If the pending bit is set, it got + * rescheduled before I ran. The active + * bit we ignore, since if it was stopped + * in ll_tablefree() and was currently running + * it would have return 0 so the code would + * not have deleted it since the callout could + * not be stopped so we want to go through + * with the delete here now. If the callout + * was restarted, the pending bit will be back on and + * we just want to bail since the callout_reset would + * return 1 and our reference would have been removed + * by nd6_llinfo_settimer_locked above since canceled + * would have been 1. + */ + LLE_WUNLOCK(ln); + return; + } ifp = ln->lle_tbl->llt_ifp; - CURVNET_SET(ifp->if_vnet); if (ln->ln_ntick > 0) { From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:52:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C2B3A5C; Mon, 9 Feb 2015 19:52:15 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 360A664B; Mon, 9 Feb 2015 19:52:15 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:49341 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YKFUF-000C0Z-IS; Sat, 07 Feb 2015 16:12:31 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r278467 - head/usr.sbin/bsdconfig/share From: Devin Teske In-Reply-To: <20150209192440.GL29891@ivaldir.etoilebsd.net> Date: Mon, 9 Feb 2015 11:51:59 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <1036F58E-88F8-4058-85AE-B4D2ACA04B81@FreeBSD.org> References: <201502091916.t19JGJcO061055@svn.freebsd.org> <20150209192440.GL29891@ivaldir.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 19:52:15 -0000 sed was an odd-man out. awk is used almost 200 times, and sed only once. Consider it the removal of an unnecessary dependency. If there were similar cases of a utility only being used once, I would probably do the same thing (e.g., if =E2=80=9Ctr=E2=80=9D was = used only once, I might convert it to =E2=80=9Cawk=E2=80=9D). I=E2=80=99m very big on minimizing dependencies because I use this stuff in embedded situations. Yeah, the sed binary is smaller=E2=80=A6 but it just didn=E2=80=99t make = much sense to me to use sed only once when awk would do just fine (considering awk is a hard-and-fast dependency with almost 200+ occurrences). =E2=80=94=20 Devin P.S. Sorry for top-posting. > On Feb 9, 2015, at 11:24 AM, Baptiste Daroussin = wrote: >=20 > On Mon, Feb 09, 2015 at 07:16:19PM +0000, Devin Teske wrote: >> Author: dteske >> Date: Mon Feb 9 19:16:19 2015 >> New Revision: 278467 >> URL: https://svnweb.freebsd.org/changeset/base/278467 >>=20 >> Log: >> Replace the only instance of sed(1) in bsdconfig(8) with awk(1). >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/usr.sbin/bsdconfig/share/keymap.subr >>=20 >> Modified: head/usr.sbin/bsdconfig/share/keymap.subr >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 = 17:53:16 2015 (r278466) >> +++ head/usr.sbin/bsdconfig/share/keymap.subr Mon Feb 9 = 19:16:19 2015 (r278467) >> @@ -219,7 +219,7 @@ f_keymap_get_all() >> echo -n "$k " >> # NOTE: Translate '8x8' to '8x08' before sending = to >> # sort(1) so that things work out as we might = expect. >> - debug=3D keymap_$k get desc | sed -e = 's/8x8/8x08/g' >> + debug=3D keymap_$k get desc | awk = 'gsub(/8x8/,"8x08")||1' >> done | sort -k2 | awk '{ >> printf "%s%s", (started ? " " : ""), $1; started = =3D 1 >> }' >=20 > Out of curiosity what is the point of preferring awk over sed? the awk = binary > being larger and depending on 2 libraries versus sed only depending on = one? >=20 > Best regards, > Bapt From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:19:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6A3D22C; Mon, 9 Feb 2015 20:19:32 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D043A92A; Mon, 9 Feb 2015 20:19:32 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 1EA80CE2F1; Mon, 9 Feb 2015 12:19:26 -0800 (PST) Date: Mon, 9 Feb 2015 12:19:26 -0800 From: hiren panchasara To: Randall Stewart Subject: Re: svn commit: r278469 - in head/sys: kern sys Message-ID: <20150209201926.GF10438@strugglingcoder.info> References: <201502091919.t19JJjbg061542@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rMWmSaSbD7nr+du9" Content-Disposition: inline In-Reply-To: <201502091919.t19JJjbg061542@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:19:33 -0000 --rMWmSaSbD7nr+du9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/09/15 at 07:19P, Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:19:44 2015 > New Revision: 278469 > URL: https://svnweb.freebsd.org/changeset/base/278469 >=20 > Log: > This fixes two conditions that can incur when migration > is being done in the callout code and harmonizes the macro > use.: > 1) The callout_active() will lie. Basically if a migration > is occuring and the callout is about to expire and the > migration has been deferred, the callout_active will no > longer return true until after the migration. This confuses > and breaks callers that are doing callout_init(&c, 1); such > as TCP. > 2) The migration code had a bug in it where when migrating, if > a two calls to callout_reset came in and they both collided with > the callout on the wheel about to run, then the second call to > callout_reset would corrupt the list the callout wheel uses > putting the callout thread into a endless loop. > 3) Per imp, I have fixed all the macro occurance in the code that > were for the most part being ignored. > =20 > Phabricator D1711 and looked at by lstewart and jhb and sbruno. > Reviewed by: kostikbel, imp, adrian, hselasky > MFC after: 3 days > Sponsored by: Netflix Inc. Thanks Randall for the fix. For future reference, correct way to specify phabric review is: Differential Revision: https://reviews.freebsd.org/D1711=20 This triggers changes to the review on phabricator with reference to this commit. Cheers, Hiren --rMWmSaSbD7nr+du9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU2RZNXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lsHAH/REclGA0grPhcrccQAuNRKC0 WDITbuzvrR9CHqs+1Wv1CvxbvcDKijP+itfpZG3k6MJWqjgLm4TUO94UYTq8oqIg tD3Wi/p12D7w5x7FYDgebAXKDEaCdIczv0Aiho4pwF1aoRQ2r9EzRJAuzAzqEFX3 4z6gHqXAkqGEYPKIwPIEO3tPE3JflBqDUhIt64cGrZHGsiaNhhw2zrrgyaga6wFq PS62XDV+y2dDnv/m3i+gz1Vw34uFq6okGf6tYWYYuM62/SBsyT8tO3FbvHlRovUf XeQbgpcPZmuUPhSvnPGT4wWjlftIZFXhA4CFjrcjN8QZipXOizffMlqES98vziQ= =yMIe -----END PGP SIGNATURE----- --rMWmSaSbD7nr+du9-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:22:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39427381; Mon, 9 Feb 2015 20:22:51 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2303A9CD; Mon, 9 Feb 2015 20:22:51 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id D5345CE40C; Mon, 9 Feb 2015 12:22:50 -0800 (PST) Date: Mon, 9 Feb 2015 12:22:50 -0800 From: hiren panchasara To: Randall Stewart Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150209202250.GG10438@strugglingcoder.info> References: <201502091928.t19JSC5P066293@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rV8arf8D5Dod9UkK" Content-Disposition: inline In-Reply-To: <201502091928.t19JSC5P066293@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:22:51 -0000 --rV8arf8D5Dod9UkK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/09/15 at 07:28P, Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:28:11 2015 > New Revision: 278472 > URL: https://svnweb.freebsd.org/changeset/base/278472 >=20 > Log: > This fixes a bug in the way that the LLE timers for nd6 > and arp were being used. They basically would pass in the > mutex to the callout_init. Because they used this method > to the callout system, it was possible to "stop" the callout. > When flushing the table and you stopped the running callout, the > callout_stop code would return 1 indicating that it was going > to stop the callout (that was about to run on the callout_wheel blocked > by the function calling the stop). Now when 1 was returned, it would > lower the reference count one extra time for the stopped timer, then > a few lines later delete the memory. Of course the callout_wheel was > stuck in the lock code and would then crash since it was accessing > freed memory. By using callout_init(c, 1) we always get a 0 back > and the reference counting bug does not rear its head. We do have > to make a few adjustments to the callouts themselves though to make > sure it does the proper thing if rescheduled as well as gets the lock. > =20 > Commented upon by hiren and sbruno > See Phabricator D1777 for more details. > =20 > Commented upon by hiren and sbruno > Reviewed by: adrian, jhb and bz > Sponsored by: Netflix Inc. Thanks for the fix, Randall. When do you plan to MFC this? It'd be nice to have this MFC'd along with D1711 changes so that we do not see panics reported in the review. Cheers, Hiren --rV8arf8D5Dod9UkK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU2RcYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lfGsH/RBD/Yeu9OLknO1vN7bS1poh WBrOx3TK0DxjMCECVuigWMucPf1bY6H5kr4GQtjzUihv5nJjanUstgT6WGyHvUn0 4SH+5H9vGT3g4msgMkAK8oQjgbgw2sY7M861v8/TQGlqJ/jkF7x0qr4auHbS/H2/ 4PZO3wveFihye828u6IOwRlFGFoW6g+4CZaFRH74gHskYWywDiloMCOvV/gaw49i HkZb0GNeo22yW/IVhwWa+M91KxNDhQS/e3R+DrI4ta4LdZSUMAyfi4cPy9isy7G8 iw+KM3GbYAemVy5KaJyZG0GTPSw0EZhRJ++DUkMaT4fY5NxEfl4pjoSIjZG/pTc= =+Lmp -----END PGP SIGNATURE----- --rV8arf8D5Dod9UkK-- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:34:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E38907DF; Mon, 9 Feb 2015 20:34:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC76AAD8; Mon, 9 Feb 2015 20:34:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D4677B945; Mon, 9 Feb 2015 15:34:37 -0500 (EST) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Date: Mon, 09 Feb 2015 15:11:21 -0500 Message-ID: <1903622.i3cFFNVYcL@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502091928.t19JSC5P066293@svn.freebsd.org> References: <201502091928.t19JSC5P066293@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 15:34:37 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:34:40 -0000 On Monday, February 09, 2015 07:28:12 PM Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:28:11 2015 > New Revision: 278472 > URL: https://svnweb.freebsd.org/changeset/base/278472 > > Log: > This fixes a bug in the way that the LLE timers for nd6 > and arp were being used. They basically would pass in the > mutex to the callout_init. Because they used this method > to the callout system, it was possible to "stop" the callout. > When flushing the table and you stopped the running callout, the > callout_stop code would return 1 indicating that it was going > to stop the callout (that was about to run on the callout_wheel blocked > by the function calling the stop). Now when 1 was returned, it would > lower the reference count one extra time for the stopped timer, then > a few lines later delete the memory. Of course the callout_wheel was > stuck in the lock code and would then crash since it was accessing > freed memory. By using callout_init(c, 1) we always get a 0 back > and the reference counting bug does not rear its head. We do have > to make a few adjustments to the callouts themselves though to make > sure it does the proper thing if rescheduled as well as gets the lock. > > Commented upon by hiren and sbruno > See Phabricator D1777 for more details. > > Commented upon by hiren and sbruno > Reviewed by: adrian, jhb and bz > Sponsored by: Netflix Inc. Eh, I looked at it, but I really, really don't like it. I think callout_init_*() should be preferred to CALLOUT_MPSAFE whenever possible as it is less race-prone. I think this should probably be fixed by adding Hans' callout_drain_async() instead, though this is fine as a temporary workaround. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:34:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D9F57E1; Mon, 9 Feb 2015 20:34:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBD10AD9; Mon, 9 Feb 2015 20:34:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 92AA5B97B; Mon, 9 Feb 2015 15:34:38 -0500 (EST) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r278469 - in head/sys: kern sys Date: Mon, 09 Feb 2015 15:09:46 -0500 Message-ID: <1619204.FQlXD7hmMU@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502091919.t19JJjbg061542@svn.freebsd.org> References: <201502091919.t19JJjbg061542@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 15:34:38 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:34:40 -0000 On Monday, February 09, 2015 07:19:45 PM Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:19:44 2015 > New Revision: 278469 > URL: https://svnweb.freebsd.org/changeset/base/278469 > > Log: > This fixes two conditions that can incur when migration > is being done in the callout code and harmonizes the macro > use.: > 1) The callout_active() will lie. Basically if a migration > is occuring and the callout is about to expire and the > migration has been deferred, the callout_active will no > longer return true until after the migration. This confuses > and breaks callers that are doing callout_init(&c, 1); such > as TCP. > 2) The migration code had a bug in it where when migrating, if > a two calls to callout_reset came in and they both collided with > the callout on the wheel about to run, then the second call to > callout_reset would corrupt the list the callout wheel uses > putting the callout thread into a endless loop. > 3) Per imp, I have fixed all the macro occurance in the code that > were for the most part being ignored. > > Phabricator D1711 and looked at by lstewart and jhb and sbruno. > Reviewed by: kostikbel, imp, adrian, hselasky > MFC after: 3 days > Sponsored by: Netflix Inc. Thank you guys for working together to fix the migration race in a way that lets CALLOUT_MPSAFE timers use multiple CPUs still. I do think that callout_drain_async() would also be useful to add. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:47:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D08CAF44 for ; Mon, 9 Feb 2015 20:47:56 +0000 (UTC) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 6D558C96 for ; Mon, 9 Feb 2015 20:47:55 +0000 (UTC) Received: (qmail 61314 invoked from network); 9 Feb 2015 20:41:13 -0000 Received: from 188.182.139.176 (HELO x2.osted.lan) (188.182.139.176) by relay03.pair.com with SMTP; 9 Feb 2015 20:41:13 -0000 X-pair-Authenticated: 188.182.139.176 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id t19KfBHx047323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 9 Feb 2015 21:41:12 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id t19KfBPn047322; Mon, 9 Feb 2015 21:41:11 +0100 (CET) (envelope-from pho) Date: Mon, 9 Feb 2015 21:41:11 +0100 From: Peter Holm To: Randall Stewart Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150209204111.GA47080@x2.osted.lan> References: <201502091928.t19JSC5P066293@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502091928.t19JSC5P066293@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:47:57 -0000 On Mon, Feb 09, 2015 at 07:28:12PM +0000, Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:28:11 2015 > New Revision: 278472 > URL: https://svnweb.freebsd.org/changeset/base/278472 > > Log: > This fixes a bug in the way that the LLE timers for nd6 > and arp were being used. They basically would pass in the > mutex to the callout_init. Because they used this method > to the callout system, it was possible to "stop" the callout. > When flushing the table and you stopped the running callout, the > callout_stop code would return 1 indicating that it was going > to stop the callout (that was about to run on the callout_wheel blocked > by the function calling the stop). Now when 1 was returned, it would > lower the reference count one extra time for the stopped timer, then > a few lines later delete the memory. Of course the callout_wheel was > stuck in the lock code and would then crash since it was accessing > freed memory. By using callout_init(c, 1) we always get a 0 back > and the reference counting bug does not rear its head. We do have > to make a few adjustments to the callouts themselves though to make > sure it does the proper thing if rescheduled as well as gets the lock. > > Commented upon by hiren and sbruno > See Phabricator D1777 for more details. > > Commented upon by hiren and sbruno > Reviewed by: adrian, jhb and bz > Sponsored by: Netflix Inc. > > Modified: > head/sys/netinet/if_ether.c > head/sys/netinet/in.c > head/sys/netinet6/in6.c > head/sys/netinet6/nd6.c > Could this be yours? db:0:pho> bt Tracing pid 9629 tid 100639 td 0xfffff8011cce14a0 in6_lltable_lookup() at in6_lltable_lookup+0x11a/frame 0xfffffe081e426200 nd6_output() at nd6_output+0x15d/frame 0xfffffe081e426290 ip6_output() at ip6_output+0x2128/frame 0xfffffe081e426790 tcp_output() at tcp_output+0x2dae/frame 0xfffffe081e426c30 tcp_usr_send() at tcp_usr_send+0x2fe/frame 0xfffffe081e426cb0 sosend_generic() at sosend_generic+0x414/frame 0xfffffe081e426d60 clnt_vc_call() at clnt_vc_call+0x477/frame 0xfffffe081e426ec0 clnt_reconnect_call() at clnt_reconnect_call+0x46c/frame 0xfffffe081e426f70 newnfs_request() at newnfs_request+0x9ba/frame 0xfffffe081e4270d0 nfscl_request() at nfscl_request+0x72/frame 0xfffffe081e427120 nfsrpc_lookup() at nfsrpc_lookup+0x213/frame 0xfffffe081e4272a0 nfs_lookup() at nfs_lookup+0x467/frame 0xfffffe081e4275c0 VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0x10f/frame 0xfffffe081e4275f0 lookup() at lookup+0x5d5/frame 0xfffffe081e427680 namei() at namei+0x536/frame 0xfffffe081e427740 kern_statat() at kern_statat+0xae/frame 0xfffffe081e427900 sys_fstatat() at sys_fstatat+0x2c/frame 0xfffffe081e4279a0 amd64_syscall() at amd64_syscall+0x29c/frame 0xfffffe081e427ab0 http://people.freebsd.org/~pho/stress/log/rrs003.txt - Peter From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:59:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5ADE3A5; Mon, 9 Feb 2015 20:59:51 +0000 (UTC) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3C54DAC; Mon, 9 Feb 2015 20:59:51 +0000 (UTC) Received: by iecat20 with SMTP id at20so11281984iec.12; Mon, 09 Feb 2015 12:59:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EhETXsXuParWGWOE+USnKmfJUHcFWUIG3/toq3g8RDI=; b=Al5REdEgRoL2VPkXpzwO6mEHZBAnZaYrqxsKFIHd2QCVcYdloeQ4eCStKqulmDMPh5 Nw6QTfsP4P+3XDnjix1nQ0lirBN+VZima8yZZVPFXOmYZIiO0kMRWkJKGembkFrPFCRK xTwXkYyBEh5GdpVXfwpaIFexIIJ/xQAaXWK4hQ32MVotdi5R7050yfH8pEUqmNL2c5IK FTM2yvb7iF6lsN9mB1m9ysQH6Q69xOwcTQa6+daCcSLZ+BvYpN6/98M0QzZ2ELqCw/IY wcgPCwfGa2Vy3acB4OOc7qkj7i9pak4GNFzbovlTSHhDAOFRuod7wcgk5NR9XP8kiDDL tNuQ== MIME-Version: 1.0 X-Received: by 10.107.19.202 with SMTP id 71mr3912128iot.83.1423515584796; Mon, 09 Feb 2015 12:59:44 -0800 (PST) Received: by 10.50.182.233 with HTTP; Mon, 9 Feb 2015 12:59:44 -0800 (PST) In-Reply-To: <20150209201926.GF10438@strugglingcoder.info> References: <201502091919.t19JJjbg061542@svn.freebsd.org> <20150209201926.GF10438@strugglingcoder.info> Date: Mon, 9 Feb 2015 12:59:44 -0800 Message-ID: Subject: Re: svn commit: r278469 - in head/sys: kern sys From: NGie Cooper To: hiren panchasara Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , Randall Stewart , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:59:52 -0000 On Mon, Feb 9, 2015 at 12:19 PM, hiren panchasara wrote: ... > Thanks Randall for the fix. > > For future reference, correct way to specify phabric review is: > Differential Revision: https://reviews.freebsd.org/D1711 > > This triggers changes to the review on phabricator with reference to this > commit. This should be documented in the Committer's Guide: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197500 From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:01:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FC9F504; Mon, 9 Feb 2015 21:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09294DBE; Mon, 9 Feb 2015 21:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19L11JL010989; Mon, 9 Feb 2015 21:01:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19L0vsv010944; Mon, 9 Feb 2015 21:00:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502092100.t19L0vsv010944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Feb 2015 21:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:01:02 -0000 Author: kib Date: Mon Feb 9 21:00:56 2015 New Revision: 278473 URL: https://svnweb.freebsd.org/changeset/base/278473 Log: Add x2APIC support. Enable it by default if CPU is capable. The hw.x2apic_enable tunable allows disabling it from the loader prompt. To closely repeat effects of the uncached memory ops when accessing registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded by mfence, except for the EOI notifications. This is probably too strict, only ICR writes to send IPI require serialization to ensure that other CPUs see the previous actions when IPI is delivered. This may be changed later. In vmm justreturn IPI handler, call doreti_iret instead of doing iretd inline, to handle corner conditions. Note that the patch only switches LAPICs into x2APIC mode. It does not enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC MADT entries and doing interrupts remapping, but is the required step on the way. Reviewed by: neel Tested by: pho (real hardware), neel (on bhyve) Discussed with: jhb, grehan Sponsored by: The FreeBSD Foundation MFC after: 2 months Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/cpufunc.h head/sys/amd64/vmm/vmm_support.S head/sys/contrib/dev/acpica/include/actbl2.h head/sys/i386/i386/apic_vector.s head/sys/i386/i386/genassym.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/cpufunc.h head/sys/x86/acpica/madt.c head/sys/x86/include/apicreg.h head/sys/x86/include/apicvar.h head/sys/x86/include/specialreg.h head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/amd64/amd64/apic_vector.S Mon Feb 9 21:00:56 2015 (r278473) @@ -39,6 +39,7 @@ #include "opt_smp.h" #include +#include #include #include "assym.s" @@ -49,6 +50,22 @@ #define LK #endif + .text + SUPERALIGN_TEXT + /* End Of Interrupt to APIC */ +as_lapic_eoi: + cmpl $0,x2apic_mode + jne 1f + movq lapic_map,%rax + movl $0,LA_EOI(%rax) + ret +1: + movl $MSR_APIC_EOI,%ecx + xorl %eax,%eax + xorl %edx,%edx + wrmsr + ret + /* * I/O Interrupt Entry Point. Rather than having one entry point for * each interrupt source, we use one entry point for each 32-bit word @@ -62,15 +79,22 @@ IDTVEC(vec_name) ; \ PUSH_FRAME ; \ FAKE_MCOUNT(TF_RIP(%rsp)) ; \ - movq lapic, %rdx ; /* pointer to local APIC */ \ + cmpl $0,x2apic_mode ; \ + je 1f ; \ + movl $(MSR_APIC_ISR0 + index),%ecx ; \ + rdmsr ; \ + jmp 2f ; \ +1: ; \ + movq lapic_map, %rdx ; /* pointer to local APIC */ \ movl LA_ISR + 16 * (index)(%rdx), %eax ; /* load ISR */ \ +2: ; \ bsrl %eax, %eax ; /* index of highest set bit in ISR */ \ - jz 1f ; \ + jz 3f ; \ addl $(32 * index),%eax ; \ movq %rsp, %rsi ; \ movl %eax, %edi ; /* pass the IRQ */ \ call lapic_handle_intr ; \ -1: ; \ +3: ; \ MEXITCOUNT ; \ jmp doreti @@ -160,8 +184,7 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT invltlb_ret: - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ + call as_lapic_eoi POP_FRAME jmp doreti_iret @@ -228,8 +251,7 @@ IDTVEC(invlcache) IDTVEC(ipi_intr_bitmap_handler) PUSH_FRAME - movq lapic, %rdx - movl $0, LA_EOI(%rdx) /* End Of Interrupt to APIC */ + call as_lapic_eoi FAKE_MCOUNT(TF_RIP(%rsp)) @@ -245,8 +267,7 @@ IDTVEC(ipi_intr_bitmap_handler) IDTVEC(cpustop) PUSH_FRAME - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ + call as_lapic_eoi call cpustop_handler jmp doreti @@ -260,8 +281,7 @@ IDTVEC(cpususpend) PUSH_FRAME call cpususpend_handler - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ + call as_lapic_eoi jmp doreti /* @@ -279,7 +299,6 @@ IDTVEC(rendezvous) incq (%rax) #endif call smp_rendezvous_action - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ + call as_lapic_eoi jmp doreti #endif /* SMP */ Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/amd64/amd64/genassym.c Mon Feb 9 21:00:56 2015 (r278473) @@ -220,13 +220,8 @@ ASSYM(PC_COMMONTSSP, offsetof(struct pcp ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss)); ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt)); -ASSYM(LA_VER, offsetof(struct LAPIC, version)); -ASSYM(LA_TPR, offsetof(struct LAPIC, tpr)); -ASSYM(LA_EOI, offsetof(struct LAPIC, eoi)); -ASSYM(LA_SVR, offsetof(struct LAPIC, svr)); -ASSYM(LA_ICR_LO, offsetof(struct LAPIC, icr_lo)); -ASSYM(LA_ICR_HI, offsetof(struct LAPIC, icr_hi)); -ASSYM(LA_ISR, offsetof(struct LAPIC, isr0)); +ASSYM(LA_EOI, LAPIC_EOI * LAPIC_MEM_MUL); +ASSYM(LA_ISR, LAPIC_ISR0 * LAPIC_MEM_MUL); ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL)); ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/amd64/amd64/mp_machdep.c Mon Feb 9 21:00:56 2015 (r278473) @@ -705,8 +705,11 @@ init_secondary(void) wrmsr(MSR_STAR, msr); wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D); - /* Disable local APIC just to be sure. */ - lapic_disable(); + /* + * On real hardware, switch to x2apic mode if possible. + * Disable local APIC until BSP directed APs to run. + */ + lapic_xapic_mode(); /* signal our startup to the BSP. */ mp_naps++; Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/amd64/include/cpufunc.h Mon Feb 9 21:00:56 2015 (r278473) @@ -343,6 +343,15 @@ rdmsr(u_int msr) return (low | ((uint64_t)high << 32)); } +static __inline uint32_t +rdmsr32(u_int msr) +{ + uint32_t low; + + __asm __volatile("rdmsr" : "=a" (low) : "c" (msr) : "rdx"); + return (low); +} + static __inline uint64_t rdpmc(u_int pmc) { @@ -826,6 +835,7 @@ u_long rcr2(void); u_long rcr3(void); u_long rcr4(void); uint64_t rdmsr(u_int msr); +uint32_t rdmsr32(u_int msr); uint64_t rdpmc(u_int pmc); uint64_t rdr0(void); uint64_t rdr1(void); Modified: head/sys/amd64/vmm/vmm_support.S ============================================================================== --- head/sys/amd64/vmm/vmm_support.S Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/amd64/vmm/vmm_support.S Mon Feb 9 21:00:56 2015 (r278473) @@ -30,13 +30,14 @@ #include -#define LA_EOI 0xB0 - .text SUPERALIGN_TEXT IDTVEC(justreturn) + pushq %rdx pushq %rax - movq lapic, %rax - movl $0, LA_EOI(%rax) + pushq %rcx + call as_lapic_eoi + popq %rcx popq %rax - iretq + popq %rdx + jmp doreti_iret Modified: head/sys/contrib/dev/acpica/include/actbl2.h ============================================================================== --- head/sys/contrib/dev/acpica/include/actbl2.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/contrib/dev/acpica/include/actbl2.h Mon Feb 9 21:00:56 2015 (r278473) @@ -466,6 +466,7 @@ typedef struct acpi_table_dmar /* Masks for Flags field above */ #define ACPI_DMAR_INTR_REMAP (1) +#define ACPI_DMAR_X2APIC_OPT_OUT (2) /* DMAR subtable header */ Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/i386/i386/apic_vector.s Mon Feb 9 21:00:56 2015 (r278473) @@ -39,10 +39,27 @@ #include "opt_smp.h" #include +#include #include #include "assym.s" + .text + SUPERALIGN_TEXT + /* End Of Interrupt to APIC */ +as_lapic_eoi: + cmpl $0,x2apic_mode + jne 1f + movl lapic_map,%eax + movl $0,LA_EOI(%eax) + ret +1: + movl $MSR_APIC_EOI,%ecx + xorl %eax,%eax + xorl %edx,%edx + wrmsr + ret + /* * I/O Interrupt Entry Point. Rather than having one entry point for * each interrupt source, we use one entry point for each 32-bit word @@ -58,16 +75,23 @@ IDTVEC(vec_name) ; \ SET_KERNEL_SREGS ; \ cld ; \ FAKE_MCOUNT(TF_EIP(%esp)) ; \ - movl lapic, %edx ; /* pointer to local APIC */ \ + cmpl $0,x2apic_mode ; \ + je 1f ; \ + movl $(MSR_APIC_ISR0 + index),%ecx ; \ + rdmsr ; \ + jmp 2f ; \ +1: ; \ + movl lapic_map, %edx ;/* pointer to local APIC */ \ movl LA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \ +2: ; \ bsrl %eax, %eax ; /* index of highest set bit in ISR */ \ - jz 1f ; \ + jz 3f ; \ addl $(32 * index),%eax ; \ pushl %esp ; \ pushl %eax ; /* pass the IRQ */ \ call lapic_handle_intr ; \ addl $8, %esp ; /* discard parameter */ \ -1: ; \ +3: ; \ MEXITCOUNT ; \ jmp doreti @@ -164,8 +188,7 @@ IDTVEC(xen_intr_upcall) .text SUPERALIGN_TEXT invltlb_ret: - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + call as_lapic_eoi POP_FRAME iret @@ -232,8 +255,7 @@ IDTVEC(ipi_intr_bitmap_handler) SET_KERNEL_SREGS cld - movl lapic, %edx - movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */ + call as_lapic_eoi FAKE_MCOUNT(TF_EIP(%esp)) @@ -251,9 +273,7 @@ IDTVEC(cpustop) SET_KERNEL_SREGS cld - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ - + call as_lapic_eoi call cpustop_handler POP_FRAME @@ -270,9 +290,7 @@ IDTVEC(cpususpend) SET_KERNEL_SREGS cld - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ - + call as_lapic_eoi call cpususpend_handler POP_FRAME @@ -298,8 +316,7 @@ IDTVEC(rendezvous) #endif call smp_rendezvous_action - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + call as_lapic_eoi POP_FRAME iret @@ -315,8 +332,7 @@ IDTVEC(lazypmap) call pmap_lazyfix_action - movl lapic, %eax - movl $0, LA_EOI(%eax) /* End Of Interrupt to APIC */ + call as_lapic_eoi POP_FRAME iret #endif /* SMP */ Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/i386/i386/genassym.c Mon Feb 9 21:00:56 2015 (r278473) @@ -219,13 +219,8 @@ ASSYM(PC_CURPMAP, offsetof(struct pcpu, ASSYM(PC_PRIVATE_TSS, offsetof(struct pcpu, pc_private_tss)); #ifdef DEV_APIC -ASSYM(LA_VER, offsetof(struct LAPIC, version)); -ASSYM(LA_TPR, offsetof(struct LAPIC, tpr)); -ASSYM(LA_EOI, offsetof(struct LAPIC, eoi)); -ASSYM(LA_SVR, offsetof(struct LAPIC, svr)); -ASSYM(LA_ICR_LO, offsetof(struct LAPIC, icr_lo)); -ASSYM(LA_ICR_HI, offsetof(struct LAPIC, icr_hi)); -ASSYM(LA_ISR, offsetof(struct LAPIC, isr0)); +ASSYM(LA_EOI, LAPIC_EOI * LAPIC_MEM_MUL); +ASSYM(LA_ISR, LAPIC_ISR0 * LAPIC_MEM_MUL); #endif ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL)); Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/i386/i386/mp_machdep.c Mon Feb 9 21:00:56 2015 (r278473) @@ -719,8 +719,11 @@ init_secondary(void) load_cr0(cr0); CHECK_WRITE(0x38, 5); - /* Disable local APIC just to be sure. */ - lapic_disable(); + /* + * On real hardware, switch to x2apic mode if possible. + * Disable local APIC until BSP directed APs to run. + */ + lapic_xapic_mode(); /* signal our startup to the BSP. */ mp_naps++; Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/i386/include/cpufunc.h Mon Feb 9 21:00:56 2015 (r278473) @@ -346,6 +346,15 @@ rdmsr(u_int msr) return (rv); } +static __inline uint32_t +rdmsr32(u_int msr) +{ + uint32_t low; + + __asm __volatile("rdmsr" : "=a" (low) : "c" (msr) : "edx"); + return (low); +} + static __inline uint64_t rdpmc(u_int pmc) { Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/acpica/madt.c Mon Feb 9 21:00:56 2015 (r278473) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -127,8 +128,27 @@ madt_probe_cpus(void) static int madt_setup_local(void) { + ACPI_TABLE_DMAR *dmartbl; + vm_paddr_t dmartbl_physaddr; madt = pmap_mapbios(madt_physaddr, madt_length); + if ((cpu_feature2 & CPUID2_X2APIC) != 0) { + x2apic_mode = 1; + dmartbl_physaddr = acpi_find_table(ACPI_SIG_DMAR); + if (dmartbl_physaddr != 0) { + dmartbl = acpi_map_table(dmartbl_physaddr, + ACPI_SIG_DMAR); + if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) { + x2apic_mode = 0; + if (bootverbose) + printf( + "x2APIC available but disabled by DMAR table\n"); + } + acpi_unmap_table(dmartbl); + } + TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); + } + lapic_init(madt->Address); printf("ACPI APIC Table: <%.*s %.*s>\n", (int)sizeof(madt->Header.OemId), madt->Header.OemId, Modified: head/sys/x86/include/apicreg.h ============================================================================== --- head/sys/x86/include/apicreg.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/include/apicreg.h Mon Feb 9 21:00:56 2015 (r278473) @@ -193,6 +193,66 @@ struct LAPIC { typedef struct LAPIC lapic_t; +enum LAPIC_REGISTERS { + LAPIC_ID = 0x2, + LAPIC_VERSION = 0x3, + LAPIC_TPR = 0x8, + LAPIC_APR = 0x9, + LAPIC_PPR = 0xa, + LAPIC_EOI = 0xb, + LAPIC_LDR = 0xd, + LAPIC_DFR = 0xe, /* Not in x2APIC */ + LAPIC_SVR = 0xf, + LAPIC_ISR0 = 0x10, + LAPIC_ISR1 = 0x11, + LAPIC_ISR2 = 0x12, + LAPIC_ISR3 = 0x13, + LAPIC_ISR4 = 0x14, + LAPIC_ISR5 = 0x15, + LAPIC_ISR6 = 0x16, + LAPIC_ISR7 = 0x17, + LAPIC_TMR0 = 0x18, + LAPIC_TMR1 = 0x19, + LAPIC_TMR2 = 0x1a, + LAPIC_TMR3 = 0x1b, + LAPIC_TMR4 = 0x1c, + LAPIC_TMR5 = 0x1d, + LAPIC_TMR6 = 0x1e, + LAPIC_TMR7 = 0x1f, + LAPIC_IRR0 = 0x20, + LAPIC_IRR1 = 0x21, + LAPIC_IRR2 = 0x22, + LAPIC_IRR3 = 0x23, + LAPIC_IRR4 = 0x24, + LAPIC_IRR5 = 0x25, + LAPIC_IRR6 = 0x26, + LAPIC_IRR7 = 0x27, + LAPIC_ESR = 0x28, + LAPIC_LVT_CMCI = 0x2f, + LAPIC_ICR_LO = 0x30, + LAPIC_ICR_HI = 0x31, /* Not in x2APIC */ + LAPIC_LVT_TIMER = 0x32, + LAPIC_LVT_THERMAL = 0x33, + LAPIC_LVT_PCINT = 0x34, + LAPIC_LVT_LINT0 = 0x35, + LAPIC_LVT_LINT1 = 0x36, + LAPIC_LVT_ERROR = 0x37, + LAPIC_ICR_TIMER = 0x38, + LAPIC_CCR_TIMER = 0x39, + LAPIC_DCR_TIMER = 0x3e, + LAPIC_SELF_IPI = 0x3f, /* Only in x2APIC */ +}; + +/* + * The LAPIC_SELF_IPI register only exists in x2APIC mode. The + * formula below is applicable only to reserve the memory region, + * i.e. for xAPIC mode, where LAPIC_SELF_IPI finely serves as the + * address past end of the region. + */ +#define LAPIC_MEM_REGION (LAPIC_SELF_IPI * 0x10) + +#define LAPIC_MEM_MUL 0x10 + /****************************************************************************** * I/O APIC structure */ Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/include/apicvar.h Mon Feb 9 21:00:56 2015 (r278473) @@ -189,6 +189,7 @@ int ioapic_set_smi(void *cookie, u_int p struct apic_ops { void (*create)(u_int, int); void (*init)(vm_paddr_t); + void (*xapic_mode)(void); void (*setup)(int); void (*dump)(const char *); void (*disable)(void); @@ -243,6 +244,13 @@ lapic_init(vm_paddr_t addr) } static inline void +lapic_xapic_mode(void) +{ + + apic_ops.xapic_mode(); +} + +static inline void lapic_setup(int boot) { @@ -417,5 +425,11 @@ void lapic_handle_intr(int vector, struc void lapic_handle_timer(struct trapframe *frame); void xen_intr_handle_upcall(struct trapframe *frame); +extern int x2apic_mode; + +#ifdef _SYS_SYSCTL_H_ +SYSCTL_DECL(_hw_apic); +#endif + #endif /* !LOCORE */ #endif /* _X86_APICVAR_H_ */ Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/include/specialreg.h Mon Feb 9 21:00:56 2015 (r278473) @@ -470,6 +470,7 @@ /* * X2APIC MSRs */ +#define MSR_APIC_000 0x800 #define MSR_APIC_ID 0x802 #define MSR_APIC_VERSION 0x803 #define MSR_APIC_TPR 0x808 Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/x86/io_apic.c Mon Feb 9 21:00:56 2015 (r278473) @@ -130,7 +130,6 @@ struct pic ioapic_template = { ioapic_en static int next_ioapic_base; static u_int next_id; -static SYSCTL_NODE(_hw, OID_AUTO, apic, CTLFLAG_RD, 0, "APIC options"); static int enable_extint; SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0, "Enable the ExtINT pin in the first I/O APIC"); @@ -896,7 +895,7 @@ apic_attach(device_t dev) int i; /* Reserve the local APIC. */ - apic_add_resource(dev, 0, lapic_paddr, sizeof(lapic_t)); + apic_add_resource(dev, 0, lapic_paddr, LAPIC_MEM_REGION); i = 1; STAILQ_FOREACH(io, &ioapic_list, io_next) { apic_add_resource(dev, i, io->io_paddr, IOAPIC_MEM_REGION); Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Mon Feb 9 19:28:11 2015 (r278472) +++ head/sys/x86/x86/local_apic.c Mon Feb 9 21:00:56 2015 (r278473) @@ -49,12 +49,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -154,11 +156,99 @@ static u_int32_t lapic_timer_divisors[] extern inthand_t IDTVEC(rsvd); -volatile lapic_t *lapic; +volatile char *lapic_map; vm_paddr_t lapic_paddr; +int x2apic_mode; static u_long lapic_timer_divisor; static struct eventtimer lapic_et; +SYSCTL_NODE(_hw, OID_AUTO, apic, CTLFLAG_RD, 0, "APIC options"); +SYSCTL_INT(_hw_apic, OID_AUTO, x2apic_mode, CTLFLAG_RD, &x2apic_mode, 0, ""); + +static uint32_t +lapic_read32(enum LAPIC_REGISTERS reg) +{ + uint32_t res; + + if (x2apic_mode) { + res = rdmsr32(MSR_APIC_000 + reg); + } else { + res = *(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL); + } + return (res); +} + +static void +lapic_write32(enum LAPIC_REGISTERS reg, uint32_t val) +{ + + if (x2apic_mode) { + mfence(); + wrmsr(MSR_APIC_000 + reg, val); + } else { + *(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL) = val; + } +} + +static void +lapic_write32_nofence(enum LAPIC_REGISTERS reg, uint32_t val) +{ + + if (x2apic_mode) { + wrmsr(MSR_APIC_000 + reg, val); + } else { + *(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL) = val; + } +} + +static uint64_t +lapic_read_icr(void) +{ + uint64_t v; + uint32_t vhi, vlo; + + if (x2apic_mode) { + v = rdmsr(MSR_APIC_000 + LAPIC_ICR_LO); + } else { + vhi = lapic_read32(LAPIC_ICR_HI); + vlo = lapic_read32(LAPIC_ICR_LO); + v = ((uint64_t)vhi << 32) | vlo; + } + return (v); +} + +static uint64_t +lapic_read_icr_lo(void) +{ + + return (lapic_read32(LAPIC_ICR_LO)); +} + +static void +lapic_write_icr(uint32_t vhi, uint32_t vlo) +{ + uint64_t v; + + if (x2apic_mode) { + v = ((uint64_t)vhi << 32) | vlo; + mfence(); + wrmsr(MSR_APIC_000 + LAPIC_ICR_LO, v); + } else { + lapic_write32(LAPIC_ICR_HI, vhi); + lapic_write32(LAPIC_ICR_LO, vlo); + } +} + +static void +native_lapic_enable_x2apic(void) +{ + uint64_t apic_base; + + apic_base = rdmsr(MSR_APICBASE); + apic_base |= APICBASE_X2APIC | APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apic_base); +} + static void lapic_enable(void); static void lapic_resume(struct pic *pic, bool suspend_cancelled); static void lapic_timer_oneshot(struct lapic *, @@ -179,6 +269,7 @@ struct pic lapic_pic = { .pic_resume = l /* Forward declarations for apic_ops */ static void native_lapic_create(u_int apic_id, int boot_cpu); static void native_lapic_init(vm_paddr_t addr); +static void native_lapic_xapic_mode(void); static void native_lapic_setup(int boot); static void native_lapic_dump(const char *str); static void native_lapic_disable(void); @@ -213,6 +304,7 @@ static int native_lapic_set_lvt_trigger struct apic_ops apic_ops = { .create = native_lapic_create, .init = native_lapic_init, + .xapic_mode = native_lapic_xapic_mode, .setup = native_lapic_setup, .dump = native_lapic_dump, .disable = native_lapic_disable, @@ -291,11 +383,20 @@ native_lapic_init(vm_paddr_t addr) u_int regs[4]; int i, arat; - /* Map the local APIC and setup the spurious interrupt handler. */ + /* + * Enable x2APIC mode if possible, otherwise map the local + * APIC registers page. + */ KASSERT(trunc_page(addr) == addr, ("local APIC not aligned on a page boundary")); - lapic_paddr = addr; - lapic = pmap_mapdev(addr, sizeof(lapic_t)); + if (x2apic_mode) { + native_lapic_enable_x2apic(); + } else { + lapic_paddr = addr; + lapic_map = pmap_mapdev(addr, PAGE_SIZE); + } + + /* Setup the spurious interrupt handler. */ setidt(APIC_SPURIOUS_INT, IDTVEC(spuriousint), SDT_APIC, SEL_KPL, GSEL_APIC); @@ -398,33 +499,51 @@ native_lapic_dump(const char* str) { uint32_t maxlvt; - maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT; printf("cpu%d %s:\n", PCPU_GET(cpuid), str); - printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n", - lapic->id, lapic->version, lapic->ldr, lapic->dfr); - printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", - lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); + printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x", + lapic_read32(LAPIC_ID), lapic_read32(LAPIC_VERSION), + lapic_read32(LAPIC_LDR), x2apic_mode ? 0 : lapic_read32(LAPIC_DFR)); + if ((cpu_feature2 & CPUID2_X2APIC) != 0) + printf(" x2APIC: %d", x2apic_mode); + printf("\n lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", + lapic_read32(LAPIC_LVT_LINT0), lapic_read32(LAPIC_LVT_LINT1), + lapic_read32(LAPIC_TPR), lapic_read32(LAPIC_SVR)); printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", - lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); + lapic_read32(LAPIC_LVT_TIMER), lapic_read32(LAPIC_LVT_THERMAL), + lapic_read32(LAPIC_LVT_ERROR)); if (maxlvt >= APIC_LVT_PMC) - printf(" pmc: 0x%08x", lapic->lvt_pcint); + printf(" pmc: 0x%08x", lapic_read32(LAPIC_LVT_PCINT)); printf("\n"); if (maxlvt >= APIC_LVT_CMCI) - printf(" cmci: 0x%08x\n", lapic->lvt_cmci); + printf(" cmci: 0x%08x\n", lapic_read32(LAPIC_LVT_CMCI)); +} + +static void +native_lapic_xapic_mode(void) +{ + register_t saveintr; + + saveintr = intr_disable(); + if (x2apic_mode) + native_lapic_enable_x2apic(); + native_lapic_disable(); + intr_restore(saveintr); } static void native_lapic_setup(int boot) { struct lapic *la; - u_int32_t maxlvt; + uint32_t maxlvt; register_t saveintr; char buf[MAXCOMLEN + 1]; + saveintr = intr_disable(); + la = &lapics[lapic_id()]; KASSERT(la->la_present, ("missing APIC structure")); - saveintr = intr_disable(); - maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT; /* Initialize the TPR to allow all interrupts. */ lapic_set_tpr(0); @@ -433,16 +552,21 @@ native_lapic_setup(int boot) lapic_enable(); /* Program LINT[01] LVT entries. */ - lapic->lvt_lint0 = lvt_mode(la, APIC_LVT_LINT0, lapic->lvt_lint0); - lapic->lvt_lint1 = lvt_mode(la, APIC_LVT_LINT1, lapic->lvt_lint1); + lapic_write32(LAPIC_LVT_LINT0, lvt_mode(la, APIC_LVT_LINT0, + lapic_read32(LAPIC_LVT_LINT0))); + lapic_write32(LAPIC_LVT_LINT1, lvt_mode(la, APIC_LVT_LINT1, + lapic_read32(LAPIC_LVT_LINT1))); /* Program the PMC LVT entry if present. */ - if (maxlvt >= APIC_LVT_PMC) - lapic->lvt_pcint = lvt_mode(la, APIC_LVT_PMC, lapic->lvt_pcint); + if (maxlvt >= APIC_LVT_PMC) { + lapic_write32(LAPIC_LVT_PCINT, lvt_mode(la, APIC_LVT_PMC, + LAPIC_LVT_PCINT)); + } /* Program timer LVT and setup handler. */ - la->lvt_timer_cache = lapic->lvt_timer = - lvt_mode(la, APIC_LVT_TIMER, lapic->lvt_timer); + la->lvt_timer_cache = lvt_mode(la, APIC_LVT_TIMER, + lapic_read32(LAPIC_LVT_TIMER)); + lapic_write32(LAPIC_LVT_TIMER, la->lvt_timer_cache); if (boot) { snprintf(buf, sizeof(buf), "cpu%d:timer", PCPU_GET(cpuid)); intrcnt_add(buf, &la->la_timer_count); @@ -460,14 +584,17 @@ native_lapic_setup(int boot) } /* Program error LVT and clear any existing errors. */ - lapic->lvt_error = lvt_mode(la, APIC_LVT_ERROR, lapic->lvt_error); - lapic->esr = 0; + lapic_write32(LAPIC_LVT_ERROR, lvt_mode(la, APIC_LVT_ERROR, + lapic_read32(LAPIC_LVT_ERROR))); + lapic_write32(LAPIC_ESR, 0); /* XXX: Thermal LVT */ /* Program the CMCI LVT entry if present. */ - if (maxlvt >= APIC_LVT_CMCI) - lapic->lvt_cmci = lvt_mode(la, APIC_LVT_CMCI, lapic->lvt_cmci); + if (maxlvt >= APIC_LVT_CMCI) { + lapic_write32(LAPIC_LVT_CMCI, lvt_mode(la, APIC_LVT_CMCI, + lapic_read32(LAPIC_LVT_CMCI))); + } intr_restore(saveintr); } @@ -478,9 +605,9 @@ native_lapic_reenable_pmc(void) #ifdef HWPMC_HOOKS uint32_t value; - value = lapic->lvt_pcint; + value = lapic_read32(LAPIC_LVT_PCINT); value &= ~APIC_LVT_M; - lapic->lvt_pcint = value; + lapic_write32(LAPIC_LVT_PCINT, value); #endif } @@ -491,7 +618,8 @@ lapic_update_pmc(void *dummy) struct lapic *la; la = &lapics[lapic_id()]; - lapic->lvt_pcint = lvt_mode(la, APIC_LVT_PMC, lapic->lvt_pcint); + lapic_write32(LAPIC_LVT_PCINT, lvt_mode(la, APIC_LVT_PMC, + lapic_read32(LAPIC_LVT_PCINT))); } #endif @@ -502,11 +630,11 @@ native_lapic_enable_pmc(void) u_int32_t maxlvt; /* Fail if the local APIC is not present. */ - if (lapic == NULL) + if (!x2apic_mode && lapic_map == NULL) return (0); /* Fail if the PMC LVT is not present. */ - maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT; if (maxlvt < APIC_LVT_PMC) return (0); @@ -536,11 +664,11 @@ native_lapic_disable_pmc(void) u_int32_t maxlvt; /* Fail if the local APIC is not present. */ - if (lapic == NULL) + if (!x2apic_mode && lapic_map == NULL) return; /* Fail if the PMC LVT is not present. */ - maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT; if (maxlvt < APIC_LVT_PMC) return; @@ -569,7 +697,8 @@ lapic_et_start(struct eventtimer *et, sb lapic_timer_set_divisor(lapic_timer_divisor); lapic_timer_oneshot(la, APIC_TIMER_MAX_COUNT, 0); DELAY(1000000); - value = APIC_TIMER_MAX_COUNT - lapic->ccr_timer; + value = APIC_TIMER_MAX_COUNT - + lapic_read32(LAPIC_CCR_TIMER); if (value != APIC_TIMER_MAX_COUNT) break; lapic_timer_divisor <<= 1; @@ -613,21 +742,21 @@ native_lapic_disable(void) uint32_t value; /* Software disable the local APIC. */ - value = lapic->svr; + value = lapic_read32(LAPIC_SVR); value &= ~APIC_SVR_SWEN; - lapic->svr = value; + lapic_write32(LAPIC_SVR, value); } static void lapic_enable(void) { - u_int32_t value; + uint32_t value; /* Program the spurious vector to enable the local APIC. */ - value = lapic->svr; + value = lapic_read32(LAPIC_SVR); value &= ~(APIC_SVR_VECTOR | APIC_SVR_FOCUS); - value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT); - lapic->svr = value; + value |= APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT; + lapic_write32(LAPIC_SVR, value); } /* Reset the local APIC on the BSP during resume. */ @@ -641,27 +770,29 @@ lapic_resume(struct pic *pic, bool suspe static int native_lapic_id(void) { + uint32_t v; - KASSERT(lapic != NULL, ("local APIC is not mapped")); - return (lapic->id >> APIC_ID_SHIFT); + KASSERT(x2apic_mode || lapic_map != NULL, ("local APIC is not mapped")); + v = lapic_read32(LAPIC_ID); + if (!x2apic_mode) + v >>= APIC_ID_SHIFT; + return (v); } static int native_lapic_intr_pending(u_int vector) { - volatile u_int32_t *irr; + uint32_t irr; /* - * The IRR registers are an array of 128-bit registers each of - * which only describes 32 interrupts in the low 32 bits.. Thus, - * we divide the vector by 32 to get the 128-bit index. We then - * multiply that index by 4 to get the equivalent index from - * treating the IRR as an array of 32-bit registers. Finally, we - * modulus the vector by 32 to determine the individual bit to - * test. + * The IRR registers are an array of registers each of which + * only describes 32 interrupts in the low 32 bits. Thus, we + * divide the vector by 32 to get the register index. + * Finally, we modulus the vector by 32 to determine the + * individual bit to test. */ - irr = &lapic->irr0; - return (irr[(vector / 32) * 4] & 1 << (vector % 32)); + irr = lapic_read32(LAPIC_IRR0 + vector / 32); + return (irr & 1 << (vector % 32)); } static void @@ -818,13 +949,13 @@ static void lapic_set_tpr(u_int vector) { #ifdef CHEAP_TPR - lapic->tpr = vector; + lapic_write32(LAPIC_TPR, vector); #else - u_int32_t tpr; + uint32_t tpr; - tpr = lapic->tpr & ~APIC_TPR_PRIO; + tpr = lapic_read32(LAPIC_TPR) & ~APIC_TPR_PRIO; tpr |= vector; - lapic->tpr = tpr; + lapic_write32(LAPIC_TPR, tpr); #endif } @@ -832,7 +963,7 @@ static void native_lapic_eoi(void) { - lapic->eoi = 0; + lapic_write32_nofence(LAPIC_EOI, 0); } void @@ -894,46 +1025,46 @@ lapic_timer_set_divisor(u_int divisor) KASSERT(powerof2(divisor), ("lapic: invalid divisor %u", divisor)); KASSERT(ffs(divisor) <= sizeof(lapic_timer_divisors) / sizeof(u_int32_t), ("lapic: invalid divisor %u", divisor)); - lapic->dcr_timer = lapic_timer_divisors[ffs(divisor) - 1]; + lapic_write32(LAPIC_DCR_TIMER, lapic_timer_divisors[ffs(divisor) - 1]); } static void lapic_timer_oneshot(struct lapic *la, u_int count, int enable_int) { - u_int32_t value; + uint32_t value; value = la->lvt_timer_cache; value &= ~APIC_LVTT_TM; value |= APIC_LVTT_TM_ONE_SHOT; if (enable_int) value &= ~APIC_LVT_M; - lapic->lvt_timer = value; - lapic->icr_timer = count; + lapic_write32(LAPIC_LVT_TIMER, value); + lapic_write32(LAPIC_ICR_TIMER, count); } static void lapic_timer_periodic(struct lapic *la, u_int count, int enable_int) { - u_int32_t value; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:03:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96793707; Mon, 9 Feb 2015 21:03:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82F94E74; Mon, 9 Feb 2015 21:03:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19L3Obw013796; Mon, 9 Feb 2015 21:03:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19L3OAn013792; Mon, 9 Feb 2015 21:03:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502092103.t19L3OAn013792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 9 Feb 2015 21:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278474 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:03:24 -0000 Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 URL: https://svnweb.freebsd.org/changeset/base/278474 Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and use this to implement CPU_COUNT() to count the number of CPUs in a cpuset. MFC after: 2 weeks Modified: head/sys/sys/bitset.h head/sys/sys/cpuset.h Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Mon Feb 9 21:00:56 2015 (r278473) +++ head/sys/sys/bitset.h Mon Feb 9 21:03:23 2015 (r278474) @@ -176,4 +176,14 @@ __bit; \ }) +#define BIT_COUNT(_s, p) __extension__ ({ \ + __size_t __i; \ + int __count; \ + \ + __count = 0; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + __count += __builtin_popcount((p)->__bits[__i]); \ + __count; \ +}) + #endif /* !_SYS_BITSET_H_ */ Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Mon Feb 9 21:00:56 2015 (r278473) +++ head/sys/sys/cpuset.h Mon Feb 9 21:03:23 2015 (r278474) @@ -60,6 +60,7 @@ #define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s) #define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(CPU_SETSIZE, f, t) #define CPU_FFS(p) BIT_FFS(CPU_SETSIZE, p) +#define CPU_COUNT(p) BIT_COUNT(CPU_SETSIZE, p) /* * Valid cpulevel_t values. From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:15:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C05AEBB1; Mon, 9 Feb 2015 21:15:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92EA6F83; Mon, 9 Feb 2015 21:15:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19LFrKb019582; Mon, 9 Feb 2015 21:15:53 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19LFrEk019578; Mon, 9 Feb 2015 21:15:53 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201502092115.t19LFrEk019578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 9 Feb 2015 21:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278475 - head/usr.sbin/pw/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:15:53 -0000 Author: brd (doc committer) Date: Mon Feb 9 21:15:52 2015 New Revision: 278475 URL: https://svnweb.freebsd.org/changeset/base/278475 Log: Add tests for `pw usernext'. PR: 197120 Submitted by: Robert O'Neil Approved by: will Added: head/usr.sbin/pw/tests/pw_usernext.sh (contents, props changed) Modified: head/usr.sbin/pw/tests/Makefile Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Mon Feb 9 21:03:23 2015 (r278474) +++ head/usr.sbin/pw/tests/Makefile Mon Feb 9 21:15:52 2015 (r278475) @@ -11,7 +11,8 @@ ATF_TESTS_SH= pw_etcdir \ pw_groupmod \ pw_useradd \ pw_userdel \ - pw_usermod + pw_usermod \ + pw_usernext .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" Added: head/usr.sbin/pw/tests/pw_usernext.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_usernext.sh Mon Feb 9 21:15:52 2015 (r278475) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +# Test usernext after adding a random number of new users. +atf_test_case usernext +usernext_body() { + populate_etc_skel + + var0=1 + LIMIT=`jot -r 1 2 10` + while [ "$var0" -lt "$LIMIT" ] + do + atf_check -s exit:0 ${PW} useradd test$var0 + var0=`expr $var0 + 1` + done + atf_check -s exit:0 -o match:"100${LIMIT}:100${LIMIT}" \ + ${PW} usernext +} + +# Test usernext when multiple users are added to the same group so +# that group id doesn't increment at the same pace as new users. +atf_test_case usernext_assigned_group +usernext_assigned_group_body() { + populate_etc_skel + + var0=1 + LIMIT=`jot -r 1 2 10` + while [ "$var0" -lt "$LIMIT" ] + do + atf_check -s exit:0 ${PW} useradd -n test$var0 -g 0 + var0=`expr $var0 + 1` + done + atf_check -s exit:0 -o match:"100${LIMIT}:1001}" \ + ${PW} usernext +} + +atf_init_test_cases() { + atf_add_test_case usernext + atf_add_test_case usernext_assigned_group +} From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:22:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFAD6ED5; Mon, 9 Feb 2015 21:22:32 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 62A2420E5; Mon, 9 Feb 2015 21:22:32 +0000 (UTC) Message-ID: <54D92517.80203@FreeBSD.org> Date: Mon, 09 Feb 2015 16:22:31 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> In-Reply-To: <201502092103.t19L3OAn013792@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:22:32 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 16:03, John Baldwin wrote: > Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 > URL: https://svnweb.freebsd.org/changeset/base/278474 > > Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation > for bitsets and use this to implement CPU_COUNT() to count the > number of CPUs in a cpuset. ... This is wrong. __builtin_popcountl() must be used here. __builtin_popcount() is for *int*. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2SUTAAoJEHyflib82/FGb3oH/1va9V2zWD+fxz9jzvZzT8ka yqt9dOVpmpztpJ0XtiwCVp42hEtwvjRWefV4Qn7XntNezhF5l4N0BCLN+XmsHhdD eoDCtQKuop+sQM64gqVgQSYBU8oho05mMmvMhIe3zf818X84pr1T6WEHbc+bgXh5 RGOPNRyau7nFldIjWfdwkyUFpiztHkxL94odFU6P6bDiCrfpngyiuOgi7vHf0QTX Ml+9eR1AbCOx69Ntccj35++TqCWY2HKwxdlWXn7D/AXIBwWguzUS3wKOg8Oyd42k 3lPpHU4WYYERtHIY/P1LsPrQV/eB/rEoLTL5RccvEyHDl025QdSAXKwH8ij8Tvk= =HAEQ -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:25:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14088268; Mon, 9 Feb 2015 21:25:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2BDC11A; Mon, 9 Feb 2015 21:25:10 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 06FEBB926; Mon, 9 Feb 2015 16:25:10 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r278474 - head/sys/sys Date: Mon, 09 Feb 2015 16:08:59 -0500 Message-ID: <1698688.fEq0HxqPxg@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502092103.t19L3OAn013792@svn.freebsd.org> References: <201502092103.t19L3OAn013792@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 16:25:10 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:25:11 -0000 On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: > Author: jhb > Date: Mon Feb 9 21:03:23 2015 > New Revision: 278474 > URL: https://svnweb.freebsd.org/changeset/base/278474 > > Log: > Use __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets > and use this to implement CPU_COUNT() to count the number of CPUs in a > cpuset. > > MFC after: 2 weeks Yes, __builtin_popcnt() works with GCC 4.2. It should also allow the compiler to DTRT in userland uses of this if -msse4.2 is enabled. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:39:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4F1681F; Mon, 9 Feb 2015 21:39:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C190A285; Mon, 9 Feb 2015 21:39:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19LdJsJ034575; Mon, 9 Feb 2015 21:39:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19LdJFm034574; Mon, 9 Feb 2015 21:39:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502092139.t19LdJFm034574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 9 Feb 2015 21:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278476 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:39:19 -0000 Author: jhb Date: Mon Feb 9 21:39:18 2015 New Revision: 278476 URL: https://svnweb.freebsd.org/changeset/base/278476 Log: Use __builtin_popcountl() instead of __builtin_popcount(). Submitted by: jkim Modified: head/sys/sys/bitset.h Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Mon Feb 9 21:15:52 2015 (r278475) +++ head/sys/sys/bitset.h Mon Feb 9 21:39:18 2015 (r278476) @@ -182,7 +182,7 @@ \ __count = 0; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ - __count += __builtin_popcount((p)->__bits[__i]); \ + __count += __builtin_popcountl((p)->__bits[__i]); \ __count; \ }) From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:41:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50907A01; Mon, 9 Feb 2015 21:41:05 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E1AA02CE; Mon, 9 Feb 2015 21:41:04 +0000 (UTC) Received: from rrss-MacBook-Air.local (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t19LUmt6003522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 9 Feb 2015 16:30:49 -0500 (EST) (envelope-from rrs@freebsd.org) Message-ID: <54D92954.1020702@freebsd.org> Date: Mon, 09 Feb 2015 16:40:36 -0500 From: randall User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r278469 - in head/sys: kern sys References: <201502091919.t19JJjbg061542@svn.freebsd.org> <1619204.FQlXD7hmMU@ralph.baldwin.cx> In-Reply-To: <1619204.FQlXD7hmMU@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:41:05 -0000 John: See below.. On 2/9/15 3:09 PM, John Baldwin wrote: > On Monday, February 09, 2015 07:19:45 PM Randall Stewart wrote: >> Author: rrs >> Date: Mon Feb 9 19:19:44 2015 >> New Revision: 278469 >> URL: https://svnweb.freebsd.org/changeset/base/278469 >> >> Log: >> This fixes two conditions that can incur when migration >> is being done in the callout code and harmonizes the macro >> use.: >> 1) The callout_active() will lie. Basically if a migration >> is occuring and the callout is about to expire and the >> migration has been deferred, the callout_active will no >> longer return true until after the migration. This confuses >> and breaks callers that are doing callout_init(&c, 1); such >> as TCP. >> 2) The migration code had a bug in it where when migrating, if >> a two calls to callout_reset came in and they both collided with >> the callout on the wheel about to run, then the second call to >> callout_reset would corrupt the list the callout wheel uses >> putting the callout thread into a endless loop. >> 3) Per imp, I have fixed all the macro occurance in the code that >> were for the most part being ignored. >> >> Phabricator D1711 and looked at by lstewart and jhb and sbruno. >> Reviewed by: kostikbel, imp, adrian, hselasky >> MFC after: 3 days >> Sponsored by: Netflix Inc. > Thank you guys for working together to fix the migration race in a way > that lets CALLOUT_MPSAFE timers use multiple CPUs still. Your very much welcome.. it was a fun bug to track down :-) > > I do think that callout_drain_async() would also be useful to add. Well, I have been thinking about this, and I do think it will be easy to add though I did not want to further pollute the commit with new features. I will see about working on it here in the next few weeks :-) R > From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:45:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E68A5BC0; Mon, 9 Feb 2015 21:45:42 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D9EC3B6; Mon, 9 Feb 2015 21:45:42 +0000 (UTC) Received: from rrss-MacBook-Air.local (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t19LZgdc003632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 9 Feb 2015 16:35:43 -0500 (EST) (envelope-from rrs@freebsd.org) Message-ID: <54D92A7A.9000300@freebsd.org> Date: Mon, 09 Feb 2015 16:45:30 -0500 From: randall User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 References: <201502091928.t19JSC5P066293@svn.freebsd.org> <1903622.i3cFFNVYcL@ralph.baldwin.cx> In-Reply-To: <1903622.i3cFFNVYcL@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:45:43 -0000 On 2/9/15 3:11 PM, John Baldwin wrote: > Eh, I looked at it, but I really, really don't like it. I think > callout_init_*() should be preferred to CALLOUT_MPSAFE whenever possible as it > is less race-prone. I think this should probably be fixed by adding Hans' > callout_drain_async() instead, though this is fine as a temporary workaround. I know you did not like it, and I think in principle I agree with you that a new callout_drain_async() needs to be introduced to the KPI for callout. That all being said in this one case, I do think the right immediate fix (until thats ready) was to make it MPSAFE like I did. In this particular instance init'ing with the lock was exactly the wrong thing to do with the reference counting that was going on. Yes, we need to get the drain_async.. but that will take more time and more poking at the callout system to make sure its solid before we start switching things to use it. And this I think was panic'ing a *lot* of systems.. R > From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:45:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8886CFC; Mon, 9 Feb 2015 21:45:58 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F35D3C7; Mon, 9 Feb 2015 21:45:58 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 55A6B25D3A9F; Mon, 9 Feb 2015 21:45:55 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 85325C76FD0; Mon, 9 Feb 2015 21:45:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Gz2i6IjRf5gd; Mon, 9 Feb 2015 21:45:52 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:fd45:f85d:6c3a:49ac] (unknown [IPv6:fde9:577b:c1a9:4410:fd45:f85d:6c3a:49ac]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E54CEC76FD3; Mon, 9 Feb 2015 21:45:50 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 From: "Bjoern A. Zeeb" In-Reply-To: <201502091928.t19JSC5P066293@svn.freebsd.org> Date: Mon, 9 Feb 2015 21:45:35 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> References: <201502091928.t19JSC5P066293@svn.freebsd.org> To: Randall Stewart X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:45:59 -0000 > On 09 Feb 2015, at 19:28 , Randall Stewart wrote: >=20 > Author: rrs > Date: Mon Feb 9 19:28:11 2015 > New Revision: 278472 > URL: https://svnweb.freebsd.org/changeset/base/278472 >=20 > Log: > This fixes a bug in the way that the LLE timers for nd6 > and arp were being used. They basically would pass in the > mutex to the callout_init. Because they used this method > to the callout system, it was possible to "stop" the callout. > When flushing the table and you stopped the running callout, the > callout_stop code would return 1 indicating that it was going > to stop the callout (that was about to run on the callout_wheel = blocked > by the function calling the stop). Now when 1 was returned, it would > lower the reference count one extra time for the stopped timer, then > a few lines later delete the memory. Of course the callout_wheel was > stuck in the lock code and would then crash since it was accessing > freed memory. By using callout_init(c, 1) we always get a 0 back > and the reference counting bug does not rear its head. We do have > to make a few adjustments to the callouts themselves though to make > sure it does the proper thing if rescheduled as well as gets the = lock. >=20 > Commented upon by hiren and sbruno > See Phabricator D1777 for more details. >=20 > Commented upon by hiren and sbruno > Reviewed by: adrian, jhb and bz I have not reviewed this; as a matter of fact you are aware that I = still wanted to do that. > Sponsored by: Netflix Inc. >=20 > Modified: > head/sys/netinet/if_ether.c > head/sys/netinet/in.c > head/sys/netinet6/in6.c > head/sys/netinet6/nd6.c >=20 > Modified: head/sys/netinet/if_ether.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/if_ether.c Mon Feb 9 19:21:54 2015 = (r278471) > +++ head/sys/netinet/if_ether.c Mon Feb 9 19:28:11 2015 = (r278472) > @@ -166,10 +166,28 @@ arptimer(void *arg) > struct ifnet *ifp; >=20 > if (lle->la_flags & LLE_STATIC) { > - LLE_WUNLOCK(lle); > return; > } > - > + LLE_WLOCK(lle); > + if (callout_pending(&lle->la_timer)) { > + /* > + * Here we are a bit odd here in the treatment of=20 > + * active/pending. If the pending bit is set, it got > + * rescheduled before I ran. The active > + * bit we ignore, since if it was stopped > + * in ll_tablefree() and was currently running > + * it would have return 0 so the code would > + * not have deleted it since the callout could > + * not be stopped so we want to go through > + * with the delete here now. If the callout > + * was restarted, the pending bit will be back on and > + * we just want to bail since the callout_reset would > + * return 1 and our reference would have been removed > + * by arpresolve() below. > + */ > + LLE_WUNLOCK(lle); > + return; > + } > ifp =3D lle->lle_tbl->llt_ifp; > CURVNET_SET(ifp->if_vnet); >=20 >=20 > Modified: head/sys/netinet/in.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/in.c Mon Feb 9 19:21:54 2015 = (r278471) > +++ head/sys/netinet/in.c Mon Feb 9 19:28:11 2015 = (r278472) > @@ -962,8 +962,7 @@ in_lltable_new(const struct sockaddr *l3 > lle->base.lle_refcnt =3D 1; > lle->base.lle_free =3D in_lltable_free; > LLE_LOCK_INIT(&lle->base); > - callout_init_rw(&lle->base.la_timer, &lle->base.lle_lock, > - CALLOUT_RETURNUNLOCKED); > + callout_init(&lle->base.la_timer, 1); >=20 > return (&lle->base); > } >=20 > Modified: head/sys/netinet6/in6.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet6/in6.c Mon Feb 9 19:21:54 2015 = (r278471) > +++ head/sys/netinet6/in6.c Mon Feb 9 19:28:11 2015 = (r278472) > @@ -2047,8 +2047,7 @@ in6_lltable_new(const struct sockaddr *l > lle->base.lle_refcnt =3D 1; > lle->base.lle_free =3D in6_lltable_free; > LLE_LOCK_INIT(&lle->base); > - callout_init_rw(&lle->base.ln_timer_ch, &lle->base.lle_lock, > - CALLOUT_RETURNUNLOCKED); > + callout_init(&lle->base.ln_timer_ch, 1); >=20 > return (&lle->base); > } >=20 > Modified: head/sys/netinet6/nd6.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet6/nd6.c Mon Feb 9 19:21:54 2015 = (r278471) > +++ head/sys/netinet6/nd6.c Mon Feb 9 19:28:11 2015 = (r278472) > @@ -473,9 +473,28 @@ nd6_llinfo_timer(void *arg) >=20 > KASSERT(arg !=3D NULL, ("%s: arg NULL", __func__)); > ln =3D (struct llentry *)arg; > - LLE_WLOCK_ASSERT(ln); > + LLE_WLOCK(ln); > + if (callout_pending(&ln->la_timer)) { > + /* > + * Here we are a bit odd here in the treatment of=20 > + * active/pending. If the pending bit is set, it got > + * rescheduled before I ran. The active > + * bit we ignore, since if it was stopped > + * in ll_tablefree() and was currently running > + * it would have return 0 so the code would > + * not have deleted it since the callout could > + * not be stopped so we want to go through > + * with the delete here now. If the callout > + * was restarted, the pending bit will be back on and > + * we just want to bail since the callout_reset would > + * return 1 and our reference would have been removed > + * by nd6_llinfo_settimer_locked above since canceled > + * would have been 1. > + */ > + LLE_WUNLOCK(ln); > + return; > + } > ifp =3D ln->lle_tbl->llt_ifp; > - > CURVNET_SET(ifp->if_vnet); >=20 > if (ln->ln_ntick > 0) { >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:47:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5466E3D; Mon, 9 Feb 2015 21:47:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A194F3CF; Mon, 9 Feb 2015 21:47:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19LlDmm040435; Mon, 9 Feb 2015 21:47:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19LlDAd040434; Mon, 9 Feb 2015 21:47:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502092147.t19LlDAd040434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 9 Feb 2015 21:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278477 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:47:13 -0000 Author: hselasky Date: Mon Feb 9 21:47:12 2015 New Revision: 278477 URL: https://svnweb.freebsd.org/changeset/base/278477 Log: Fix DMA address casts. Regression issue after r278279. MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Feb 9 21:39:18 2015 (r278476) +++ head/sys/dev/usb/controller/xhci.c Mon Feb 9 21:47:12 2015 (r278477) @@ -492,7 +492,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1114,7 +1114,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:47:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DF06F76; Mon, 9 Feb 2015 21:47:23 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 542043D3; Mon, 9 Feb 2015 21:47:22 +0000 (UTC) Received: from rrss-MacBook-Air.local (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t19LbNkt003667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 9 Feb 2015 16:37:29 -0500 (EST) (envelope-from rrs@freebsd.org) Message-ID: <54D92ADE.5000306@freebsd.org> Date: Mon, 09 Feb 2015 16:47:10 -0500 From: randall User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: hiren panchasara Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 References: <201502091928.t19JSC5P066293@svn.freebsd.org> <20150209202250.GG10438@strugglingcoder.info> In-Reply-To: <20150209202250.GG10438@strugglingcoder.info> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:47:23 -0000 Hiren: I hope that later this week I can MFC these things in. I would like to see them sync down to 10 Stable so we can get it out in our next Firmware release as well. We have seen a *lot* of strange panics and I am thinking some of it may be related to these two fixes. I will send you an email when I get ready to MFC it. Best wishes R >Thanks for the fix, Randall. When do you plan to MFC this? It'd be nice to have this MFC'd along with D1711 changes so that we do not see panics reported in the review. Cheers, Hiren From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:55:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F69D20C; Mon, 9 Feb 2015 21:55:53 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 33E1D3B83; Mon, 9 Feb 2015 21:55:53 +0000 (UTC) Message-ID: <54D92CE8.1030803@FreeBSD.org> Date: Mon, 09 Feb 2015 16:55:52 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> In-Reply-To: <1698688.fEq0HxqPxg@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:55:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 16:08, John Baldwin wrote: > On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: >> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 >> URL: https://svnweb.freebsd.org/changeset/base/278474 >> >> Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation >> for bitsets and use this to implement CPU_COUNT() to count the >> number of CPUs in a cpuset. >> >> MFC after: 2 weeks > > Yes, __builtin_popcnt() works with GCC 4.2. It should also allow > the compiler to DTRT in userland uses of this if -msse4.2 is > enabled. Back in 2012, when I submitted a similar patch, bde noted __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* because it emits a library call. http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 FYI... Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2SzhAAoJEHyflib82/FGzgoH/2mfCZTX6J84MYpfuJV5dnLQ 97Itozifc8qBNDCOIQ1PZNgxPed9U8Ma0o3Rntfl5X2VeAIc/c5JJhvQITUdhnn7 fyW5FcpvJGpHLcUWlTMT5CrZgmDswi6h1jIsbD6AKoIVNGau5kPhpn4LF7f19YU0 0Vm8L96gGrxjJb3SWdRC4znP1ezTCw3rUEyk2oPZBn69zoat1vBcV7WtathStcBg noIEydo6C5e4EC5SKbTi29aNd1KGafRIukkC8+jnZNCc8nYEVsUEX5SarKYmmpec NTSLfboTJ5YXZGsvIgGzld0Z/Hn54v8O0hhG1QO4kWh3wN40NVgNL0vkeiveqwE= =WDqA -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 22:06:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF5C750A; Mon, 9 Feb 2015 22:06:06 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 63D123F74; Mon, 9 Feb 2015 22:06:06 +0000 (UTC) Message-ID: <54D92F4D.5020007@FreeBSD.org> Date: Mon, 09 Feb 2015 17:06:05 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> <54D92CE8.1030803@FreeBSD.org> In-Reply-To: <54D92CE8.1030803@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 22:06:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 16:55, Jung-uk Kim wrote: > On 02/09/2015 16:08, John Baldwin wrote: >> On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: >>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: >>> 278474 URL: https://svnweb.freebsd.org/changeset/base/278474 >>> >>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() >>> operation for bitsets and use this to implement CPU_COUNT() to >>> count the number of CPUs in a cpuset. >>> >>> MFC after: 2 weeks > >> Yes, __builtin_popcnt() works with GCC 4.2. It should also >> allow the compiler to DTRT in userland uses of this if -msse4.2 >> is enabled. > > Back in 2012, when I submitted a similar patch, bde noted > __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* > because it emits a library call. > > http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 BTW, __POPCNT__ macro may be used to detect availability of POPCNT instruction when compiled with Clang. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2S9NAAoJEHyflib82/FGy+kH/20SFWEXK5lSfWxYMvxMp46W ZjOFW46ZefkUHiDLgPcED4oZd4cmX/KNXns3YSO5lwL4JeFsO+mzTKpmV7llPV22 y1/xHChk3Z3BJwq3lzGZmVeT4Cw2T6Mf4f1PCqfMkijDDsVrkEYBeko+QW3gpGjZ BrjH8EmFLDZ78rmPP/Nsbm8HZNEI89NOGBYEw615kA5ibuZZ0L2T6ybcipysDaxe fYpBcIhm58erXIrlNtYeSX6YyZPHMPJBACjkyPEKk8L7eKYR27++VKZGas8flEze 5x/5n9TftKwei2rHXhuogNqClACsLIBkM6a/Y/PNBMDOQ+0OEu6uDr0a63log00= =zY2U -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 22:12:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEE416B4; Mon, 9 Feb 2015 22:12:37 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 976128A5; Mon, 9 Feb 2015 22:12:37 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B358AB93B; Mon, 9 Feb 2015 17:12:35 -0500 (EST) From: John Baldwin To: Jung-uk Kim Subject: Re: svn commit: r278474 - head/sys/sys Date: Mon, 09 Feb 2015 17:12:02 -0500 Message-ID: <3501684.yzo0NMkRZd@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <54D92CE8.1030803@FreeBSD.org> References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> <54D92CE8.1030803@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 17:12:35 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 22:12:37 -0000 On Monday, February 09, 2015 04:55:52 PM Jung-uk Kim wrote: > On 02/09/2015 16:08, John Baldwin wrote: > > On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: > >> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 > >> URL: https://svnweb.freebsd.org/changeset/base/278474 > >> > >> Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation > >> for bitsets and use this to implement CPU_COUNT() to count the > >> number of CPUs in a cpuset. > >> > >> MFC after: 2 weeks > > > > Yes, __builtin_popcnt() works with GCC 4.2. It should also allow > > the compiler to DTRT in userland uses of this if -msse4.2 is > > enabled. > > Back in 2012, when I submitted a similar patch, bde noted > __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* because > it emits a library call. > > http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 > > FYI... Weird, I though I built a kernel with this in a tree that uses it in the igb(4) driver. We need a CPU_COUNT() no matter what, but if this emits a library call under GCC I will need to add the call. We could also adopt your bitcount header, though I think it is more consistent to keep the loop in BIT_COUNT() and use something that emulates popcountl() rather than directly using bitcount() in BIT_COUNT() (primarily because the rest of sys/bitset.h is structured that way: explicit loops in sys/bitset.h itself). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 22:27:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBC6D968; Mon, 9 Feb 2015 22:27:46 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 73E658F3; Mon, 9 Feb 2015 22:27:46 +0000 (UTC) Message-ID: <54D93461.8010109@FreeBSD.org> Date: Mon, 09 Feb 2015 17:27:45 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> <54D92CE8.1030803@FreeBSD.org> <3501684.yzo0NMkRZd@ralph.baldwin.cx> In-Reply-To: <3501684.yzo0NMkRZd@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 22:27:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 17:12, John Baldwin wrote: > On Monday, February 09, 2015 04:55:52 PM Jung-uk Kim wrote: >> On 02/09/2015 16:08, John Baldwin wrote: >>> On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: >>>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: >>>> 278474 URL: https://svnweb.freebsd.org/changeset/base/278474 >>>> >>>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() >>>> operation for bitsets and use this to implement CPU_COUNT() >>>> to count the number of CPUs in a cpuset. >>>> >>>> MFC after: 2 weeks >>> >>> Yes, __builtin_popcnt() works with GCC 4.2. It should also >>> allow the compiler to DTRT in userland uses of this if -msse4.2 >>> is enabled. >> >> Back in 2012, when I submitted a similar patch, bde noted >> __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* >> because it emits a library call. >> >> http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 >> >> FYI... > > Weird, I though I built a kernel with this in a tree that uses it > in the igb(4) driver. We need a CPU_COUNT() no matter what, but if > this emits a library call under GCC I will need to add the call. > We could also adopt your bitcount header, though I think it is more > consistent to keep the loop in BIT_COUNT() and use something that > emulates popcountl() rather than directly using bitcount() in > BIT_COUNT() (primarily because the rest of sys/bitset.h is > structured that way: explicit loops in sys/bitset.h itself). I think you should back it out for now and move the discussion to arch or hackers. I gave it up at the time but you may have better luck. :-) FYI, the following was the last version of my patch at the time. https://people.freebsd.org/~jkim/bitcount5.diff Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2TRdAAoJEHyflib82/FGUK8H/jnrTqxqw6k5mK2hL3jslBuK yAQKlfCV+pq3jJm6Ixqxk9vszZUwAMw02mPhxkHEPAB4vzZnnhH18u5cOrB1r7MA NFTva6UKoo5F00GO0yKyK9rGaHXxuoSGjdntEckYJuFxZ8Zh9K1dYIRXGW42f55c JEK9aU8uVtFTov8RF0pVGDqiezWJRGlTrftDwq8tUHfv8pJG2p0Z9rfLYsP1DTx2 fMcb7iz6IIQKO2aUYytXv8UdqkA2VtwOGrqC0nLTL4RF5bC5i61WHRJYxNWJ5+sV XQx9cXutkNIIj7IHIw2kpyvx0ynZGIN/jwpBy0d58aq3jv2wQhzk/F1ID51guNk= =uINd -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:04:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6086DF61; Mon, 9 Feb 2015 23:04:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD98DFD; Mon, 9 Feb 2015 23:04:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19N4VlX078489; Mon, 9 Feb 2015 23:04:31 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19N4VB7078488; Mon, 9 Feb 2015 23:04:31 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502092304.t19N4VB7078488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 23:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278478 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:04:31 -0000 Author: rpaulo Date: Mon Feb 9 23:04:30 2015 New Revision: 278478 URL: https://svnweb.freebsd.org/changeset/base/278478 Log: Add the ability to print a vendor copyright in dmesg. Modified: head/sys/sys/copyright.h Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Mon Feb 9 21:47:12 2015 (r278477) +++ head/sys/sys/copyright.h Mon Feb 9 23:04:30 2015 (r278478) @@ -28,6 +28,10 @@ /* Copyrights macros */ +/* Add a FreeBSD vendor copyright here */ +#define COPYRIGHT_Vendor \ + "" + /* FreeBSD */ #define COPYRIGHT_FreeBSD \ "Copyright (c) 1992-2015 The FreeBSD Project.\n" @@ -48,5 +52,6 @@ #define COPYRIGHT_PC98 #endif -char copyright[] = COPYRIGHT_FreeBSD COPYRIGHT_PC98 COPYRIGHT_UCB; +char copyright[] = COPYRIGHT_Vendor COPYRIGHT_FreeBSD COPYRIGHT_PC98 \ + COPYRIGHT_UCB; char trademark[] = TRADEMARK_Foundation; From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:08:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FBFC174; Mon, 9 Feb 2015 23:08:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB4DEE25; Mon, 9 Feb 2015 23:08:10 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B466EB91E; Mon, 9 Feb 2015 18:08:09 -0500 (EST) From: John Baldwin To: Jung-uk Kim Subject: Re: svn commit: r278474 - head/sys/sys Date: Mon, 09 Feb 2015 18:08:02 -0500 Message-ID: <5703806.fFzzT9N1y2@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <54D93461.8010109@FreeBSD.org> References: <201502092103.t19L3OAn013792@svn.freebsd.org> <3501684.yzo0NMkRZd@ralph.baldwin.cx> <54D93461.8010109@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 18:08:09 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:08:11 -0000 On Monday, February 09, 2015 05:27:45 PM Jung-uk Kim wrote: > On 02/09/2015 17:12, John Baldwin wrote: > > On Monday, February 09, 2015 04:55:52 PM Jung-uk Kim wrote: > >> On 02/09/2015 16:08, John Baldwin wrote: > >>> On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: > >>>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: > >>>> 278474 URL: https://svnweb.freebsd.org/changeset/base/278474 > >>>> > >>>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() > >>>> operation for bitsets and use this to implement CPU_COUNT() > >>>> to count the number of CPUs in a cpuset. > >>>> > >>>> MFC after: 2 weeks > >>> > >>> Yes, __builtin_popcnt() works with GCC 4.2. It should also > >>> allow the compiler to DTRT in userland uses of this if -msse4.2 > >>> is enabled. > >> > >> Back in 2012, when I submitted a similar patch, bde noted > >> __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* > >> because it emits a library call. > >> > >> http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 > >> > >> FYI... > > > > Weird, I though I built a kernel with this in a tree that uses it > > in the igb(4) driver. We need a CPU_COUNT() no matter what, but if > > this emits a library call under GCC I will need to add the call. > > We could also adopt your bitcount header, though I think it is more > > consistent to keep the loop in BIT_COUNT() and use something that > > emulates popcountl() rather than directly using bitcount() in > > BIT_COUNT() (primarily because the rest of sys/bitset.h is > > structured that way: explicit loops in sys/bitset.h itself). > > I think you should back it out for now and move the discussion to arch > or hackers. I gave it up at the time but you may have better luck. :-) > > FYI, the following was the last version of my patch at the time. > > https://people.freebsd.org/~jkim/bitcount5.diff I could also just make it userland only for now? Rui wants to use it in userland. However, I can back it out if that is preferred. To be honest, I'm not sure how valuable it is at this point to expend a lot of effort to support GCC older than 3.4 (i.e. the non-builtin popcount approach). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:13:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AF8C30A; Mon, 9 Feb 2015 23:13:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFDAEEE8; Mon, 9 Feb 2015 23:13:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19NDpLN083045; Mon, 9 Feb 2015 23:13:51 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19NDpoS083043; Mon, 9 Feb 2015 23:13:51 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502092313.t19NDpoS083043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 23:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278479 - in head: etc sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:13:52 -0000 Author: rpaulo Date: Mon Feb 9 23:13:50 2015 New Revision: 278479 URL: https://svnweb.freebsd.org/changeset/base/278479 Log: Notify devd(8) when a process crashed. This change implements a notification (via devctl) to userland when the kernel produces coredumps after a process has crashed. devd can then run a specific command to produce a human readable crash report. The command is most usually a helper that runs gdb/lldb commands on the file/coredump pair. It's possible to use this functionality for implementing automatic generation of crash reports. devd(8) will be notified of the full path of the binary that crashed and the full path of the coredump file. Modified: head/etc/devd.conf head/sys/kern/kern_sig.c Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Mon Feb 9 23:04:30 2015 (r278478) +++ head/etc/devd.conf Mon Feb 9 23:13:50 2015 (r278479) @@ -325,4 +325,16 @@ notify 100 { action "/usr/sbin/automount -c"; }; +# Handle userland coredumps. +# This commented out handler makes it possible to run an +# automated debugging session after the core dump is generated. +# Replace action with a proper coredump handler, but be aware that +# it will run with elevated privileges. +notify 10 { + match "system" "kernel"; + match "subsystem" "signal"; + match "type" "coredump"; + action "logger $comm $core"; +}; + */ Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Feb 9 23:04:30 2015 (r278478) +++ head/sys/kern/kern_sig.c Mon Feb 9 23:13:50 2015 (r278479) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3237,6 +3238,9 @@ coredump(struct thread *td) void *rl_cookie; off_t limit; int compress; + char *data = NULL; + size_t len; + char *fullpath, *freepath = NULL; #ifdef COMPRESS_USER_CORES compress = compress_user_cores; @@ -3322,9 +3326,36 @@ close: error1 = vn_close(vp, FWRITE, cred, td); if (error == 0) error = error1; + else + goto out; + /* + * Notify the userland helper that a process triggered a core dump. + * This allows the helper to run an automated debugging session. + */ + len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; + data = malloc(len, M_TEMP, M_NOWAIT); + if (data == NULL) + goto out; + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) + goto out; + snprintf(data, len, "comm=%s", fullpath); + if (freepath != NULL) { + free(freepath, M_TEMP); + freepath = NULL; + } + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) + goto out; + snprintf(data, len, "%s core=%s", data, fullpath); + devctl_notify("kernel", "signal", "coredump", data); + free(name, M_TEMP); +out: #ifdef AUDIT audit_proc_coredump(td, name, error); #endif + if (freepath != NULL) + free(freepath, M_TEMP); + if (data != NULL) + free(data, M_TEMP); free(name, M_TEMP); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:16:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03AF654B; Mon, 9 Feb 2015 23:16:04 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C45CF09; Mon, 9 Feb 2015 23:16:03 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id em10so4864470wid.1; Mon, 09 Feb 2015 15:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XJyQ+0uX+hHoOWc3bsi/hpLs5CsMNLmiSicE8lCGRis=; b=0mtxc2XRx74XRL14z9tat1wf9DePZB+Rs6XQwfnFlkQ4wbo+05k/dpgUOwCuPNF5uu bX8pR8M/lac8Vz4NbiCmk3qmiUKrrArkJiuCrsfqNN2C40M/uB8204xatbLTSdoudXX3 yCbAXgpOgHddnWEo8MQuas/36Eme8pdAh2TkiFE5ONWn5bUHchl4qLjIQAUxEXDC8rGe NmJ1gd/K5kLand+kKKioEsz+7Rui5okxMGgtT/Kul0Z5zW3QvlAHEEToe9RxOgpm8yQ8 PdM3j5Mu5aQCSIYMQ/QNxnZ4Fm8ar6Pn8xwhyVjz56OazqFrz0LQRA2UxU8WKNdIGCBR vP2Q== MIME-Version: 1.0 X-Received: by 10.181.29.168 with SMTP id jx8mr20670537wid.8.1423523761924; Mon, 09 Feb 2015 15:16:01 -0800 (PST) Received: by 10.27.77.141 with HTTP; Mon, 9 Feb 2015 15:16:01 -0800 (PST) In-Reply-To: <201502092313.t19NDpoS083043@svn.freebsd.org> References: <201502092313.t19NDpoS083043@svn.freebsd.org> Date: Mon, 9 Feb 2015 18:16:01 -0500 Message-ID: Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Benjamin Kaduk To: Rui Paulo Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:16:04 -0000 On Mon, Feb 9, 2015 at 6:13 PM, Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 23:13:50 2015 > New Revision: 278479 > URL: https://svnweb.freebsd.org/changeset/base/278479 > > Log: > Notify devd(8) when a process crashed. > > This change implements a notification (via devctl) to userland when > the kernel produces coredumps after a process has crashed. > devd can then run a specific command to produce a human readable crash > report. The command is most usually a helper that runs gdb/lldb > commands on the file/coredump pair. It's possible to use this > functionality for implementing automatic generation of crash reports. > > devd(8) will be notified of the full path of the binary that crashed and > the full path of the coredump file. > What advantage does putting this in devd have over a standalone daemon for crash reporting? Is it just the ease of implementation to leverage the existing infrastructure? -Ben From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:17:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFFFD688; Mon, 9 Feb 2015 23:17:38 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 4C44F1E33; Mon, 9 Feb 2015 23:17:38 +0000 (UTC) Message-ID: <54D94011.2080700@FreeBSD.org> Date: Mon, 09 Feb 2015 18:17:37 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r278474 - head/sys/sys References: <201502092103.t19L3OAn013792@svn.freebsd.org> <3501684.yzo0NMkRZd@ralph.baldwin.cx> <54D93461.8010109@FreeBSD.org> <5703806.fFzzT9N1y2@ralph.baldwin.cx> In-Reply-To: <5703806.fFzzT9N1y2@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:17:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/09/2015 18:08, John Baldwin wrote: > On Monday, February 09, 2015 05:27:45 PM Jung-uk Kim wrote: >> On 02/09/2015 17:12, John Baldwin wrote: >>> On Monday, February 09, 2015 04:55:52 PM Jung-uk Kim wrote: >>>> On 02/09/2015 16:08, John Baldwin wrote: >>>>> On Monday, February 09, 2015 09:03:24 PM John Baldwin >>>>> wrote: >>>>>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: >>>>>> 278474 URL: >>>>>> https://svnweb.freebsd.org/changeset/base/278474 >>>>>> >>>>>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() >>>>>> operation for bitsets and use this to implement >>>>>> CPU_COUNT() to count the number of CPUs in a cpuset. >>>>>> >>>>>> MFC after: 2 weeks >>>>> >>>>> Yes, __builtin_popcnt() works with GCC 4.2. It should >>>>> also allow the compiler to DTRT in userland uses of this if >>>>> -msse4.2 is enabled. >>>> >>>> Back in 2012, when I submitted a similar patch, bde noted >>>> __builtin_popcount*() cannot be used with GCC 4.2 for >>>> *kernel* because it emits a library call. >>>> >>>> http://docs.freebsd.org/cgi/mid.cgi?20121116171923.L1135 >>>> >>>> FYI... >>> >>> Weird, I though I built a kernel with this in a tree that uses >>> it in the igb(4) driver. We need a CPU_COUNT() no matter what, >>> but if this emits a library call under GCC I will need to add >>> the call. We could also adopt your bitcount header, though I >>> think it is more consistent to keep the loop in BIT_COUNT() and >>> use something that emulates popcountl() rather than directly >>> using bitcount() in BIT_COUNT() (primarily because the rest of >>> sys/bitset.h is structured that way: explicit loops in >>> sys/bitset.h itself). >> >> I think you should back it out for now and move the discussion to >> arch or hackers. I gave it up at the time but you may have >> better luck. :-) >> >> FYI, the following was the last version of my patch at the time. >> >> https://people.freebsd.org/~jkim/bitcount5.diff > > I could also just make it userland only for now? Rui wants to use > it in userland. However, I can back it out if that is preferred. I am fine with "#if defined(__clang__) || !define(_KERNEL)" case. > To be honest, I'm not sure how valuable it is at this point to > expend a lot of effort to support GCC older than 3.4 (i.e. the > non-builtin popcount approach). No, I don't care about GCC 3.x any more. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU2UALAAoJEHyflib82/FGy8wH/jviXO8fcvprc1y4DGkc87rD ylBjoHimjsDt6Wr9MixYNZKbTXhd4BIgQVvFphgCshGjBbmkvII9DH/OleSTa/p8 /YJk87dZHE336An+GkXGTshESvLHw3l8hACR5FcussDLswJArBcDMuzbIW9Q7ASY dJsWTajP3r4rBqAtQQGxAmNfIvWC6iUP7mELSIoP8vBbUfO4HVZZWh7u5gqXxXnk dDX4kc7XuGweOtMydIY8bYiQYWb+IqMjnCEuucpJ4yktj3kUr8v9To+xAW6AmX7V OZQjMRzFbVKHPB6gs5fSaNZBD/D6MUpeDAXRQCy52xQB7vCQE1UNrR850upvxxY= =NARs -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:21:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D21E991; Mon, 9 Feb 2015 23:21:51 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtpout001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1638FFF2; Mon, 9 Feb 2015 23:21:50 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJJ00I6K274AK70@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 23:21:13 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_04:2015-02-09,2015-02-09,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090229 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJJ00I8B276QG20@st11p02mm-spool002.mac.com>; Mon, 09 Feb 2015 23:21:06 +0000 (GMT) To: Jung-uk Kim From: Rui Paulo Subject: Re: svn commit: r278474 - head/sys/sys Date: Mon, 09 Feb 2015 23:21:06 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:21:51 -0000 On Feb 09, 2015, at 03:17 PM, Jung-uk Kim wrote:=0AI am= fine with "#if defined(__clang__) || !define(_KERNEL)" case.=0A=C2=A0=0AW= orks for me. =C2=A0Note, however, that I'm fixing the original problem in = the xz repository first. =C2=A0CPU_COUNT() will only be used by xz after w= e import 5.2.1.= From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:23:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29B6CB5C; Mon, 9 Feb 2015 23:23:00 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtpout001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9F9812; Mon, 9 Feb 2015 23:22:59 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJJ00K4829MQ500@st11p02mm-asmtp001.mac.com>; Mon, 09 Feb 2015 23:22:35 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-09_04:2015-02-09,2015-02-09,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502090230 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJJ00IAJ29MQG20@st11p02mm-spool002.mac.com>; Mon, 09 Feb 2015 23:22:34 +0000 (GMT) To: Benjamin Kaduk From: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Date: Mon, 09 Feb 2015 23:22:34 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:23:00 -0000 On Feb 09, 2015, at 03:16 PM, Benjamin Kaduk wrote:=0A= =0AOn Mon, Feb 9, 2015 at 6:13 PM, Rui Paulo wrote:=0A= Author: rpaulo=0ADate: Mon Feb=C2=A0 9 23:13:50 2015=0ANew Revision: 27847= 9=0AURL: https://svnweb.freebsd.org/changeset/base/278479=0A=0ALog:=0A=C2=A0= Notify devd(8) when a process crashed.=0A=0A=C2=A0 This change implements= a notification (via devctl) to userland when=0A=C2=A0 the kernel produces= coredumps after a process has crashed.=0A=C2=A0 devd can then run a speci= fic command to produce a human readable crash=0A=C2=A0 report.=C2=A0 The c= ommand is most usually a helper that runs gdb/lldb=0A=C2=A0 commands on th= e file/coredump pair.=C2=A0 It's possible to use this=0A=C2=A0 functionali= ty for implementing automatic generation of crash reports.=0A=0A=C2=A0 dev= d(8) will be notified of the full path of the binary that crashed and=0A=C2= =A0 the full path of the coredump file.=0A=0AWhat advantage does putting t= his in devd have over a standalone daemon for crash reporting?=C2=A0 Is it= just the ease of implementation to leverage the existing infrastructure?=0A= =C2=A0=0AWell, I want to automatically inspect all the programs that crash= ed in a given system. =C2=A0I don't see how you can do that with a standal= one daemon. =C2=A0Or maybe I didn't understand what you meant.= From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:28:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF62DAF; Mon, 9 Feb 2015 23:28:38 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC09CB; Mon, 9 Feb 2015 23:28:37 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t19NSRqr019482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2015 01:28:27 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t19NSRqr019482 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t19NSQ9F019481; Tue, 10 Feb 2015 01:28:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 10 Feb 2015 01:28:26 +0200 From: Konstantin Belousov To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150209232826.GJ42409@kib.kiev.ua> References: <201502092313.t19NDpoS083043@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502092313.t19NDpoS083043@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:28:38 -0000 On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 23:13:50 2015 > New Revision: 278479 > URL: https://svnweb.freebsd.org/changeset/base/278479 > > Log: > Notify devd(8) when a process crashed. > > This change implements a notification (via devctl) to userland when > the kernel produces coredumps after a process has crashed. > devd can then run a specific command to produce a human readable crash > report. The command is most usually a helper that runs gdb/lldb > commands on the file/coredump pair. It's possible to use this > functionality for implementing automatic generation of crash reports. > > devd(8) will be notified of the full path of the binary that crashed and > the full path of the coredump file. Arguably, there should be a knob, probably sysctl, to turn the functionality off. I definitely do not want this on crash boxes used for userspace debugging. Even despite the example handler is inactive. > > Modified: > head/etc/devd.conf > head/sys/kern/kern_sig.c > > Modified: head/etc/devd.conf > ============================================================================== > --- head/etc/devd.conf Mon Feb 9 23:04:30 2015 (r278478) > +++ head/etc/devd.conf Mon Feb 9 23:13:50 2015 (r278479) > @@ -325,4 +325,16 @@ notify 100 { > action "/usr/sbin/automount -c"; > }; > > +# Handle userland coredumps. > +# This commented out handler makes it possible to run an > +# automated debugging session after the core dump is generated. > +# Replace action with a proper coredump handler, but be aware that > +# it will run with elevated privileges. > +notify 10 { > + match "system" "kernel"; > + match "subsystem" "signal"; > + match "type" "coredump"; > + action "logger $comm $core"; > +}; > + > */ > > Modified: head/sys/kern/kern_sig.c > ============================================================================== > --- head/sys/kern/kern_sig.c Mon Feb 9 23:04:30 2015 (r278478) > +++ head/sys/kern/kern_sig.c Mon Feb 9 23:13:50 2015 (r278479) > @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -3237,6 +3238,9 @@ coredump(struct thread *td) > void *rl_cookie; > off_t limit; > int compress; > + char *data = NULL; > + size_t len; > + char *fullpath, *freepath = NULL; > > #ifdef COMPRESS_USER_CORES > compress = compress_user_cores; > @@ -3322,9 +3326,36 @@ close: > error1 = vn_close(vp, FWRITE, cred, td); > if (error == 0) > error = error1; > + else > + goto out; > + /* > + * Notify the userland helper that a process triggered a core dump. > + * This allows the helper to run an automated debugging session. > + */ > + len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; It is much cleaner to use static const char arrays for the names, and use sizeof() - 1 instead of hard-coding commented constants. > + data = malloc(len, M_TEMP, M_NOWAIT); Why is this allocation M_NOWAIT ? > + if (data == NULL) > + goto out; > + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > + goto out; > + snprintf(data, len, "comm=%s", fullpath); > + if (freepath != NULL) { > + free(freepath, M_TEMP); Checks for NULL pointer before free(9) are redundant. > + freepath = NULL; > + } > + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) > + goto out; > + snprintf(data, len, "%s core=%s", data, fullpath); This is weird, and highly depends on the implementation details, supplying the same string as target and source. IMO strcat(9) is enough there. > + devctl_notify("kernel", "signal", "coredump", data); > + free(name, M_TEMP); > +out: > #ifdef AUDIT > audit_proc_coredump(td, name, error); > #endif > + if (freepath != NULL) > + free(freepath, M_TEMP); > + if (data != NULL) > + free(data, M_TEMP); > free(name, M_TEMP); > return (error); > } From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 23:29:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B13ECEEB; Mon, 9 Feb 2015 23:29:17 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54EE5D1; Mon, 9 Feb 2015 23:29:17 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hm9so10060964wib.5; Mon, 09 Feb 2015 15:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0kbzzMjdq7OR9aoUARi1JJPBDFBZeP1pQYXX/o5K4z4=; b=XFkVSTT5iYIeL1OcNUMbJcqLMmrS/pC0mUuWT6L0Yg68NHSWVohg2Shezp3rvwvDEk sb+Kp4Dyn2PfSV60F4HvKaNrN8t1kxm98O7fM8eH2+wyRSzFMay10cXP2aM6Eas2QItZ 0l/9CGeOeac/tkGKZlYoFGG5LBVYlY2Ha6TfPSTaltdJTjL19gVtiRcdqEgjArBSU2dn 7lKeRMcACK8JcyswIObcPC4lHJgGeD2FFGEcA2i8T1JiA0MY372bS1LO3wHSV+aS/z+f UsixR5N5NPD23zNHliiTzVZyjlgjlBj+R7E0yyg+JN5j0ORikTmbT7aeZxIdP0kg4zpJ bv+A== MIME-Version: 1.0 X-Received: by 10.180.198.240 with SMTP id jf16mr39614372wic.27.1423524555334; Mon, 09 Feb 2015 15:29:15 -0800 (PST) Received: by 10.27.77.141 with HTTP; Mon, 9 Feb 2015 15:29:15 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Feb 2015 18:29:15 -0500 Message-ID: Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Benjamin Kaduk To: Rui Paulo Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 23:29:17 -0000 On Mon, Feb 9, 2015 at 6:22 PM, Rui Paulo wrote: > On Feb 09, 2015, at 03:16 PM, Benjamin Kaduk wrote: > > > What advantage does putting this in devd have over a standalone daemon for > crash reporting? Is it just the ease of implementation to leverage the > existing infrastructure? > > > Well, I want to automatically inspect all the programs that crashed in a > given system. I don't see how you can do that with a standalone daemon. > Or maybe I didn't understand what you meant. > I think you have misunderstood what I was trying to ask. We could in principle write a new daemon, call it crash-reporterd for now, and have the kernel notify that daemon whenever any program on the system crashes. But writing the infrastructure to support that would be a bunch of work, and we already have devd set up to get notifications from the kernel, so it is much faster to implement crash reporting in devd, even though crashes in software have nothing to do with device changes. The question boils down to: is the time saved by implementing it this way worth the tradeoff of architectural purity. I don't have an opinion myself, I just want to make sure the question is considered. -Ben From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:02:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2993F799; Tue, 10 Feb 2015 00:02:55 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 004AB654; Tue, 10 Feb 2015 00:02:54 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t1A02rAm020819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Feb 2015 16:02:53 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t1A02r0d020818; Mon, 9 Feb 2015 16:02:53 -0800 (PST) (envelope-from jmg) Date: Mon, 9 Feb 2015 16:02:53 -0800 From: John-Mark Gurney To: Rui Paulo Subject: Re: svn commit: r278478 - head/sys/sys Message-ID: <20150210000252.GO1953@funkthat.com> References: <201502092304.t19N4VB7078488@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502092304.t19N4VB7078488@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 09 Feb 2015 16:02:53 -0800 (PST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:02:55 -0000 Rui Paulo wrote this message on Mon, Feb 09, 2015 at 23:04 +0000: > Author: rpaulo > Date: Mon Feb 9 23:04:30 2015 > New Revision: 278478 > URL: https://svnweb.freebsd.org/changeset/base/278478 > > Log: > Add the ability to print a vendor copyright in dmesg. Should we change this into a linker set so that any module can add their own vendor copyright w/o having to modify this again? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:10:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2759B86; Tue, 10 Feb 2015 00:10:46 +0000 (UTC) Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE9C76B7; Tue, 10 Feb 2015 00:10:46 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YKy5f-0000fS-Q6; Mon, 09 Feb 2015 23:50:07 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t19No5Pe076407; Mon, 9 Feb 2015 16:50:05 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19jA7uzpC89wFVU1bjB6EGO Message-ID: <1423525805.16794.24.camel@freebsd.org> Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Ian Lepore To: Benjamin Kaduk Date: Mon, 09 Feb 2015 16:50:05 -0700 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:10:47 -0000 On Mon, 2015-02-09 at 18:29 -0500, Benjamin Kaduk wrote: > On Mon, Feb 9, 2015 at 6:22 PM, Rui Paulo wrote: > > > On Feb 09, 2015, at 03:16 PM, Benjamin Kaduk wrote: > > > > > > What advantage does putting this in devd have over a standalone daemon for > > crash reporting? Is it just the ease of implementation to leverage the > > existing infrastructure? > > > > > > Well, I want to automatically inspect all the programs that crashed in a > > given system. I don't see how you can do that with a standalone daemon. > > Or maybe I didn't understand what you meant. > > > > I think you have misunderstood what I was trying to ask. > > We could in principle write a new daemon, call it crash-reporterd for now, > and have the kernel notify that daemon whenever any program on the system > crashes. But writing the infrastructure to support that would be a bunch > of work, and we already have devd set up to get notifications from the > kernel, so it is much faster to implement crash reporting in devd, even > though crashes in software have nothing to do with device changes. > > The question boils down to: is the time saved by implementing it this way > worth the tradeoff of architectural purity. > > I don't have an opinion myself, I just want to make sure the question is > considered. > > -Ben Truth be told, it kind of bugs me. I think adding this to devctl and devd is inappropriate without also renaming those components to reflect their new role, and rewriting the manpages to reflect what they actually do now. If you ponder for a moment what the new role seems to be (generic notification to userland of events happening in the kernel), you end up with names like "keventd" and that makes you wonder whether a new type of knote for kevent, listened for by a new crashd app, would be better. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:12:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33BE7CD2; Tue, 10 Feb 2015 00:12:42 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7507B1; Tue, 10 Feb 2015 00:12:41 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id 89D081C84AA; Mon, 9 Feb 2015 17:47:11 -0500 (EST) Received: from app.lifanov.com (chat.lifanov.com [206.125.175.13]) by mail.lifanov.com (Postfix) with ESMTPA id BA2711C84A8; Mon, 9 Feb 2015 17:47:10 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 09 Feb 2015 17:47:10 -0500 From: Nikolai Lifanov To: Glen Barber Subject: Re: svn commit: r278450 - head/release In-Reply-To: <201502091046.t19AkdCM067270@svn.freebsd.org> References: <201502091046.t19AkdCM067270@svn.freebsd.org> Message-ID: <150387d27ebf311cb4751fe39c2a080c@mail.lifanov.com> X-Sender: lifanov@mail.lifanov.com User-Agent: Roundcube Webmail/1.0.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:12:42 -0000 On 2015-02-09 05:46, Glen Barber wrote: > Author: gjb > Date: Mon Feb 9 10:46:39 2015 > New Revision: 278450 > URL: https://svnweb.freebsd.org/changeset/base/278450 > > Log: > Revert r278445. > > I was going to use __FreeBSD_version to determine if > xz(1) should be multi-threaded by default, but doing > this will cause problems if/when the changes are merged > from head. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/release/Makefile > > Modified: head/release/Makefile > Can you just X-MFC this with xz 5.2.0 import? You can then refer to xz in OBJDIR to get this to work on older releases. - Nikolai Lifanov From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:25:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9AD3F47; Tue, 10 Feb 2015 00:25:12 +0000 (UTC) Date: Tue, 10 Feb 2015 00:25:07 +0000 From: Glen Barber To: Nikolai Lifanov Subject: Re: svn commit: r278450 - head/release Message-ID: <20150210002507.GH84467@hub.FreeBSD.org> References: <201502091046.t19AkdCM067270@svn.freebsd.org> <150387d27ebf311cb4751fe39c2a080c@mail.lifanov.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KR/qxknboQ7+Tpez" Content-Disposition: inline In-Reply-To: <150387d27ebf311cb4751fe39c2a080c@mail.lifanov.com> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, owner-svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:25:14 -0000 --KR/qxknboQ7+Tpez Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 05:47:10PM -0500, Nikolai Lifanov wrote: > On 2015-02-09 05:46, Glen Barber wrote: > >Author: gjb > >Date: Mon Feb 9 10:46:39 2015 > >New Revision: 278450 > >URL: https://svnweb.freebsd.org/changeset/base/278450 > > > >Log: > > Revert r278445. > > > > I was going to use __FreeBSD_version to determine if > > xz(1) should be multi-threaded by default, but doing > > this will cause problems if/when the changes are merged > > from head. > > > > Sponsored by: The FreeBSD Foundation > > > >Modified: > > head/release/Makefile > > > >Modified: head/release/Makefile > > >=20 > Can you just X-MFC this with xz 5.2.0 import? > You can then refer to xz in OBJDIR to get this to work on older releases. >=20 That is the intent, but not this commit. The problem is the Makefile would contain things like: .if (${FREEBSD_VERSION} >=3D 1100059) || ((${FREEBSD_VERSION < 1100000 \ && ${FREEBSD_VERSION} >=3D 1000555)) [...]. and other varying levels of ridiculousness. It's bad enough we have to do this in the ports tree. I certainly do not intend to implement this behavior in the src tree. With regards to the OBJDIR, actual releases (not always snapshots) are always built from the same major FreeBSD version or higher. Meaning, code/features that exist in releng/10.1 are available already in stable/10 at the time. In this particular case, I care less about snapshot builds and more about the release builds, which in this particular case, we are far off in the future enough that it is guaranteed the feature needed will be available. Glen --KR/qxknboQ7+Tpez Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU2U/eAAoJEAMUWKVHj+KThPIP/1n3TghI+4U6SK9/MGACF1vM KgPmkCAlq/PC5tqEsBhgidoLKFUj5IpbbMRj48/p80gXvxqo8Yn1UjRhvt7QymUl OELHVdtt3b8VWMM8bHBwFA5YKayImiezAqAsJhKyYfV2VYSTaaybZd6m64T4KeVR T4ZHHe/2Dr87FEfnXbOwt4gRqtd/75UUJeXoinVD/Dm8gheeHDW/9pE97uQ7nWKK jAd/cJYp7ZJ/XSZC7ZhQIbOZkxqq68UbNrVBaNFc6Yb60UjfqTGzhuCWOp2rgOnF fML7GOgxM+rwnkWHlAgX8GjfV2rw9q4Rj7yOm3O2jp4cH7s2RPJLhM+lHch56gfq waHy1CBRP4LsfeNAEQKlTr+uc5kO1yfKsBbm0Yj0xQ729U6FXB11HVfEEHxugNfy +ZoS0/+tZJyntL7bZkz5oYqrLMHlC4UpIANLBSW6f4OU6YOcBRXsfCwZfXAVadou Y0KkC3TyL3FNM6UhfJfVKssFG7QQcQp7thoDI2P9cDm2rC13laYkKtPWZiH7DObv UDq+rdmuksukBwWeikznq8AZBpD5RzA09xhc1ei5VRfLLlRpoFoBGIL4V/e2fbmS 0tj+3jjnCUq/I7YxYZXhnQMd1tMWqnGkvSghoo12zBwGNXMJlM2ulfLBgT8pbQJd +JnH+QX25Y//CEdIcNhB =R4ia -----END PGP SIGNATURE----- --KR/qxknboQ7+Tpez-- From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:48:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A45A42CE; Tue, 10 Feb 2015 00:48:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F86A2ED; Tue, 10 Feb 2015 00:48:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A0mqDY043763; Tue, 10 Feb 2015 00:48:52 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A0mquM043762; Tue, 10 Feb 2015 00:48:52 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201502100048.t1A0mquM043762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Tue, 10 Feb 2015 00:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278480 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:48:52 -0000 Author: jamie Date: Tue Feb 10 00:48:51 2015 New Revision: 278480 URL: https://svnweb.freebsd.org/changeset/base/278480 Log: Un-revert the r278323 again - whatever Jenkins/kyua is up it, it has nothing to do with this. Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Mon Feb 9 23:13:50 2015 (r278479) +++ head/etc/rc.d/jail Tue Feb 10 00:48:51 2015 (r278480) @@ -233,8 +233,7 @@ parse_options() fi eval : \${jail_${_j}_procfs_enable:=${jail_procfs_enable:-NO}} if checkyesno jail_${_j}_procfs_enable; then - echo " mount += " \ - "\"procfs ${_rootdir%/}/proc procfs rw 0 0\";" + echo " mount.procfs;" fi eval : \${jail_${_j}_mount_enable:=${jail_mount_enable:-NO}} From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:55:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4690654C; Tue, 10 Feb 2015 00:55:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30F203DA; Tue, 10 Feb 2015 00:55:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A0thmA048212; Tue, 10 Feb 2015 00:55:43 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A0tgiK048210; Tue, 10 Feb 2015 00:55:42 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502100055.t1A0tgiK048210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 10 Feb 2015 00:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278481 - in head/sys/powerpc: aim include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:55:43 -0000 Author: nwhitehorn Date: Tue Feb 10 00:55:42 2015 New Revision: 278481 URL: https://svnweb.freebsd.org/changeset/base/278481 Log: Set thread priorities on multithreaded CPUs so that threads holding a spinlock are high-priority and threads waiting for a spinlock are set to low priority. Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/include/cpu.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Tue Feb 10 00:48:51 2015 (r278480) +++ head/sys/powerpc/aim/machdep.c Tue Feb 10 00:55:42 2015 (r278481) @@ -750,6 +750,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) { + __asm __volatile("or 2,2,2"); /* Set high thread priority */ msr = intr_disable(); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_msr = msr; @@ -768,8 +769,10 @@ spinlock_exit(void) critical_exit(); msr = td->td_md.md_saved_msr; td->td_md.md_spinlock_count--; - if (td->td_md.md_spinlock_count == 0) + if (td->td_md.md_spinlock_count == 0) { intr_restore(msr); + __asm __volatile("or 6,6,6"); /* Set normal thread priority */ + } } int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Tue Feb 10 00:48:51 2015 (r278480) +++ head/sys/powerpc/include/cpu.h Tue Feb 10 00:55:42 2015 (r278481) @@ -88,7 +88,7 @@ get_cyclecount(void) } #define cpu_getstack(td) ((td)->td_frame->fixreg[1]) -#define cpu_spinwait() /* nothing */ +#define cpu_spinwait() __asm __volatile("or 27,27,27") /* yield */ extern char btext[]; extern char etext[]; From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 00:57:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75E5269D; Tue, 10 Feb 2015 00:57:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 600E43EB; Tue, 10 Feb 2015 00:57:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A0vR6K048496; Tue, 10 Feb 2015 00:57:27 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A0vRYM048495; Tue, 10 Feb 2015 00:57:27 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502100057.t1A0vRYM048495@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 10 Feb 2015 00:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278482 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 00:57:27 -0000 Author: nwhitehorn Date: Tue Feb 10 00:57:26 2015 New Revision: 278482 URL: https://svnweb.freebsd.org/changeset/base/278482 Log: Add error reporting to interrupt CPU binding. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Tue Feb 10 00:55:42 2015 (r278481) +++ head/sys/powerpc/pseries/xics.c Tue Feb 10 00:57:26 2015 (r278482) @@ -197,12 +197,13 @@ xicp_bind(device_t dev, u_int irq, cpuse { struct xicp_softc *sc = device_get_softc(dev); cell_t status, cpu; - int ncpus, i; + int ncpus, i, error; /* * This doesn't appear to actually support affinity groups, so pick a * random CPU. */ + ncpus = 0; CPU_FOREACH(cpu) if (CPU_ISSET(cpu, &cpumask)) ncpus++; @@ -217,8 +218,10 @@ xicp_bind(device_t dev, u_int irq, cpuse } - rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, XICP_PRIORITY, - &status); + error = rtas_call_method(sc->ibm_set_xive, 3, 1, irq, cpu, + XICP_PRIORITY, &status); + if (error < 0) + panic("Cannot bind interrupt %d to CPU %d", irq, cpu); } static void From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 01:02:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8A4813; Tue, 10 Feb 2015 01:02:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7834E677; Tue, 10 Feb 2015 01:02:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A123Q9052704; Tue, 10 Feb 2015 01:02:03 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A1235B052703; Tue, 10 Feb 2015 01:02:03 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100102.t1A1235B052703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 01:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278483 - head/usr.sbin/bsdconfig/networking/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:02:03 -0000 Author: dteske Date: Tue Feb 10 01:02:02 2015 New Revision: 278483 URL: https://svnweb.freebsd.org/changeset/base/278483 Log: Comments. MFC after: 3 days Modified: head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Tue Feb 10 00:57:26 2015 (r278482) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Tue Feb 10 01:02:02 2015 (r278483) @@ -207,7 +207,7 @@ f_dialog_menu_netdev_edit() '3 $msg_ipaddr4' '$ipaddr' '4 $msg_netmask' '$netmask' '5 $msg_options' '$options' - " + " # END-QUOTE eval f_dialog_menu_size height width rows \ \"\$DIALOG_TITLE\" \ \"\$DIALOG_BACKTITLE\" \ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 01:05:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B815986; Tue, 10 Feb 2015 01:05:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B946695; Tue, 10 Feb 2015 01:05:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A15shK053264; Tue, 10 Feb 2015 01:05:54 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A15qiq053255; Tue, 10 Feb 2015 01:05:52 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201502100105.t1A15qiq053255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Tue, 10 Feb 2015 01:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278484 - in stable/10: etc/rc.d usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:05:54 -0000 Author: jamie Date: Tue Feb 10 01:05:51 2015 New Revision: 278484 URL: https://svnweb.freebsd.org/changeset/base/278484 Log: MFC r278323: Add mount.procfs jail parameter, so procfs can be mounted when a prison's root is in its fstab. Also fix a typo while I'm at it. PR: 197237 197066 Modified: stable/10/etc/rc.d/jail stable/10/usr.sbin/jail/command.c stable/10/usr.sbin/jail/config.c stable/10/usr.sbin/jail/jail.8 stable/10/usr.sbin/jail/jail.c stable/10/usr.sbin/jail/jailp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/jail ============================================================================== --- stable/10/etc/rc.d/jail Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/etc/rc.d/jail Tue Feb 10 01:05:51 2015 (r278484) @@ -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 @@ -233,8 +233,7 @@ parse_options() fi eval : \${jail_${_j}_procfs_enable:=${jail_procfs_enable:-NO}} if checkyesno jail_${_j}_procfs_enable; then - echo " mount += " \ - "\"procfs ${_rootdir%/}/proc procfs rw 0 0\";" + echo " mount.procfs;" fi eval : \${jail_${_j}_mount_enable:=${jail_mount_enable:-NO}} Modified: stable/10/usr.sbin/jail/command.c ============================================================================== --- stable/10/usr.sbin/jail/command.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/command.c Tue Feb 10 01:05:51 2015 (r278484) @@ -112,6 +112,12 @@ next_command(struct cfjail *j) if (!bool_param(j->intparams[IP_MOUNT_FDESCFS])) continue; j->comstring = &dummystring; + break; + case IP_MOUNT_PROCFS: + if (!bool_param(j->intparams[IP_MOUNT_PROCFS])) + continue; + j->comstring = &dummystring; + break; case IP__OP: case IP_STOP_TIMEOUT: j->comstring = &dummystring; @@ -529,6 +535,32 @@ run_command(struct cfjail *j) } break; + case IP_MOUNT_PROCFS: + argv = alloca(7 * sizeof(char *)); + path = string_param(j->intparams[KP_PATH]); + if (path == NULL) { + jail_warnx(j, "mount.procfs: no path"); + return -1; + } + devpath = alloca(strlen(path) + 6); + sprintf(devpath, "%s/proc", path); + if (check_path(j, "mount.procfs", devpath, 0, + down ? "procfs" : NULL) < 0) + return -1; + if (down) { + *(const char **)&argv[0] = "/sbin/umount"; + argv[1] = devpath; + argv[2] = NULL; + } else { + *(const char **)&argv[0] = _PATH_MOUNT; + *(const char **)&argv[1] = "-t"; + *(const char **)&argv[2] = "procfs"; + *(const char **)&argv[3] = "."; + argv[4] = devpath; + argv[5] = NULL; + } + break; + case IP_COMMAND: if (j->name != NULL) goto default_command; Modified: stable/10/usr.sbin/jail/config.c ============================================================================== --- stable/10/usr.sbin/jail/config.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/config.c Tue Feb 10 01:05:51 2015 (r278484) @@ -84,6 +84,7 @@ static const struct ipspec intparams[] = [IP_MOUNT] = {"mount", PF_INTERNAL | PF_REV}, [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL}, [IP_MOUNT_FDESCFS] = {"mount.fdescfs", PF_INTERNAL | PF_BOOL}, + [IP_MOUNT_PROCFS] = {"mount.procfs", PF_INTERNAL | PF_BOOL}, [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL}, [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT}, [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL}, Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jail.8 Tue Feb 10 01:05:51 2015 (r278484) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2015 +.Dd February 6, 2015 .Dt JAIL 8 .Os .Sh NAME @@ -753,6 +753,12 @@ Mount a filesystem on the chrooted .Pa /dev/fd directory. +.It Va mount.procfs +Mount a +.Xr procfs 5 +filesystem on the chrooted +.Pa /proc +directory. .It Va allow.dying Allow making changes to a .Va dying @@ -1206,6 +1212,7 @@ environment of the first jail. .Xr jls 8 , .Xr mount 8 , .Xr named 8 , +.Xr procfs 5 , .Xr reboot 8 , .Xr rpcbind 8 , .Xr sendmail 8 , Modified: stable/10/usr.sbin/jail/jail.c ============================================================================== --- stable/10/usr.sbin/jail/jail.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jail.c Tue Feb 10 01:05:51 2015 (r278484) @@ -93,6 +93,7 @@ static const enum intparam startcommands IP__MOUNT_FROM_FSTAB, IP_MOUNT_DEVFS, IP_MOUNT_FDESCFS, + IP_MOUNT_PROCFS, IP_EXEC_PRESTART, IP__OP, IP_VNET_INTERFACE, @@ -109,6 +110,7 @@ static const enum intparam stopcommands[ IP_STOP_TIMEOUT, IP__OP, IP_EXEC_POSTSTOP, + IP_MOUNT_PROCFS, IP_MOUNT_FDESCFS, IP_MOUNT_DEVFS, IP__MOUNT_FROM_FSTAB, Modified: stable/10/usr.sbin/jail/jailp.h ============================================================================== --- stable/10/usr.sbin/jail/jailp.h Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jailp.h Tue Feb 10 01:05:51 2015 (r278484) @@ -96,6 +96,7 @@ enum intparam { IP_MOUNT, /* Mount points in fstab(5) form */ IP_MOUNT_DEVFS, /* Mount /dev under prison root */ IP_MOUNT_FDESCFS, /* Mount /dev/fd under prison root */ + IP_MOUNT_PROCFS, /* Mount /proc under prison root */ IP_MOUNT_FSTAB, /* A standard fstab(5) file */ IP_STOP_TIMEOUT, /* Time to wait after sending SIGTERM */ IP_VNET_INTERFACE, /* Assign interface(s) to vnet jail */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 01:16:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A56CDB5F; Tue, 10 Feb 2015 01:16:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FDF27E4; Tue, 10 Feb 2015 01:16:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A1GiXi058367; Tue, 10 Feb 2015 01:16:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A1GiUn058365; Tue, 10 Feb 2015 01:16:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201502100116.t1A1GiUn058365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 10 Feb 2015 01:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278485 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:16:44 -0000 Author: np Date: Tue Feb 10 01:16:43 2015 New Revision: 278485 URL: https://svnweb.freebsd.org/changeset/base/278485 Log: cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's safe to do so. MFC after: 1 month Modified: head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Tue Feb 10 01:05:51 2015 (r278484) +++ head/sys/dev/cxgbe/common/t4_hw.c Tue Feb 10 01:16:43 2015 (r278485) @@ -3111,6 +3111,31 @@ void t4_write_rss_pf_mask(struct adapter &pfmask, 1, A_TP_RSS_PF_MSK); } +static void refresh_vlan_pri_map(struct adapter *adap) +{ + + t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, + &adap->params.tp.vlan_pri_map, 1, + A_TP_VLAN_PRI_MAP); + + /* + * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field + * shift positions of several elements of the Compressed Filter Tuple + * for this adapter which we need frequently ... + */ + adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); + adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); + adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); + adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); + + /* + * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID + * represents the presense of an Outer VLAN instead of a VNIC ID. + */ + if ((adap->params.tp.ingress_config & F_VNIC) == 0) + adap->params.tp.vnic_shift = -1; +} + /** * t4_set_filter_mode - configure the optional components of filter tuples * @adap: the adapter @@ -3134,6 +3159,8 @@ int t4_set_filter_mode(struct adapter *a return -EINVAL; t4_write_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &mode_map, 1, A_TP_VLAN_PRI_MAP); + refresh_vlan_pri_map(adap); + return 0; } @@ -5618,33 +5645,10 @@ int __devinit t4_init_tp_params(struct a for (chan = 0; chan < NCHAN; chan++) adap->params.tp.tx_modq[chan] = chan; - /* - * Cache the adapter's Compressed Filter Mode and global Incress - * Configuration. - */ - t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, - &adap->params.tp.vlan_pri_map, 1, - A_TP_VLAN_PRI_MAP); t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &adap->params.tp.ingress_config, 1, A_TP_INGRESS_CONFIG); - - /* - * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field - * shift positions of several elements of the Compressed Filter Tuple - * for this adapter which we need frequently ... - */ - adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); - adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); - adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); - adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); - - /* - * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID - * represents the presense of an Outer VLAN instead of a VNIC ID. - */ - if ((adap->params.tp.ingress_config & F_VNIC) == 0) - adap->params.tp.vnic_shift = -1; + refresh_vlan_pri_map(adap); return 0; } Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Feb 10 01:05:51 2015 (r278484) +++ head/sys/dev/cxgbe/t4_main.c Tue Feb 10 01:16:43 2015 (r278485) @@ -7116,10 +7116,9 @@ get_filter_mode(struct adapter *sc, uint log(LOG_WARNING, "%s: cached filter mode out of sync %x %x.\n", device_get_nameunit(sc->dev), sc->params.tp.vlan_pri_map, fconf); - sc->params.tp.vlan_pri_map = fconf; } - *mode = fconf_to_mode(sc->params.tp.vlan_pri_map); + *mode = fconf_to_mode(fconf); end_synchronized_op(sc, LOCK_HELD); return (0); @@ -7150,14 +7149,7 @@ set_filter_mode(struct adapter *sc, uint } #endif -#ifdef notyet rc = -t4_set_filter_mode(sc, fconf); - if (rc == 0) - sc->filter_mode = fconf; -#else - rc = ENOTSUP; -#endif - done: end_synchronized_op(sc, LOCK_HELD); return (rc); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 01:25:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0E9ACF2; Tue, 10 Feb 2015 01:25:38 +0000 (UTC) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7943C8B3; Tue, 10 Feb 2015 01:25:38 +0000 (UTC) Received: by iecrl12 with SMTP id rl12so21183136iec.11; Mon, 09 Feb 2015 17:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=cTi9sUs9AHqg6sUdLMopjIPbokSZ3d2xc63ulsoGn0o=; b=yCc2E1iw7Ik1dO9mzAmvxeUs/wMpAou1HQRiKrrkJ2xB7bF0LfKWnHyjiUDyzC9/7w Pllqn+52ukW2o4Qs2sQ+ghl6Tfzh4RIMCuFpi/TLPoAbOYhx8AmdQTKR7OYv+iH0/Gmr YW+E5yYIcsWmM0s94Hywh1nnSBZuUKwwfdEL3N/STJdVNlP3TozvYAnBpdBK+ht2EqSx 8ABRgBDKlnpoF54eRK6ELaGnlqZjuPIrHszAjggwonoDaOEYLaWY/Qoxjug1RRSK2kQN TxRJOgze4uaBTn5Ze9MtqPTFk5ak7EhF2X4xRO7UnpIOgsFofRikEIvfFszY6ym4Cb3K L/LQ== MIME-Version: 1.0 X-Received: by 10.50.82.68 with SMTP id g4mr20478221igy.26.1423531532001; Mon, 09 Feb 2015 17:25:32 -0800 (PST) Received: by 10.50.182.233 with HTTP; Mon, 9 Feb 2015 17:25:31 -0800 (PST) In-Reply-To: <20150207081025.GT42409@kib.kiev.ua> References: <201502061754.t16HssXU042750@svn.freebsd.org> <343803A3-CFA3-4766-8294-139A6D8C0235@gmail.com> <20150207081025.GT42409@kib.kiev.ua> Date: Mon, 9 Feb 2015 17:25:31 -0800 Message-ID: Subject: Re: svn commit: r278323 - in head: etc/rc.d usr.sbin/jail From: NGie Cooper To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , "jenkins-admin@freebsd.org" , James Gritton X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:25:38 -0000 On Sat, Feb 7, 2015 at 12:10 AM, Konstantin Belousov wrote: > On Fri, Feb 06, 2015 at 09:23:47PM -0800, Garrett Cooper wrote: >> pgrep uses /proc to determine whether or not a process is running. If it= ?s not properly mounted or the jail isn?t started properly, that could caus= e the issues seen here. I know because I?ve tried running these tests befor= e in an attempt to fix them, and this was one of the things I ran into. >> > pgrep does not use /proc. You're right. I'm not sure where I got it in my mind that that was the case, but this wasn't it.. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 01:35:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 767C21D1; Tue, 10 Feb 2015 01:35:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6223E99A; Tue, 10 Feb 2015 01:35:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A1ZRO9067754; Tue, 10 Feb 2015 01:35:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A1ZRhf067753; Tue, 10 Feb 2015 01:35:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502100135.t1A1ZRhf067753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 10 Feb 2015 01:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278486 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:35:27 -0000 Author: gjb Date: Tue Feb 10 01:35:26 2015 New Revision: 278486 URL: https://svnweb.freebsd.org/changeset/base/278486 Log: Exclude 'tests' from DEBUG_DISTRIBUTIONS. Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Feb 10 01:16:43 2015 (r278485) +++ head/Makefile.inc1 Tue Feb 10 01:35:26 2015 (r278486) @@ -823,7 +823,7 @@ EXTRA_DISTRIBUTIONS+= tests DEBUG_DISTRIBUTIONS= .if ${MK_DEBUG_FILES} != "no" -DEBUG_DISTRIBUTIONS+= base ${EXTRA_DISTRIBUTIONS:S,doc,,} +DEBUG_DISTRIBUTIONS+= base ${EXTRA_DISTRIBUTIONS:S,doc,,:S,tests,,} .endif MTREE_MAGIC?= mtree 2.0 From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:18:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EAF8133; Tue, 10 Feb 2015 02:18:59 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E3C21D9B; Tue, 10 Feb 2015 02:18:58 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-230-68.lns20.per1.internode.on.net [121.45.230.68]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t1A2IrlU070464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 9 Feb 2015 18:18:55 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <54D96A87.7000600@freebsd.org> Date: Tue, 10 Feb 2015 10:18:47 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John-Mark Gurney , Rui Paulo Subject: Re: svn commit: r278478 - head/sys/sys References: <201502092304.t19N4VB7078488@svn.freebsd.org> <20150210000252.GO1953@funkthat.com> In-Reply-To: <20150210000252.GO1953@funkthat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:18:59 -0000 On 2/10/15 8:02 AM, John-Mark Gurney wrote: > Rui Paulo wrote this message on Mon, Feb 09, 2015 at 23:04 +0000: >> Author: rpaulo >> Date: Mon Feb 9 23:04:30 2015 >> New Revision: 278478 >> URL: https://svnweb.freebsd.org/changeset/base/278478 >> >> Log: >> Add the ability to print a vendor copyright in dmesg. > Should we change this into a linker set so that any module can > add their own vendor copyright w/o having to modify this again? > that is not a stupid idea.. or we could add a copyright element to the sample sysinit code and provide a linked list of things to print out. (a copyright API.. call it from SYINIT, if it's early it queues it.. if you are already booted it prints it right away) From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:23:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C538438; Tue, 10 Feb 2015 02:23:08 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D927E4C; Tue, 10 Feb 2015 02:23:08 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ00N48AL41Q10@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 02:22:19 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_01:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100022 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Rui Paulo In-reply-to: Date: Mon, 09 Feb 2015 18:22:16 -0800 Content-transfer-encoding: quoted-printable Message-id: References: To: Benjamin Kaduk X-Mailer: Apple Mail (2.2070.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:23:08 -0000 On Feb 9, 2015, at 15:29, Benjamin Kaduk wrote: > The question boils down to: is the time saved by implementing it this = way worth the tradeoff of architectural purity. Yes, that was a tradeoff. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:24:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A224F58A; Tue, 10 Feb 2015 02:24:56 +0000 (UTC) Date: Tue, 10 Feb 2015 02:24:51 +0000 From: Glen Barber To: Dmitry Morozovsky Subject: Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz... Message-ID: <20150210022451.GA14325@hub.FreeBSD.org> References: <201502090620.t196KZSk040702@svn.freebsd.org> <20150209122540.GE84467@hub.FreeBSD.org> <20150209123057.GF84467@hub.FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:24:57 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 04:08:00PM +0300, Dmitry Morozovsky wrote: > > > FWIW, compressing VM images (some sparse files, some not) would take > > > upwards of 45 minutes, which after this update, just takes a few > > > minutes. > > >=20 > > > root@releng2:/R2/vmimages # time xz -T 0 -k FreeBSD-11.0-CURRENT-amd= 64.qcow2 \ > > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.raw; \ > > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vhd; \ > > > time xz -T 0 -k FreeBSD-11.0-CURRENT-amd64.vmdk > > > 1027.602u 40.376s 1:09.57 1535.1% 81+192k 0+19774io 0pf+0w > > > 1032.978u 38.823s 1:08.17 1572.2% 81+192k 0+19696io 0pf+0w > > > 1033.908u 38.593s 1:11.70 1495.8% 81+192k 0+19729io 0pf+0w > > > 1091.749u 42.371s 1:04.27 1764.6% 81+192k 0+19751io 0pf+0w > > >=20 > >=20 > > I meant to include that this is on a 48-core machine. >=20 > Hm, I can't beleive you didn't use pxz ;) >=20 For RE purposes, using base system utilities supersedes utilities available elsewhere. In my initial tests with pxz, there was an, albeit somewhat predictable, increase in resulting file size as the number of threads increased, while xz in base with the latest update produces output files within +/-1024Kb difference of the unthreaded version. For RE side, there was no real gain in using pxz over xz, because the sacrifice was the output file size. I do not care so much about the time taken to compress the files. I *do* care about the resulting file size, since I (personally) want to be sure that the end user can download the smallest possible file. I was unsure what to expect with the xz(1) update in this regard, and was surprised to see a non-visible difference in the resulting file. > Anyway, having this in base, and not depending on external tool, is=20 > amazingly great. >=20 > BTW, Rui, did you some comparative tests with pxz? >=20 As stated above, pxz (last I tested) produces incrementally larger files as the thread count increases. From what I have seen so far, the latest xz update does not. Glen --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU2WvzAAoJEAMUWKVHj+KTcZAP/05b3Ek+OnlbxvpkouzPDLMS LF88/Ru8vcV6vMc4IN/Z8Mgnmb97MC4TYu9oDrn7mj+PY47xKGSsecVNftE4zMuz 4snCCc6htHzD+PSWY4YwPw6BxycuyIp6vchcwNKH0Quhxgzum+K75XxmBmwKfl+7 aPUuFIGfvV2L2PJG0XDf46ZXXDdMyB5Y/XH0khARhbmV2jb/uFhsohc8qsn9ZLY0 R1TanKIrLTGgNiFaS9/uCLkyMHb3f3TBNw6SvNqQ/3OiHfp0GFqNBycPIGdKNTxV extCaKcweIgwpyEZK/7fkttLU5PKKQzPF/QR75azRd5KiUVxGAeg1ZDKbnlEh/3x WLTV4uPCaB8oLcx5bMXIM5EASgvgHG/H7WySEaFbV51EPYvmW1FsjOF//YHMDrIU sxlEvuIzjxnXMREkiByzYschE/f44gsKiPpTkXm/TWRzzooqOkNMBcMuKqHR0d3x WSUoEyN/fD4vFN/VRhTboqIkHoA6C5qzaAu99huVm/BR6fx/TxZJIvLTzI8j3iD+ nub31GyBOwHXiNKe50pp621gKpJhyUowoTpT3aPBIZVzgRfHuQFHCc4ahYZ0yYRT 16/pi8tAIGjrABkwxfPQ4ZiqL1JxJLlD48j9VN1X4NVInsmU+QprQoXDZAO4DHb4 lwPRKg/FzMRXJ8bW8s5i =C+sN -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:31:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CEB48C3; Tue, 10 Feb 2015 02:31:39 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3FDCF26; Tue, 10 Feb 2015 02:31:38 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ00NZZAZY1Q10@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 02:31:14 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_01:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100022 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278478 - head/sys/sys From: Rui Paulo In-reply-to: <20150210000252.GO1953@funkthat.com> Date: Mon, 09 Feb 2015 18:31:10 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502092304.t19N4VB7078488@svn.freebsd.org> <20150210000252.GO1953@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:31:39 -0000 On Feb 9, 2015, at 16:02, John-Mark Gurney wrote: >=20 > Rui Paulo wrote this message on Mon, Feb 09, 2015 at 23:04 +0000: >> Author: rpaulo >> Date: Mon Feb 9 23:04:30 2015 >> New Revision: 278478 >> URL: https://svnweb.freebsd.org/changeset/base/278478 >>=20 >> Log: >> Add the ability to print a vendor copyright in dmesg. >=20 > Should we change this into a linker set so that any module can > add their own vendor copyright w/o having to modify this again? So you want a copyright module? That seems a bit overkill. :-) An API like Julian mentioned seems like a better idea, but it's not = trivial to implement if you want the Copyright to be the first thing to = be printed. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:36:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03A38A2B; Tue, 10 Feb 2015 02:36:19 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA488F44; Tue, 10 Feb 2015 02:36:18 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ00N29B7W4W20@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 02:35:58 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_01:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100023 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Rui Paulo In-reply-to: <20150209232826.GJ42409@kib.kiev.ua> Date: Mon, 09 Feb 2015 18:35:55 -0800 Content-transfer-encoding: 7bit Message-id: References: <201502092313.t19NDpoS083043@svn.freebsd.org> <20150209232826.GJ42409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:36:19 -0000 On Feb 9, 2015, at 15:28, Konstantin Belousov wrote: > Arguably, there should be a knob, probably sysctl, to turn the > functionality off. I definitely do not want this on crash boxes used for > userspace debugging. Even despite the example handler is inactive. OK, I can provide a sysctl knob. >> + len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; > It is much cleaner to use static const char arrays for the names, > and use sizeof() - 1 instead of hard-coding commented constants. OK. I was trying to avoid allocating >2k on the stack. >> + data = malloc(len, M_TEMP, M_NOWAIT); > Why is this allocation M_NOWAIT ? That should be M_WAITOK. >> + freepath = NULL; >> + } >> + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) >> + goto out; >> + snprintf(data, len, "%s core=%s", data, fullpath); > This is weird, and highly depends on the implementation details, supplying > the same string as target and source. IMO strcat(9) is enough there. OK, I'll change it to strcat. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:38:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F8EABF7; Tue, 10 Feb 2015 02:38:20 +0000 (UTC) Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2603F57; Tue, 10 Feb 2015 02:38:19 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YL0iQ-000854-Gn; Tue, 10 Feb 2015 02:38:18 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1A2cGe3077444; Mon, 9 Feb 2015 19:38:16 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+2BdBjnDUtxZRbX2raYftY Message-ID: <1423535896.80968.5.camel@freebsd.org> Subject: Re: svn commit: r278478 - head/sys/sys From: Ian Lepore To: John-Mark Gurney Date: Mon, 09 Feb 2015 19:38:16 -0700 In-Reply-To: <20150210000252.GO1953@funkthat.com> References: <201502092304.t19N4VB7078488@svn.freebsd.org> <20150210000252.GO1953@funkthat.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:38:20 -0000 On Mon, 2015-02-09 at 16:02 -0800, John-Mark Gurney wrote: > Rui Paulo wrote this message on Mon, Feb 09, 2015 at 23:04 +0000: > > Author: rpaulo > > Date: Mon Feb 9 23:04:30 2015 > > New Revision: 278478 > > URL: https://svnweb.freebsd.org/changeset/base/278478 > > > > Log: > > Add the ability to print a vendor copyright in dmesg. > > Should we change this into a linker set so that any module can > add their own vendor copyright w/o having to modify this again? > As long as that doesn't result in a boot-time cacaphony of voices disclaiming responsibility for being in Bill Paul's head. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:43:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6C9DE8C; Tue, 10 Feb 2015 02:43:23 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF4D77; Tue, 10 Feb 2015 02:43:23 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id w55so19275413wes.4; Mon, 09 Feb 2015 18:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=PJC+/LRGZb1DUfrRrF7cr+lGO1zUM9oVyHf6DnrtnrQ=; b=LTCg2eC6zJPCUCvOIuulFZ1LT/jI2hzF706IsK9bolKAx0H7nKZu69niRQDLM574Gc 0t8YQvX7VecP8H90Bln35MdhXnsg6UOS5bDlMWWAGewZQIH5XezXgxv3e/UGXcoJQ+Aa ofkp6VXAO5FmtBiQf2T8zCyT4EW7OVwchwTLFLeUAlziM3zogO+BTqUFj2+ypF/tHc2B /6KsRp26MDeZs4uf1a6dI18MzooYxIC32dVAaVk24q0QNbMJ8K4Xi8V0HuawhABm6Mp+ YYNlDryCb1AQ31+ZgcUqC5BoeCg7GC3oQJgxGjVy3HPI4mFaPXlKDNth5cuDYGIaexOE 4p8g== X-Received: by 10.194.238.193 with SMTP id vm1mr7652290wjc.124.1423536201668; Mon, 09 Feb 2015 18:43:21 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id bv16sm16832864wib.0.2015.02.09.18.43.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Feb 2015 18:43:20 -0800 (PST) Date: Tue, 10 Feb 2015 03:43:18 +0100 From: Mateusz Guzik To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210024317.GA21779@dft-labs.eu> References: <201502092313.t19NDpoS083043@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201502092313.t19NDpoS083043@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:43:23 -0000 On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: > +notify 10 { > + match "system" "kernel"; > + match "subsystem" "signal"; > + match "type" "coredump"; > + action "logger $comm $core"; > +}; > + > */ > [..] > + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > + goto out; > + snprintf(data, len, "comm=%s", fullpath); I cannot test it right now, but it looks like immediate privilege escalation. Path is not sanitized in any way and devd passes it to 'sh -c'. So a file named "a.out; /bin/id; meh" or so should result in execution of aforementioned /bin/id. Another note is that currently devctl is record oriented, but this may change at some point and free form userspace text could be used to forge new events. As such is trongly suggest we sanitize this somehow. Maybe a base64 or something. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:52:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CEE7229; Tue, 10 Feb 2015 02:52:06 +0000 (UTC) Received: from m2.gritton.org (gritton.org [63.246.134.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D288C166; Tue, 10 Feb 2015 02:52:05 +0000 (UTC) Received: from m2.gritton.org (gritton.org [63.246.134.121]) by m2.gritton.org (8.14.9/8.14.9) with ESMTP id t1A2pwEv027879; Mon, 9 Feb 2015 19:51:58 -0700 (MST) (envelope-from jamie@freebsd.org) Received: (from www@localhost) by m2.gritton.org (8.14.9/8.14.9/Submit) id t1A2pwr6027878; Mon, 9 Feb 2015 19:51:58 -0700 (MST) (envelope-from jamie@freebsd.org) X-Authentication-Warning: gritton.org: www set sender to jamie@freebsd.org using -f To: Garrett Cooper Subject: Re: svn commit: r278323 - in head: etc/rc.d usr.sbin/jail X-PHP-Originating-Script: 0:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 09 Feb 2015 19:51:58 -0700 From: James Gritton In-Reply-To: References: <201502061754.t16HssXU042750@svn.freebsd.org> <343803A3-CFA3-4766-8294-139A6D8C0235@gmail.com> Message-ID: X-Sender: jamie@freebsd.org User-Agent: Roundcube Webmail/1.0.3 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , jenkins-admin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:52:06 -0000 On 2015-02-06 22:23, Garrett Cooper wrote: > On Feb 6, 2015, at 18:38, James Gritton wrote: >> On 2015-02-06 19:23, Garrett Cooper wrote: >>> I think you broke the Jenkins tests runs, and potentially jail >>> support >>> in some edgecases: >>> https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/651/ >> >> Where do I go from here? There error you refer to certainly seems >> jail-related, which leads me to guess at something disconnected >> between the matching rc.d/jail and jail(8) change (i.e. using the new >> rc file with the old jail program). But that's really just a wild >> guess. Is there somewhere I look for more information? For example, >> where does Jenkins actually do its thing? >> >> Sorry for being so stupid in this - Jenkins has only been on the very >> edge of my awareness until now. > > I honestly don’t think it’s Jenkins because Jenkins runs in bhyve. I > think you accidentally broke option handling in the jail configuration > (please see my other reply about added “break;†statements). > > ... > > You can verify your changes by doing: > > % (cd /usr/tests/bin/pkill; sudo kyua test) After some testing and looking around, I've decided the problem definitely isn't in rc.d where I thought it might be. I've also decided it's probably not in my patch either. I've run this kyua test on a 10 system (don't have current handy for such things at the moment), and sometimes I would see a failure and sometimes I wouldn't. This was whether I was using the new or old jail code. Later in the day, when the box was less loaded, it seemed to always pass. Looking at the pkill-j_test script, I see jails being created with sleep commands both inside and outside the jail around its creation. I'm guessing this script is very sensitive to timing issues that could be cause by (among other things) system load. The jail commands in this script were also very simple, with the only parameters used being: path, name, ip4.addr, and command. This isn't some kind of esoteric exercising of the jail(8) options, and I would expect if it works at one time it would work at another. I've "hand-run" these particular jail commands and couldn't get them to fail (and the actual content of the jail(8) changes were tests already). I looked at the freebsd-current (I think) list where the Jenkins errors are posted, and it's true it started failing the pkill-j test at the time I made my change. But it's also true that it had failed that test once the day before my change, and then started passing it again. This particular test just seems to be fragile. So I don't have anywhere else to go with this. I'm going to assume jail(8) isn't the problem here. - Jamie From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:53:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 868FC381; Tue, 10 Feb 2015 02:53:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71F55174; Tue, 10 Feb 2015 02:53:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A2rRQ4004794; Tue, 10 Feb 2015 02:53:27 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A2rRn8004793; Tue, 10 Feb 2015 02:53:27 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100253.t1A2rRn8004793@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 02:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278488 - head/usr.sbin/bsdconfig/usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:53:27 -0000 Author: dteske Date: Tue Feb 10 02:53:26 2015 New Revision: 278488 URL: https://svnweb.freebsd.org/changeset/base/278488 Log: Whitespace. MFC after: 3 days Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user.subr Tue Feb 10 02:02:24 2015 (r278487) +++ head/usr.sbin/bsdconfig/usermgmt/share/user.subr Tue Feb 10 02:53:26 2015 (r278488) @@ -830,8 +830,7 @@ f_user_delete() f_eval_catch $funcname \ pw '%s -H 0' "$cmd" else - f_eval_catch $funcname \ - pw '%s -h -' "$cmd" + f_eval_catch $funcname pw '%s -h -' "$cmd" fi fi fi From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:55:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E22B4D4; Tue, 10 Feb 2015 02:55:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECF74183; Tue, 10 Feb 2015 02:55:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A2tBBO005098; Tue, 10 Feb 2015 02:55:11 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A2tBbE005094; Tue, 10 Feb 2015 02:55:11 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100255.t1A2tBbE005094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 02:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278489 - in head/usr.sbin/bsdconfig/timezone: . share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:55:12 -0000 Author: dteske Date: Tue Feb 10 02:55:10 2015 New Revision: 278489 URL: https://svnweb.freebsd.org/changeset/base/278489 Log: Eliminate sub-shells where possible for performance. MFC after: 7 days Modified: head/usr.sbin/bsdconfig/timezone/share/continents.subr head/usr.sbin/bsdconfig/timezone/share/countries.subr head/usr.sbin/bsdconfig/timezone/timezone Modified: head/usr.sbin/bsdconfig/timezone/share/continents.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/continents.subr Tue Feb 10 02:53:26 2015 (r278488) +++ head/usr.sbin/bsdconfig/timezone/share/continents.subr Tue Feb 10 02:55:10 2015 (r278489) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ export continent_utc_title ############################################################ FUNCTIONS -# f_continent $cont $property +# f_continent $cont $property [$var_to_set] # # Returns a single property of a given continent. Available properties are: # @@ -102,37 +102,60 @@ export continent_utc_title # (which appears after continent selection). # menu_list Menu-list of regions for this continent. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_continent() { - local cont="$1" property="$2" - eval echo \"\${continent_${cont}_$property}\" + f_getvar "continent_${1}_$2" $3 } -# f_find_continent $title +# f_find_continent $title [$var_to_set] # # Returns continent identifier given continent title. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_find_continent() { - local cont - for cont in $CONTINENTS; do - if [ "$1" = "$( f_continent $cont title )" ]; then - echo "$cont" + local __cont __title + for __cont in $CONTINENTS; do + f_continent $__cont title __title + if [ "$1" = "$__title" ]; then + if [ "$2" ]; then + setvar "$2" $__cont + else + echo "$__cont" + fi return $SUCCESS fi done return $FAILURE } -# f_OCEANP $cont +# f_OCEANP $cont [$var_to_set] # # Returns "1" if the first argument is an ocean, otherwise NULL. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_OCEANP() { case "$1" in arctic|atlantic|indian|pacific) - echo 1 + if [ "$2" ]; then + setvar "$2" 1 + else + echo 1 + fi + ;; + *) + [ "$2" ] && setvar "$2" "" esac } Modified: head/usr.sbin/bsdconfig/timezone/share/countries.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/countries.subr Tue Feb 10 02:53:26 2015 (r278488) +++ head/usr.sbin/bsdconfig/timezone/share/countries.subr Tue Feb 10 02:55:10 2015 (r278489) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; then _TIMEZONE_COUNTRIES_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +25,10 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ FUNCTIONS -# f_country $code $property +# f_country $code $property [$var_to_set] # # Returns a single property of a given country. Available properties are: # @@ -44,10 +46,13 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # descr_N Like name, but for the Nth zone when the country has # multiple zones (nzones > 0) # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_country() { - local code="$1" property="$2" - eval echo \"\${country_${code}_$property}\" + f_getvar "country_${1}_$2" $3 } # f_sort_countries @@ -59,22 +64,42 @@ f_country() # afterward is the sh(1) function which utilizes the below awk script. # f_sort_countries_awk=' +function _asorti(src, dest) { - split($0, array, /[[:space:]]+/) + k = nitems = 0 + for (i in src) dest[++nitems] = i + for (i = 1; i <= nitems; k = i++) { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) { + dest[k+1] = dest[k]; k-- + } + dest[k+1] = idx + } + return nitems +} +BEGIN { + split(ENVIRON["COUNTRIES"], array, /[[:space:]]+/) for (item in array) { tlc = array[item] - print ENVIRON["country_" tlc "_name"] " " tlc + name = ENVIRON["country_" tlc "_name"] + countries[name] = tlc } + n = _asorti(countries, sorted_countries) + for (i = 1; i <= n; i++) + print countries[sorted_countries[i]] + exit } ' f_sort_countries() { - COUNTRIES=$( echo "$COUNTRIES" | awk "$f_sort_countries_awk" | - sort | awk '{print $NF}' ) - export COUNTRIES + export COUNTRIES # for awk(1) ENVIRON[] visibility + COUNTRIES=$( awk "$f_sort_countries_awk" ) + export COUNTRIES # Pedantic } +############################################################ MAIN + f_dprintf "%s: Successfully loaded." timezone/countries.subr fi # ! $_TIMEZONE_COUNTRIES_SUBR Modified: head/usr.sbin/bsdconfig/timezone/timezone ============================================================================== --- head/usr.sbin/bsdconfig/timezone/timezone Tue Feb 10 02:53:26 2015 (r278488) +++ head/usr.sbin/bsdconfig/timezone/timezone Tue Feb 10 02:55:10 2015 (r278489) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2011-2013 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -280,8 +280,8 @@ f_make_menus # creates $continen # # Launch application main menu # -defaultctry="" -defaultzone="" +defaultctry= +defaultzone= NEED_CONTINENT=1 NEED_COUNTRY=1 while :; do @@ -299,10 +299,10 @@ while :; do continent=$( eval f_dialog_menutag2item \"\$mtag\" \ $continent_menu_list ) - cont=$( f_find_continent "$continent" ) - cont_title=$( f_continent $cont title ) - nitems=$( f_continent $cont nitems ) - isocean=$( f_OCEANP $cont ) + f_find_continent "$continent" cont + f_continent $cont title cont_title + f_continent $cont nitems nitems + f_OCEANP $cont isocean fi if [ "$NEED_COUNTRY" ]; then @@ -345,7 +345,7 @@ while :; do # # Calculate size of menu # - menu_list=$( f_continent $cont menu_list ) + f_continent $cont menu_list menu_list eval f_dialog_menu_size height width rows \ \"\$title\" \ \"\$btitle\" \ @@ -378,7 +378,7 @@ while :; do fi # Get the country code from the user's selection - tlc=$( f_continent $cont tlc_$tag ) + f_continent $cont tlc_$tag tlc NEED_COUNTRY= fi @@ -387,12 +387,12 @@ while :; do # If the selection has only one zone (nzones == -1), # just set it. # - nzones=$( f_country $tlc nzones ) + f_country $tlc nzones nzones if [ $nzones -lt 0 ]; then - real_cont=$( f_country $tlc cont ) - real_continent=$( f_continent $real_cont name ) - name=$( f_country $tlc name ) - filename=$( f_country $tlc filename ) + f_country $tlc cont real_cont + f_continent $real_cont name real_continent + f_country $tlc name name + f_country $tlc filename filename if ! f_confirm_zone "$real_continent/$filename"; then [ $nitems -eq 1 ] && NEED_CONTINENT=1 @@ -400,13 +400,13 @@ while :; do continue fi else - f_sprintf title "$msg_country_time_zones" \ - "$( f_country $tlc name )" + f_country $tlc name name + f_sprintf title "$msg_country_time_zones" "$name" f_dialog_title "$title" title="$DIALOG_TITLE" btitle="$DIALOG_BACKTITLE" f_dialog_title_restore prompt="$msg_select_zone" - menu_list=$( f_country $tlc menu_list ) + f_country $tlc menu_list menu_list eval f_dialog_menu_size height width rows \ \"\$title\" \"\$btitle\" \"\$prompt\" \"\" $menu_list @@ -435,10 +435,10 @@ while :; do continue fi - real_cont=$( f_country $tlc cont_$n ) - real_continent=$( f_continent $real_cont name ) - name=$( f_country $tlc name ) - filename=$( f_country $tlc filename_$n ) + f_country $tlc cont_$n real_cont + f_continent $real_cont name real_continent + f_country $tlc name name + f_country $tlc filename_$n filename f_confirm_zone "$real_continent/$filename" || continue fi From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 02:58:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF7BF624; Tue, 10 Feb 2015 02:58:09 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28E619C; Tue, 10 Feb 2015 02:58:09 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ001BWC801J20@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 02:57:41 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_01:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100027 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Rui Paulo In-reply-to: <20150210024317.GA21779@dft-labs.eu> Date: Mon, 09 Feb 2015 18:57:36 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502092313.t19NDpoS083043@svn.freebsd.org> <20150210024317.GA21779@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 02:58:09 -0000 On Feb 9, 2015, at 18:43, Mateusz Guzik wrote: >=20 > On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: >> +notify 10 { >> + match "system" "kernel"; >> + match "subsystem" "signal"; >> + match "type" "coredump"; >> + action "logger $comm $core"; >> +}; >> + >> */ >>=20 > [..] >> + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) !=3D= 0) >> + goto out; >> + snprintf(data, len, "comm=3D%s", fullpath); >=20 > I cannot test it right now, but it looks like immediate privilege > escalation. >=20 > Path is not sanitized in any way and devd passes it to 'sh -c'. >=20 > So a file named "a.out; /bin/id; meh" or so should result in execution > of aforementioned /bin/id. Well, you can't have a file name with "/" but you're right. > Another note is that currently devctl is record oriented, but this may > change at some point and free form userspace text could be used to = forge > new events. >=20 > As such is trongly suggest we sanitize this somehow. Maybe a base64 or > something. I was trying hard to avoid this issue in unpublished my crash helper, = but I forgot that devd runs execl("sh -c", ....); :-( It might just be easier to inspect the path names and allow only = [a-z][A-Z][0-9] and '/' before sending the devctl message. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:11:59 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2301EA40; Tue, 10 Feb 2015 03:11:59 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BECF566C; Tue, 10 Feb 2015 03:11:58 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t1A3BkE0016096; Mon, 9 Feb 2015 19:11:50 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201502100311.t1A3BkE0016096@gw.catspoiler.org> Date: Mon, 9 Feb 2015 19:11:46 -0800 (PST) From: Don Lewis Subject: Re: svn commit: r278479 - in head: etc sys/kern To: mjguzik@gmail.com In-Reply-To: <20150210024317.GA21779@dft-labs.eu> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rpaulo@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:11:59 -0000 On 10 Feb, Mateusz Guzik wrote: > On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: >> +notify 10 { >> + match "system" "kernel"; >> + match "subsystem" "signal"; >> + match "type" "coredump"; >> + action "logger $comm $core"; >> +}; >> + >> */ >> > [..] >> + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) >> + goto out; >> + snprintf(data, len, "comm=%s", fullpath); > > I cannot test it right now, but it looks like immediate privilege > escalation. > > Path is not sanitized in any way and devd passes it to 'sh -c'. > > So a file named "a.out; /bin/id; meh" or so should result in execution > of aforementioned /bin/id. Then there is the issue of a user-generated core file being fed into the crash analyzer, possibly exploiting bugs in the latter. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:12:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7A70B78; Tue, 10 Feb 2015 03:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF27673; Tue, 10 Feb 2015 03:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A3CCaY015162; Tue, 10 Feb 2015 03:12:12 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A3CCjV015161; Tue, 10 Feb 2015 03:12:12 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100312.t1A3CCjV015161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 03:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278490 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:12:12 -0000 Author: dteske Date: Tue Feb 10 03:12:11 2015 New Revision: 278490 URL: https://svnweb.freebsd.org/changeset/base/278490 Log: Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel() Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 02:55:10 2015 (r278489) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 03:12:11 2015 (r278490) @@ -1580,6 +1580,56 @@ f_xdialog_info() -1 # timeout of -1 means abort when EOF on stdin } +############################################################ PAUSE FUNCTIONS + +# f_dialog_pause $msg_text $duration [$hline] +# +# Display a message in a widget with a progress bar that runs backward for +# $duration seconds. +# +f_dialog_pause() +{ + local pause_text="$1" duration="$2" hline="$3" height width + f_isinteger "$duration" || return $FAILURE + f_dialog_buttonbox_size height width \ + "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$pause_text" "$hline" + if [ "$USE_XDIALOG" ]; then + $DIALOG \ + --title "$DIALOG_TITLE" \ + --backtitle "$DIALOG_BACKTITLE" \ + --ok-label "$msg_skip" \ + --cancel-label "$msg_cancel" \ + ${noCancel:+--no-cancel} \ + --timeout "$duration" \ + --yesno "$pause_text" \ + $height $width + else + [ $duration -gt 0 ] && duration=$(( $duration - 1 )) + [ $duration -gt 1 ] && duration=$(( $duration - 1 )) + height=$(( $height + 3 )) # Add height for progress bar + $DIALOG \ + --title "$DIALOG_TITLE" \ + --backtitle "$DIALOG_BACKTITLE" \ + --hline "$hline" \ + --ok-label "$msg_skip" \ + --cancel-label "$msg_cancel" \ + ${noCancel:+--no-cancel} \ + --pause "$pause_text" \ + $height $width "$duration" + fi +} + +# f_dialog_pause_no_cancel $msg_text $duration [$hline] +# +# Display a message in a widget with a progress bar that runs backward for +# $duration seconds. No cancel button is provided. Always returns success. +# +f_dialog_pause_no_cancel() +{ + noCancel=1 f_dialog_pause "$@" + return $SUCCESS +} + ############################################################ MSGBOX FUNCTIONS # f_dialog_msgbox $msg_text [$hline] From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:14:42 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38146CD2; Tue, 10 Feb 2015 03:14:42 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A8D9686; Tue, 10 Feb 2015 03:14:41 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ00CNBCZ9DU00@st11p02mm-asmtp001.mac.com>; Tue, 10 Feb 2015 03:14:02 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_02:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100030 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Rui Paulo In-reply-to: <201502100311.t1A3BkE0016096@gw.catspoiler.org> Date: Mon, 09 Feb 2015 19:13:57 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502100311.t1A3BkE0016096@gw.catspoiler.org> To: Don Lewis X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, mjguzik@gmail.com, rpaulo@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:14:42 -0000 On Feb 9, 2015, at 19:11, Don Lewis wrote: >=20 > On 10 Feb, Mateusz Guzik wrote: >> On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: >>> +notify 10 { >>> + match "system" "kernel"; >>> + match "subsystem" "signal"; >>> + match "type" "coredump"; >>> + action "logger $comm $core"; >>> +}; >>> + >>> */ >>>=20 >> [..] >>> + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) !=3D= 0) >>> + goto out; >>> + snprintf(data, len, "comm=3D%s", fullpath); >>=20 >> I cannot test it right now, but it looks like immediate privilege >> escalation. >>=20 >> Path is not sanitized in any way and devd passes it to 'sh -c'. >>=20 >> So a file named "a.out; /bin/id; meh" or so should result in = execution >> of aforementioned /bin/id. >=20 > Then there is the issue of a user-generated core file being fed into = the > crash analyzer, possibly exploiting bugs in the latter. That's why there's a warning in devd.conf: devd will run the helper as = root, so a proper written helper has to drop the privileges very early = or be invoked by devd with lower privileges. My helper just drops = privileges to match the UID/GID of the generated core file before doing = anything else. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:15:29 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14BBCE0F; Tue, 10 Feb 2015 03:15:29 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A900F68E; Tue, 10 Feb 2015 03:15:28 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t1A3FGpQ016118; Mon, 9 Feb 2015 19:15:20 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201502100315.t1A3FGpQ016118@gw.catspoiler.org> Date: Mon, 9 Feb 2015 19:15:16 -0800 (PST) From: Don Lewis Subject: Re: svn commit: r278479 - in head: etc sys/kern To: mjguzik@gmail.com In-Reply-To: <201502100311.t1A3BkE0016096@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rpaulo@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:15:29 -0000 On 9 Feb, Don Lewis wrote: > On 10 Feb, Mateusz Guzik wrote: >> On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: >>> +notify 10 { >>> + match "system" "kernel"; >>> + match "subsystem" "signal"; >>> + match "type" "coredump"; >>> + action "logger $comm $core"; >>> +}; >>> + >>> */ >>> >> [..] >>> + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) >>> + goto out; >>> + snprintf(data, len, "comm=%s", fullpath); >> >> I cannot test it right now, but it looks like immediate privilege >> escalation. >> >> Path is not sanitized in any way and devd passes it to 'sh -c'. >> >> So a file named "a.out; /bin/id; meh" or so should result in execution >> of aforementioned /bin/id. > > Then there is the issue of a user-generated core file being fed into the > crash analyzer, possibly exploiting bugs in the latter. Or worse, the contents of the executable, in particular the debug info, could also be an attack vector. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:15:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D22DBF4B; Tue, 10 Feb 2015 03:15:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD952694; Tue, 10 Feb 2015 03:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A3Fs0V015659; Tue, 10 Feb 2015 03:15:54 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A3FsNu015658; Tue, 10 Feb 2015 03:15:54 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100315.t1A3FsNu015658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 03:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278491 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:15:54 -0000 Author: dteske Date: Tue Feb 10 03:15:54 2015 New Revision: 278491 URL: https://svnweb.freebsd.org/changeset/base/278491 Log: Add bsdconfig api function f_dialog_menutag2help() Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 03:12:11 2015 (r278490) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 03:15:54 2015 (r278491) @@ -2116,6 +2116,39 @@ f_dialog_menutag2index_with_help() return $FAILURE } +# f_dialog_menutag2help $tag_chosen $tag1 $item1 $help1 $tag2 $item2 $help2 ... +# +# To use the `--menu' option of dialog(1) with the `--item-help' option, you +# must pass an ordered list of tag/item/help triplets on the command-line. When +# the user selects a menu option the tag for that item is printed to stderr. +# +# This function allows you to dereference the tag chosen by the user back into +# the help associated with said tag (item is discarded/ignored). +# +# Pass the tag chosen by the user as the first argument, followed by the +# ordered list of tag/item/help triplets (HINT: use the same tag/item/help list +# as was passed to dialog(1) for consistency). +# +# If the tag cannot be found, NULL is returned. +# +f_dialog_menutag2help() +{ + local tag="$1" tagn help + shift 1 # tag + + while [ $# -gt 0 ]; do + tagn="$1" + help="$3" + shift 3 # tagn/item/help + + if [ "$tag" = "$tagn" ]; then + echo "$help" + return $SUCCESS + fi + done + return $FAILURE +} + ############################################################ INIT FUNCTIONS # f_dialog_init From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:17:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD7CE162; Tue, 10 Feb 2015 03:17:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B97216B3; Tue, 10 Feb 2015 03:17:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A3Hqnr015941; Tue, 10 Feb 2015 03:17:52 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A3Hqlv015940; Tue, 10 Feb 2015 03:17:52 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100317.t1A3Hqlv015940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 03:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278492 - head/usr.sbin/bsdconfig/console X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:17:52 -0000 Author: dteske Date: Tue Feb 10 03:17:51 2015 New Revision: 278492 URL: https://svnweb.freebsd.org/changeset/base/278492 Log: Add "vt_"* aliases to bsdconfig console entries. NB: "syscons_"* kept for backward compatibility Modified: head/usr.sbin/bsdconfig/console/INDEX Modified: head/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/console/INDEX Tue Feb 10 03:15:54 2015 (r278491) +++ head/usr.sbin/bsdconfig/console/INDEX Tue Feb 10 03:17:51 2015 (r278492) @@ -46,6 +46,13 @@ menu_help="Customize system console beha # can be i18n'ed but `command' is the name of a script. # menu_selection="console|console" +menu_selection="vt_font|font" +menu_selection="vt_keymap|keymap" +menu_selection="vt_repeat|repeat" +menu_selection="vt_saver|saver" +menu_selection="vt_screenmap|screenmap" +menu_selection="vt_ttys|ttys" +# For backward compatibility menu_selection="syscons_font|font" menu_selection="syscons_keymap|keymap" menu_selection="syscons_repeat|repeat" From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:34:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72E86429; Tue, 10 Feb 2015 03:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D5C888C; Tue, 10 Feb 2015 03:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A3Yi77024889; Tue, 10 Feb 2015 03:34:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A3YgvC024878; Tue, 10 Feb 2015 03:34:42 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201502100334.t1A3YgvC024878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 10 Feb 2015 03:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278493 - in head/usr.sbin/bsdconfig: console includes networking/share share usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:34:44 -0000 Author: dteske Date: Tue Feb 10 03:34:42 2015 New Revision: 278493 URL: https://svnweb.freebsd.org/changeset/base/278493 Log: Update copyrights. Modified: head/usr.sbin/bsdconfig/console/INDEX head/usr.sbin/bsdconfig/includes/INDEX head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/share/dialog.subr head/usr.sbin/bsdconfig/share/keymap.subr head/usr.sbin/bsdconfig/usermgmt/share/user.subr Modified: head/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/console/INDEX Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/console/INDEX Tue Feb 10 03:34:42 2015 (r278493) @@ -1,5 +1,5 @@ # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012 Devin Teske +# Copyright (c) 2012-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/includes/INDEX Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/includes/INDEX Tue Feb 10 03:34:42 2015 (r278493) @@ -1,4 +1,4 @@ -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Tue Feb 10 03:34:42 2015 (r278493) @@ -1,6 +1,6 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1 # -# Copyright (c) 2006-2013 Devin Teske +# Copyright (c) 2006-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Feb 10 03:34:42 2015 (r278493) @@ -1,6 +1,6 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_SUBR=1 # -# Copyright (c) 2006-2014 Devin Teske +# Copyright (c) 2006-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/keymap.subr Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/share/keymap.subr Tue Feb 10 03:34:42 2015 (r278493) @@ -1,6 +1,6 @@ if [ ! "$_KEYMAP_SUBR" ]; then _KEYMAP_SUBR=1 # -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user.subr Tue Feb 10 03:17:51 2015 (r278492) +++ head/usr.sbin/bsdconfig/usermgmt/share/user.subr Tue Feb 10 03:34:42 2015 (r278493) @@ -1,7 +1,7 @@ if [ ! "$_USERMGMT_USER_SUBR" ]; then _USERMGMT_USER_SUBR=1 # # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2014 Devin Teske +# Copyright (c) 2012-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:40:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A544597; Tue, 10 Feb 2015 03:40:10 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCB278AE; Tue, 10 Feb 2015 03:40:09 +0000 (UTC) Received: by iecrd18 with SMTP id rd18so9723156iec.5; Mon, 09 Feb 2015 19:40:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YXecM0fld6c8tIi0KMhi9r8kuSiRSjBlGs62Es9HX6g=; b=P3Jt8Iqj2nEqT2npDmwb/07Dmnd/8V9G1RomLU1Q96C1Em2N3O43E0KMmkZ9S6heCn zHm2Su6AT9IT5mtxhWfkljxsGyobwoZpz+StHP5YlN+UNiQeWos+U/y43wzOD+2DiJM4 34eJauKUNxoobROrY3tCdF71g8me0PWgYyV6m4OMjFuk7nPUEt6fDFVSGz4mENoAyqvM 1AK/S+pvWig3xyqrETtbRqn3s+vUY86NUmz9Meh9qfoaIbdTZJtYmkmDyaszDY8QIwpN MUtUCu3eRXRtLnVogWBCNgQ6JYoDGta0g7GZTn0B6OnLmbjoeM5KWp/qE6MUuRKYogQS 56ag== MIME-Version: 1.0 X-Received: by 10.43.131.5 with SMTP id ho5mr27966200icc.82.1423539602722; Mon, 09 Feb 2015 19:40:02 -0800 (PST) Received: by 10.50.182.233 with HTTP; Mon, 9 Feb 2015 19:40:02 -0800 (PST) In-Reply-To: <201502100135.t1A1ZRhf067753@svn.freebsd.org> References: <201502100135.t1A1ZRhf067753@svn.freebsd.org> Date: Mon, 9 Feb 2015 19:40:02 -0800 Message-ID: Subject: Re: svn commit: r278486 - head From: NGie Cooper To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:40:10 -0000 On Mon, Feb 9, 2015 at 5:35 PM, Glen Barber wrote: > Author: gjb > Date: Tue Feb 10 01:35:26 2015 > New Revision: 278486 > URL: https://svnweb.freebsd.org/changeset/base/278486 > > Log: > Exclude 'tests' from DEBUG_DISTRIBUTIONS. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/Makefile.inc1 Hi, Were the tests distribution debug files really blowing up the install size? Thanks! From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 03:49:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 902748C2; Tue, 10 Feb 2015 03:49:26 +0000 (UTC) Date: Tue, 10 Feb 2015 03:49:22 +0000 From: Glen Barber To: NGie Cooper Subject: Re: svn commit: r278486 - head Message-ID: <20150210034922.GB14325@hub.FreeBSD.org> References: <201502100135.t1A1ZRhf067753@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 03:49:27 -0000 --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 09, 2015 at 07:40:02PM -0800, NGie Cooper wrote: > On Mon, Feb 9, 2015 at 5:35 PM, Glen Barber wrote: > > Log: > > Exclude 'tests' from DEBUG_DISTRIBUTIONS. > > >=20 > Were the tests distribution debug files really blowing up the install siz= e? No, considering there are no tests debugging contents that I saw. Glen --mxv5cy4qt+RJ9ypb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU2X+8AAoJEAMUWKVHj+KTmMAP/0I5wDjN6FiftvqnhCdWB7gh sFrdnGlq4mrvih4ml+bI/Nu+mZOljONzggJZBV6ehe+/pikknerPIxCtyUSB/Gyh GgGJ4d0RNI5ukOoK6F1qSf1o1KPKC0I8C8vXckIHQx6HpNbbSkYAxqNw5ZAZHhMU ymNpQydt1aUfgnGpApWjBkP3m7UuRkmNfDc3yginuJCihGzHKkG8f9IfRVMNG88S FASJRrsoWOEJ1Qs80Ymx00No+q+lU6GDVCYRQ/BTzELCoCHAqCOm7/lZJSvhJEf8 smmy7xO0WeyPB/9hkKQ3OcMEG8G+orjO/maBZ/m4iP0Wo4t0JWTmDQ16+TBxWJQh 1S383tcAuGbO5gmdSH6BhathOfXj7DJEALULTpQXN0PDS0HTyLLmQkTFFv0437Ew CQmxkDKhWKiUWio1c6MP7542ZVUnranFyQ2XRrL3rfbO3GhwDe4i77lwu6KEpoJr DmTTqkvfkdY5m4+dwx09ppVwI0ZPlInU0cEBxqQcB16xFGiwItN72m+S4ONT4Kzr 3gzCVpORhsVxAPuq9081pA9EkUNKDWXx/TZ4wFE4Fvc2cwaIM50LKktqnOi8Gpn8 n8CXDs9uXacyef9TV1X3lwC6iaqwdg7HAW7H93kTpy17NfAAMcLNTu+tlxnP7p7R /iOqDf3HLYrvZPT1mcit =mRnC -----END PGP SIGNATURE----- --mxv5cy4qt+RJ9ypb-- From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 04:34:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A079DEE6; Tue, 10 Feb 2015 04:34:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BD4ADA3; Tue, 10 Feb 2015 04:34:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A4YeRZ052514; Tue, 10 Feb 2015 04:34:40 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A4YeLr052513; Tue, 10 Feb 2015 04:34:40 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502100434.t1A4YeLr052513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 10 Feb 2015 04:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278494 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 04:34:40 -0000 Author: rpaulo Date: Tue Feb 10 04:34:39 2015 New Revision: 278494 URL: https://svnweb.freebsd.org/changeset/base/278494 Log: Sanitise the coredump file names sent to devd. While there, add a sysctl to turn this feature off as requested by kib@. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Feb 10 03:34:42 2015 (r278493) +++ head/sys/kern/kern_sig.c Tue Feb 10 04:34:39 2015 (r278494) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "opt_core.h" #include +#include #include #include #include @@ -179,6 +180,10 @@ static int set_core_nodump_flag = 0; SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, 0, "Enable setting the NODUMP flag on coredump files"); +static int coredump_devctl = 1; +SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, + 0, "Generate a devctl notification when processes coredump"); + /* * Signal properties and actions. * The array below categorizes the signals and their default actions @@ -3217,6 +3222,25 @@ out: return (0); } +static int +coredump_sanitise_path(const char *path) +{ + size_t len, i; + + /* + * Only send a subset of ASCII to devd(8) because it + * might pass these strings to sh -c. + */ + len = strlen(path); + for (i = 0; i < len; i++) + if (!(isalpha(path[i]) || isdigit(path[i])) && + path[i] != '/' && path[i] != '.' && + path[i] != '-') + return (0); + + return (1); +} + /* * Dump a process' core. The main routine does some * policy checking, and creates the name of the coredump; @@ -3238,9 +3262,9 @@ coredump(struct thread *td) void *rl_cookie; off_t limit; int compress; - char *data = NULL; - size_t len; + char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */ char *fullpath, *freepath = NULL; + size_t len; #ifdef COMPRESS_USER_CORES compress = compress_user_cores; @@ -3332,30 +3356,29 @@ close: * Notify the userland helper that a process triggered a core dump. * This allows the helper to run an automated debugging session. */ - len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; - data = malloc(len, M_TEMP, M_NOWAIT); - if (data == NULL) + if (coredump_devctl == 0) goto out; if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) goto out; - snprintf(data, len, "comm=%s", fullpath); - if (freepath != NULL) { - free(freepath, M_TEMP); - freepath = NULL; + if (!coredump_sanitise_path(fullpath)) + goto out; + snprintf(data, sizeof(data), "comm=%s ", fullpath); + free(freepath, M_TEMP); + freepath = NULL; + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) { + printf("could not find coredump\n"); + goto out; } - if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) + if (!coredump_sanitise_path(fullpath)) goto out; - snprintf(data, len, "%s core=%s", data, fullpath); + strlcat(data, "core=", sizeof(data)); + len = strlcat(data, fullpath, sizeof(data)); devctl_notify("kernel", "signal", "coredump", data); - free(name, M_TEMP); out: #ifdef AUDIT audit_proc_coredump(td, name, error); #endif - if (freepath != NULL) - free(freepath, M_TEMP); - if (data != NULL) - free(data, M_TEMP); + free(freepath, M_TEMP); free(name, M_TEMP); return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 04:46:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5251C131; Tue, 10 Feb 2015 04:46:53 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25B4DE80; Tue, 10 Feb 2015 04:46:52 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ0082NH8R3I30@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 04:46:06 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_02:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100048 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278494 - head/sys/kern From: Rui Paulo In-reply-to: <201502100434.t1A4YeLr052513@svn.freebsd.org> Date: Mon, 09 Feb 2015 20:46:03 -0800 Content-transfer-encoding: quoted-printable Message-id: <7FCF7F90-C1B2-4C1C-8781-F89F8519D47E@me.com> References: <201502100434.t1A4YeLr052513@svn.freebsd.org> To: Rui Paulo X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 04:46:53 -0000 On Feb 9, 2015, at 20:34, Rui Paulo wrote: >=20 > Author: rpaulo > Date: Tue Feb 10 04:34:39 2015 > New Revision: 278494 > URL: https://svnweb.freebsd.org/changeset/base/278494 >=20 > Log: > Sanitise the coredump file names sent to devd. >=20 > While there, add a sysctl to turn this feature off as requested by > kib@. I wanted to get the sanitiser code in ASAP, but, as suggested by stas@ = offline, we think devd should also provide an action mode that runs a = command outside sh(1) and without using $PATH.=20 -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 05:13:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CC9C9AB; Tue, 10 Feb 2015 05:13:20 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DFE2117; Tue, 10 Feb 2015 05:13:19 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NJJ00J6SIH6PY20@st11p02mm-asmtp001.mac.com>; Tue, 10 Feb 2015 05:12:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_03:2015-02-09,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100052 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278494 - head/sys/kern From: Rui Paulo In-reply-to: <1423544566.80968.9.camel@freebsd.org> Date: Mon, 09 Feb 2015 21:12:42 -0800 Content-transfer-encoding: quoted-printable Message-id: References: <201502100434.t1A4YeLr052513@svn.freebsd.org> <7FCF7F90-C1B2-4C1C-8781-F89F8519D47E@me.com> <1423544566.80968.9.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 05:13:20 -0000 On Feb 9, 2015, at 21:02, Ian Lepore wrote: > Or... we could consider restoring devd to its original relatively = benign > existance handling device-related events, and move handling of crash > dumps into a separate daemon which can shoulder the burden of security > for itself. >=20 > At $work we listen to the devd re-distribute port to handle device > events in our apps, and having an ever-growing flood of stuff that's = got > nothing to do with devices is going to have a negative impact on > applications that do such things. That's perfectly reasonable given that devd handles everything: it gets = notified when a new pty is created, when rctls reach their limit, when = zfs does "something", when devices show up/disappear, when you unplug = the power adapter, when GEOM devices show up/disappear, when your CPU is = too hot, when you press the brightness keys, etc. Some of these use = cases are fine, others aren't. This is pretty much what happened to = udev, if I'm not mistaken. We need a way to avoid reinventing the wheel. I really don't want to = duplicate another /dev/devctl in the kernel. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 06:02:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BB00BC; Tue, 10 Feb 2015 06:02:38 +0000 (UTC) Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [54.149.88.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79D32757; Tue, 10 Feb 2015 06:02:38 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YL2yG-0001aI-7D; Tue, 10 Feb 2015 05:02:48 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1A52kqx078246; Mon, 9 Feb 2015 22:02:46 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+MvtkUsfkbB4QM92a5uxkZ Message-ID: <1423544566.80968.9.camel@freebsd.org> Subject: Re: svn commit: r278494 - head/sys/kern From: Ian Lepore To: Rui Paulo Date: Mon, 09 Feb 2015 22:02:46 -0700 In-Reply-To: <7FCF7F90-C1B2-4C1C-8781-F89F8519D47E@me.com> References: <201502100434.t1A4YeLr052513@svn.freebsd.org> <7FCF7F90-C1B2-4C1C-8781-F89F8519D47E@me.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 06:02:38 -0000 On Mon, 2015-02-09 at 20:46 -0800, Rui Paulo wrote: > On Feb 9, 2015, at 20:34, Rui Paulo wrote: > > > > Author: rpaulo > > Date: Tue Feb 10 04:34:39 2015 > > New Revision: 278494 > > URL: https://svnweb.freebsd.org/changeset/base/278494 > > > > Log: > > Sanitise the coredump file names sent to devd. > > > > While there, add a sysctl to turn this feature off as requested by > > kib@. > > I wanted to get the sanitiser code in ASAP, but, as suggested by stas@ offline, we think devd should also provide an action mode that runs a command outside sh(1) and without using $PATH. > > -- > Rui Paulo > > > > > Or... we could consider restoring devd to its original relatively benign existance handling device-related events, and move handling of crash dumps into a separate daemon which can shoulder the burden of security for itself. At $work we listen to the devd re-distribute port to handle device events in our apps, and having an ever-growing flood of stuff that's got nothing to do with devices is going to have a negative impact on applications that do such things. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 06:13:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFBA9487; Tue, 10 Feb 2015 06:13:33 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8509886C; Tue, 10 Feb 2015 06:13:33 +0000 (UTC) Received: from rrss-MacBook-Air.local (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t1A639K8009747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 10 Feb 2015 01:03:10 -0500 (EST) (envelope-from rrs@freebsd.org) Message-ID: <54D9A15D.3030107@freebsd.org> Date: Tue, 10 Feb 2015 01:12:45 -0500 From: randall User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Peter Holm Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 References: <201502091928.t19JSC5P066293@svn.freebsd.org> <20150209204111.GA47080@x2.osted.lan> In-Reply-To: <20150209204111.GA47080@x2.osted.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 06:13:33 -0000 Peter: I am not sure what you mean.. :-) The in6_lltable_lookup() is right at the line where the code has done: LLE_WLOCK(lle); lle->la_flags |= LLE_DELETED;<----- Now without seeing the registers and having a bit more details I can't say. My guess is lle is NULL or 0xdeadcode.. If so this may be a different reference counting bug. R On 2/9/15 3:41 PM, Peter Holm wrote: > > Could this be yours? > > db:0:pho> bt > Tracing pid 9629 tid 100639 td 0xfffff8011cce14a0 > in6_lltable_lookup() at in6_lltable_lookup+0x11a/frame > 0xfffffe081e426200 > nd6_output() at nd6_output+0x15d/frame 0xfffffe081e426290 > ip6_output() at ip6_output+0x2128/frame 0xfffffe081e426790 > tcp_output() at tcp_output+0x2dae/frame 0xfffffe081e426c30 > tcp_usr_send() at tcp_usr_send+0x2fe/frame 0xfffffe081e426cb0 > sosend_generic() at sosend_generic+0x414/frame 0xfffffe081e426d60 > clnt_vc_call() at clnt_vc_call+0x477/frame 0xfffffe081e426ec0 > clnt_reconnect_call() at clnt_reconnect_call+0x46c/frame > 0xfffffe081e426f70 > newnfs_request() at newnfs_request+0x9ba/frame 0xfffffe081e4270d0 > nfscl_request() at nfscl_request+0x72/frame 0xfffffe081e427120 > nfsrpc_lookup() at nfsrpc_lookup+0x213/frame 0xfffffe081e4272a0 > nfs_lookup() at nfs_lookup+0x467/frame 0xfffffe081e4275c0 > VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0x10f/frame 0xfffffe081e4275f0 > lookup() at lookup+0x5d5/frame 0xfffffe081e427680 > namei() at namei+0x536/frame 0xfffffe081e427740 > kern_statat() at kern_statat+0xae/frame 0xfffffe081e427900 > sys_fstatat() at sys_fstatat+0x2c/frame 0xfffffe081e4279a0 > amd64_syscall() at amd64_syscall+0x29c/frame 0xfffffe081e427ab0 > > http://people.freebsd.org/~pho/stress/log/rrs003.txt > > - Peter > > From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 06:35:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38E5F999; Tue, 10 Feb 2015 06:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A751A18; Tue, 10 Feb 2015 06:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A6ZIUw007443; Tue, 10 Feb 2015 06:35:18 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A6ZHuN007429; Tue, 10 Feb 2015 06:35:17 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502100635.t1A6ZHuN007429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 10 Feb 2015 06:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278495 - in head/sys: conf powerpc/aim powerpc/conf powerpc/ofw powerpc/wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 06:35:19 -0000 Author: rpaulo Date: Tue Feb 10 06:35:16 2015 New Revision: 278495 URL: https://svnweb.freebsd.org/changeset/base/278495 Log: Remove FreeBSD/wii. This port failed to gain traction and probably only a couple Wii consoles ran FreeBSD all the way to single user mode with an md(4). IPC support was never implemented, so it was impossible to use any peripheral Any further development, if any, will happen at https://github.com/rpaulo/wii. Discussed with: nathanw (a long time ago), jhibbits Deleted: head/sys/powerpc/conf/WII head/sys/powerpc/wii/ Modified: head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/conf/NOTES head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/conf/files.powerpc Tue Feb 10 06:35:16 2015 (r278495) @@ -242,9 +242,3 @@ powerpc/psim/iobus.c optional psim powerpc/psim/ata_iobus.c optional ata psim powerpc/psim/openpic_iobus.c optional psim powerpc/psim/uart_iobus.c optional uart psim -powerpc/wii/platform_wii.c optional wii -powerpc/wii/wii_bus.c optional wii -powerpc/wii/wii_pic.c optional wii -powerpc/wii/wii_fb.c optional wii -powerpc/wii/wii_gpio.c optional wii wiigpio -powerpc/wii/wii_ipc.c optional wii Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/conf/options.powerpc Tue Feb 10 06:35:16 2015 (r278495) @@ -24,7 +24,6 @@ PS3 opt_platform.h MAMBO PSERIES PSIM -WII opt_platform.h SC_OFWFB opt_ofwfb.h Modified: head/sys/powerpc/aim/locore32.S ============================================================================== --- head/sys/powerpc/aim/locore32.S Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/powerpc/aim/locore32.S Tue Feb 10 06:35:16 2015 (r278495) @@ -118,9 +118,7 @@ __start: bdnz 1b sync isync -#ifdef WII -#include -#endif + /* Zero bss, in case we were started by something unhelpful */ li 0,0 lis 8,_edata@ha Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/powerpc/aim/machdep.c Tue Feb 10 06:35:16 2015 (r278495) @@ -260,9 +260,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ void *kmdp; char *env; register_t msr, scratch; -#ifdef WII - register_t vers; -#endif uint8_t *cache_check; int cacheline_warn; #ifndef __powerpc64__ @@ -281,16 +278,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ startkernel = __startkernel; endkernel = __endkernel; -#ifdef WII - /* - * The Wii loader doesn't pass us any environment so, mdp - * points to garbage at this point. The Wii CPU is a 750CL. - */ - vers = mfpvr(); - if ((vers & 0xfffff0e0) == (MPC750 << 16 | MPC750CL)) - mdp = NULL; -#endif - /* Check for ePAPR loader, which puts a magic value into r6 */ if (mdp == (void *)0x65504150) mdp = NULL; @@ -513,13 +500,13 @@ powerpc_init(vm_offset_t fdt, vm_offset_ */ trap_offset += (size_t)&restorebridgesize; - bcopy(&restorebridge, (void *)EXC_RST, trap_offset); - bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); - bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); - bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); - bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); - bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); - bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); + bcopy(&restorebridge, (void *)EXC_RST, trap_offset); + bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); + bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); + bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); + bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); + bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); + bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); } #endif @@ -560,7 +547,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ * Restore MSR */ mtmsr(msr); - + /* Warn if cachline size was not determined */ if (cacheline_warn == 1) { printf("WARNING: cacheline size undetermined, setting to 32\n"); @@ -569,7 +556,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ /* * Choose a platform module so we can get the physical memory map. */ - + platform_probe_and_attach(); /* @@ -698,7 +685,7 @@ int ptrace_single_step(struct thread *td) { struct trapframe *tf; - + tf = td->td_frame; tf->srr1 |= PSL_SE; @@ -789,7 +776,7 @@ db_trap_glue(struct trapframe *frame) int type = frame->exc; /* Ignore DTrace traps. */ - if (*(uint32_t *)frame->srr0 == EXC_DTRACE) + if (*(uint32_t *)frame->srr0 == EXC_DTRACE) return (0); if (type == EXC_PGM && (frame->srr1 & 0x20000)) { type = T_BREAKPOINT; Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/powerpc/aim/mmu_oea.c Tue Feb 10 06:35:16 2015 (r278495) @@ -420,7 +420,7 @@ static void tlbia(void) { vm_offset_t va; - + for (va = 0; va < 0x00040000; va += 0x00001000) { __asm __volatile("tlbie %0" :: "r"(va)); powerpc_sync(); @@ -623,17 +623,8 @@ moea_cpu_bootstrap(mmu_t mmup, int ap) isync(); } -#ifdef WII - /* - * Special case for the Wii: don't install the PCI BAT. - */ - if (strcmp(installed_platform(), "wii") != 0) { -#endif - __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); - __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); -#ifdef WII - } -#endif + __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); + __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); isync(); __asm __volatile("mtibatu 1,%0" :: "r"(0)); @@ -706,15 +697,9 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k :: "r"(battable[0].batu), "r"(battable[0].batl)); mtmsr(msr); -#ifdef WII - if (strcmp(installed_platform(), "wii") != 0) { -#endif - /* map pci space */ - __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); - __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); -#ifdef WII - } -#endif + /* map pci space */ + __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); + __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); isync(); /* set global direct map flag */ @@ -885,7 +870,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k */ chosen = OF_finddevice("/chosen"); if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1 && - (mmu = OF_instance_to_package(mmui)) != -1 && + (mmu = OF_instance_to_package(mmui)) != -1 && (sz = OF_getproplen(mmu, "translations")) != -1) { translations = NULL; for (i = 0; phys_avail[i] != 0; i += 2) { @@ -917,7 +902,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k /* Enter the pages */ for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) - moea_kenter(mmup, translations[i].om_va + off, + moea_kenter(mmup, translations[i].om_va + off, translations[i].om_pa + off); } } @@ -1488,7 +1473,7 @@ void moea_kenter_attr(mmu_t mmu, vm_offset_t va, vm_offset_t pa, vm_memattr_t ma) { u_int pte_lo; - int error; + int error; #if 0 if (va < VM_MIN_KERNEL_ADDRESS) @@ -1637,7 +1622,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap) == NULL) { pmap->pmap_phys = pmap; } - + mtx_lock(&moea_vsid_mutex); /* @@ -1782,7 +1767,7 @@ void moea_release(mmu_t mmu, pmap_t pmap) { int idx, mask; - + /* * Free segment register's VSID */ @@ -1957,7 +1942,7 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon } else { if (moea_bpvo_pool_index >= BPVO_POOL_SIZE) { panic("moea_enter: bpvo pool exhausted, %d, %d, %d", - moea_bpvo_pool_index, BPVO_POOL_SIZE, + moea_bpvo_pool_index, BPVO_POOL_SIZE, BPVO_POOL_SIZE * sizeof(struct pvo_entry)); } pvo = &moea_bpvo_pool[moea_bpvo_pool_index]; @@ -2307,7 +2292,7 @@ moea_pte_spillable_ident(u_int ptegidx) if (!(pt->pte_lo & PTE_REF)) return (pvo_walk); } - + return (pvo); } @@ -2504,7 +2489,7 @@ moea_bat_mapped(int idx, vm_offset_t pa, */ prot = battable[idx].batl & (BAT_I|BAT_G|BAT_PP_RW); if (prot != (BAT_I|BAT_G|BAT_PP_RW)) - return (EPERM); + return (EPERM); /* * The address should be within the BAT range. Assume that the @@ -2527,7 +2512,7 @@ moea_dev_direct_mapped(mmu_t mmu, vm_pad int i; /* - * This currently does not work for entries that + * This currently does not work for entries that * overlap 256M BAT segments. */ @@ -2560,7 +2545,7 @@ moea_mapdev_attr(mmu_t mmu, vm_offset_t ppa = trunc_page(pa); offset = pa & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - + /* * If the physical address lies within a valid BAT table entry, * return the 1:1 mapping. This currently doesn't work Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/powerpc/conf/NOTES Tue Feb 10 06:35:16 2015 (r278495) @@ -24,7 +24,6 @@ options POWERMAC #NewWorld Apple Power #options PS3 #Sony Playstation 3 options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator -#options WII #Nintendo Wii options SC_OFWFB # OFW frame buffer Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Tue Feb 10 04:34:39 2015 (r278494) +++ head/sys/powerpc/ofw/ofw_syscons.c Tue Feb 10 06:35:16 2015 (r278495) @@ -412,7 +412,7 @@ ofwfb_init(int unit, video_adapter_t *ad adp->va_window = (vm_offset_t) ofwfb_static_window; /* - * Enable future font-loading and flag color support, as well as + * Enable future font-loading and flag color support, as well as * adding V_ADP_MODECHANGE so that we ofwfb_set_mode() gets called * when the X server shuts down. This enables us to get the console * back when X disappears. @@ -874,7 +874,7 @@ ofwfb_putc32(video_adapter_t *adp, vm_of addr = (uint32_t *)sc->sc_addr + (row + sc->sc_ymargin)*(sc->sc_stride/4) + col + sc->sc_xmargin; - + fg = ofwfb_pix32(sc, ofwfb_foreground(a)); bg = ofwfb_pix32(sc, ofwfb_background(a)); @@ -1000,12 +1000,6 @@ ofwfb_scidentify(driver_t *driver, devic device_t child; /* - * The Nintendo Wii doesn't have open firmware, so don't probe ofwfb - * because otherwise we will crash. - */ - if (strcmp(installed_platform(), "wii") == 0) - return; - /* * Add with a priority guaranteed to make it last on * the device list */ @@ -1019,7 +1013,7 @@ ofwfb_scprobe(device_t dev) device_set_desc(dev, "System console"); - error = sc_probe_unit(device_get_unit(dev), + error = sc_probe_unit(device_get_unit(dev), device_get_flags(dev) | SC_AUTODETECT_KBD); if (error != 0) return (error); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 07:35:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CF0B187; Tue, 10 Feb 2015 07:35:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26F4CFE7; Tue, 10 Feb 2015 07:35:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A7ZH7Y035105; Tue, 10 Feb 2015 07:35:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7ZHhj035104; Tue, 10 Feb 2015 07:35:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100735.t1A7ZHhj035104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278496 - stable/10/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:35:17 -0000 Author: dim Date: Tue Feb 10 07:35:16 2015 New Revision: 278496 URL: https://svnweb.freebsd.org/changeset/base/278496 Log: MFC r278348: Fix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by making the ia_array field of struct ar9300_ini_array const, and removing the const-dropping casts. No functional change. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D1725 Modified: stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Feb 10 06:35:16 2015 (r278495) +++ stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Feb 10 07:35:16 2015 (r278496) @@ -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) From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 07:45:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54BE5349; Tue, 10 Feb 2015 07:45:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB45122; Tue, 10 Feb 2015 07:45:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A7jmLX039845; Tue, 10 Feb 2015 07:45:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7jiso039826; Tue, 10 Feb 2015 07:45:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100745.t1A7jiso039826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278497 - in vendor/compiler-rt/dist: . cmake cmake/Modules include include/sanitizer lib/asan lib/asan/scripts lib/asan/tests lib/builtins lib/dfsan lib/lsan lib/msan lib/msan/tests li... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:45:48 -0000 Author: dim Date: Tue Feb 10 07:45:43 2015 New Revision: 278497 URL: https://svnweb.freebsd.org/changeset/base/278497 Log: Import compiler-rt trunk r228651. https://llvm.org/svn/llvm-project/compiler-rt/trunk@228651 Added: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_allocator.cc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_flags.cc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/dfsan/dfsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_poisoning.cc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_poisoning.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/address-range-limit.mm vendor/compiler-rt/dist/test/asan/TestCases/Darwin/crashlog-stacktraces.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/linked-only.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/mixing-global-constructors.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-activation.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-reset.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/nohugepage_test.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/quarantine_size_mb.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-overflow-sigbus.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/iostream_sbo.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/shadow_mapping_failure.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/thread_suspended.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/asan_options-help.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/origin-store-long.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/realloc-large-origin.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/realloc-origin.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sanitizer_set_death_callback_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sched_getparam.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-help.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-include.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-invalid.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/annotate_happens_before.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/java_volatile.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/real_deadlock_detector_stress_test.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/restore_stack.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/signal_reset.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/signal_thread.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/stack_sync_reuse.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/test.h (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/coverage-levels.cc (contents, props changed) Deleted: vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/dist/make/platform/darwin_fat.mk vendor/compiler-rt/dist/test/tsan/process_sleep.h Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/include/CMakeLists.txt vendor/compiler-rt/dist/include/sanitizer/asan_interface.h vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h vendor/compiler-rt/dist/include/sanitizer/msan_interface.h vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_activation.cc vendor/compiler-rt/dist/lib/asan/asan_activation.h vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_debugging.cc vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/dist/lib/asan/asan_init_version.h vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_poisoning.h vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/atomic.c vendor/compiler-rt/dist/lib/builtins/clear_cache.c vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c vendor/compiler-rt/dist/lib/builtins/int_types.h vendor/compiler-rt/dist/lib/dfsan/CMakeLists.txt vendor/compiler-rt/dist/lib/dfsan/dfsan.cc vendor/compiler-rt/dist/lib/dfsan/dfsan.h vendor/compiler-rt/dist/lib/dfsan/dfsan_custom.cc vendor/compiler-rt/dist/lib/lsan/lsan.cc vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.h vendor/compiler-rt/dist/lib/msan/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/msan.cc vendor/compiler-rt/dist/lib/msan/msan.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_flags.h vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_linux.cc vendor/compiler-rt/dist/lib/msan/msan_report.cc vendor/compiler-rt/dist/lib/msan/msan_thread.cc vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_deadlock_detector.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_deadlock_detector_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/dist/lib/tsan/check_analyze.sh vendor/compiler-rt/dist/lib/tsan/dd/dd_rtl.cc vendor/compiler-rt/dist/lib/tsan/go/build.bat vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_string.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_clock_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mman_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutex_test.cc vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.h vendor/compiler-rt/dist/lib/ubsan/ubsan_init.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.cc vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/test/asan/CMakeLists.txt vendor/compiler-rt/dist/test/asan/TestCases/Android/coverage-android.cc vendor/compiler-rt/dist/test/asan/TestCases/Android/lit.local.cfg vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interface_symbols_darwin.c vendor/compiler-rt/dist/test/asan/TestCases/Darwin/suppressions-darwin.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-2.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-caller-callee-total-count.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-large.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-disabled.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-levels.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-maybe-open-file.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-module-unloaded.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-sandboxing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-tracing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/malloc-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/overflow-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/sized_delete_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-trace-dlclose.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/init-order-dlopen.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/start-deactivated.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/tsd_dtor_leak.cc vendor/compiler-rt/dist/test/asan/TestCases/allocator_returns_null.cc vendor/compiler-rt/dist/test/asan/TestCases/deep_call_stack.cc vendor/compiler-rt/dist/test/asan/TestCases/default_options.cc vendor/compiler-rt/dist/test/asan/TestCases/dlclose-test.cc vendor/compiler-rt/dist/test/asan/TestCases/interception_failure_test.cc vendor/compiler-rt/dist/test/asan/TestCases/log-path_test.cc vendor/compiler-rt/dist/test/asan/TestCases/stack-overflow.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-function.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-interceptor.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-library.cc vendor/compiler-rt/dist/test/asan/TestCases/zero_page_pc.cc vendor/compiler-rt/dist/test/asan/Unit/lit.site.cfg.in vendor/compiler-rt/dist/test/asan/android_commands/android_run.py vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c vendor/compiler-rt/dist/test/builtins/Unit/enable_execute_stack_test.c vendor/compiler-rt/dist/test/lit.common.configured.in vendor/compiler-rt/dist/test/lsan/TestCases/ignore_object.cc vendor/compiler-rt/dist/test/lsan/TestCases/ignore_object_errors.cc vendor/compiler-rt/dist/test/lsan/TestCases/leak_check_at_exit.cc vendor/compiler-rt/dist/test/lsan/TestCases/leak_check_before_thread_started.cc vendor/compiler-rt/dist/test/lsan/TestCases/suppressions_file.cc vendor/compiler-rt/dist/test/msan/msan_print_shadow.cc vendor/compiler-rt/dist/test/msan/select_float_origin.cc vendor/compiler-rt/dist/test/msan/use-after-free.cc vendor/compiler-rt/dist/test/profile/instrprof-basic.c vendor/compiler-rt/dist/test/profile/instrprof-reset-counters.c vendor/compiler-rt/dist/test/profile/instrprof-set-filename.c vendor/compiler-rt/dist/test/profile/instrprof-without-libc.c vendor/compiler-rt/dist/test/profile/instrprof-write-file-atexit-explicitly.c vendor/compiler-rt/dist/test/profile/instrprof-write-file-only.c vendor/compiler-rt/dist/test/profile/instrprof-write-file.c vendor/compiler-rt/dist/test/tsan/CMakeLists.txt vendor/compiler-rt/dist/test/tsan/aligned_vs_unaligned_race.cc vendor/compiler-rt/dist/test/tsan/atomic_free.cc vendor/compiler-rt/dist/test/tsan/atomic_free2.cc vendor/compiler-rt/dist/test/tsan/atomic_norace.cc vendor/compiler-rt/dist/test/tsan/atomic_race.cc vendor/compiler-rt/dist/test/tsan/atomic_stack.cc vendor/compiler-rt/dist/test/tsan/benign_race.cc vendor/compiler-rt/dist/test/tsan/blacklist2.cc vendor/compiler-rt/dist/test/tsan/cond_cancel.c vendor/compiler-rt/dist/test/tsan/cond_race.cc vendor/compiler-rt/dist/test/tsan/deadlock_detector_stress_test.cc vendor/compiler-rt/dist/test/tsan/deep_stack1.cc vendor/compiler-rt/dist/test/tsan/fd_close_norace.cc vendor/compiler-rt/dist/test/tsan/fd_location.cc vendor/compiler-rt/dist/test/tsan/fd_pipe_race.cc vendor/compiler-rt/dist/test/tsan/fd_stdout_race.cc vendor/compiler-rt/dist/test/tsan/fork_deadlock.cc vendor/compiler-rt/dist/test/tsan/fork_multithreaded.cc vendor/compiler-rt/dist/test/tsan/free_race.c vendor/compiler-rt/dist/test/tsan/global_race.cc vendor/compiler-rt/dist/test/tsan/global_race2.cc vendor/compiler-rt/dist/test/tsan/global_race3.cc vendor/compiler-rt/dist/test/tsan/halt_on_error.cc vendor/compiler-rt/dist/test/tsan/ignore_free.cc vendor/compiler-rt/dist/test/tsan/ignore_lib0.cc vendor/compiler-rt/dist/test/tsan/ignore_lib1.cc vendor/compiler-rt/dist/test/tsan/ignore_lib2.cc vendor/compiler-rt/dist/test/tsan/ignore_lib3.cc vendor/compiler-rt/dist/test/tsan/ignore_malloc.cc vendor/compiler-rt/dist/test/tsan/ignore_race.cc vendor/compiler-rt/dist/test/tsan/inlined_memcpy_race.cc vendor/compiler-rt/dist/test/tsan/inlined_memcpy_race2.cc vendor/compiler-rt/dist/test/tsan/java.h vendor/compiler-rt/dist/test/tsan/java_finalizer.cc vendor/compiler-rt/dist/test/tsan/java_lock.cc vendor/compiler-rt/dist/test/tsan/java_lock_move.cc vendor/compiler-rt/dist/test/tsan/java_lock_rec.cc vendor/compiler-rt/dist/test/tsan/java_lock_rec_race.cc vendor/compiler-rt/dist/test/tsan/java_move_overlap.cc vendor/compiler-rt/dist/test/tsan/java_move_overlap_race.cc vendor/compiler-rt/dist/test/tsan/java_race_move.cc vendor/compiler-rt/dist/test/tsan/java_rwlock.cc vendor/compiler-rt/dist/test/tsan/load_shared_lib.cc vendor/compiler-rt/dist/test/tsan/malloc_stack.cc vendor/compiler-rt/dist/test/tsan/map32bit.cc vendor/compiler-rt/dist/test/tsan/memcpy_race.cc vendor/compiler-rt/dist/test/tsan/mop_with_offset.cc vendor/compiler-rt/dist/test/tsan/mop_with_offset2.cc vendor/compiler-rt/dist/test/tsan/mutex_cycle2.c vendor/compiler-rt/dist/test/tsan/mutexset1.cc vendor/compiler-rt/dist/test/tsan/mutexset2.cc vendor/compiler-rt/dist/test/tsan/mutexset3.cc vendor/compiler-rt/dist/test/tsan/mutexset4.cc vendor/compiler-rt/dist/test/tsan/mutexset5.cc vendor/compiler-rt/dist/test/tsan/mutexset6.cc vendor/compiler-rt/dist/test/tsan/mutexset7.cc vendor/compiler-rt/dist/test/tsan/mutexset8.cc vendor/compiler-rt/dist/test/tsan/pthread_atfork_deadlock.c vendor/compiler-rt/dist/test/tsan/race_on_barrier.c vendor/compiler-rt/dist/test/tsan/race_on_mutex.c vendor/compiler-rt/dist/test/tsan/race_on_mutex2.c vendor/compiler-rt/dist/test/tsan/race_on_puts.cc vendor/compiler-rt/dist/test/tsan/race_on_read.cc vendor/compiler-rt/dist/test/tsan/race_on_speculative_load.cc vendor/compiler-rt/dist/test/tsan/race_on_write.cc vendor/compiler-rt/dist/test/tsan/race_with_finished_thread.cc vendor/compiler-rt/dist/test/tsan/signal_errno.cc vendor/compiler-rt/dist/test/tsan/signal_malloc.cc vendor/compiler-rt/dist/test/tsan/signal_recursive.cc vendor/compiler-rt/dist/test/tsan/signal_sync.cc vendor/compiler-rt/dist/test/tsan/signal_write.cc vendor/compiler-rt/dist/test/tsan/simple_race.c vendor/compiler-rt/dist/test/tsan/simple_race.cc vendor/compiler-rt/dist/test/tsan/simple_stack.c vendor/compiler-rt/dist/test/tsan/simple_stack2.cc vendor/compiler-rt/dist/test/tsan/sleep_sync.cc vendor/compiler-rt/dist/test/tsan/sleep_sync2.cc vendor/compiler-rt/dist/test/tsan/stack_race.cc vendor/compiler-rt/dist/test/tsan/stack_race2.cc vendor/compiler-rt/dist/test/tsan/suppress_same_address.cc vendor/compiler-rt/dist/test/tsan/suppressions_global.cc vendor/compiler-rt/dist/test/tsan/suppressions_race.cc vendor/compiler-rt/dist/test/tsan/suppressions_race2.cc vendor/compiler-rt/dist/test/tsan/thread_detach.c vendor/compiler-rt/dist/test/tsan/thread_leak3.c vendor/compiler-rt/dist/test/tsan/thread_leak4.c vendor/compiler-rt/dist/test/tsan/thread_leak5.c vendor/compiler-rt/dist/test/tsan/thread_name.cc vendor/compiler-rt/dist/test/tsan/thread_name2.cc vendor/compiler-rt/dist/test/tsan/tiny_race.c vendor/compiler-rt/dist/test/tsan/tls_race.cc vendor/compiler-rt/dist/test/tsan/tls_race2.cc vendor/compiler-rt/dist/test/tsan/unaligned_norace.cc vendor/compiler-rt/dist/test/tsan/unaligned_race.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race2.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race3.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race4.cc vendor/compiler-rt/dist/test/tsan/write_in_reader_lock.cc vendor/compiler-rt/dist/test/ubsan/TestCases/Float/cast-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/no-recover.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nonnull-arg.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/misaligned.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr.cpp vendor/compiler-rt/dist/unittests/lit.common.unit.configured.in Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -104,7 +104,8 @@ else() # Get some LLVM variables from LLVMConfig. include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib) + set(LLVM_LIBRARY_OUTPUT_INTDIR + ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) # Find Python interpreter. set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) @@ -162,29 +163,6 @@ set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRE # Setup custom SDK sysroots. set(COMPILER_RT_LINUX_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/linux) -# Detect whether the current target platform is 32-bit or 64-bit, and setup -# the correct commandline flags needed to attempt to target 32-bit and 64-bit. -if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND - NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.") -endif() -if (NOT MSVC) - set(TARGET_64_BIT_CFLAGS "-m64") - set(TARGET_32_BIT_CFLAGS "-m32") -else() - set(TARGET_64_BIT_CFLAGS "") - set(TARGET_32_BIT_CFLAGS "") -endif() - -function(get_target_flags_for_arch arch out_var) - list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) - if(ARCH_INDEX EQUAL -1) - message(FATAL_ERROR "Unsupported architecture: ${arch}") - else() - set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) - endif() -endfunction() - # We support running instrumented tests when we're not cross compiling # and target a UNIX-like system or Windows. # We can run tests on Android even when we are cross-compiling. @@ -199,17 +177,12 @@ option(COMPILER_RT_DEBUG "Build runtimes # COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in. pythonize_bool(COMPILER_RT_DEBUG) -# We have to support both static and dynamic/shared runtime on Windows. -# Android only works with dynamic runtime. -if(WIN32 OR ANDROID) -option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" ON) -else() -option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" OFF) -endif() - #================================ # Setup Compiler Flags #================================ +include(CheckIncludeFile) +check_include_file(unwind.h HAVE_UNWIND_H) + include(config-ix) if(MSVC) @@ -238,6 +211,7 @@ append_list_if(COMPILER_RT_HAS_FUNWIND_T append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS) +append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS) if(MSVC) # Replace the /MD[d] flags with /MT. @@ -257,14 +231,28 @@ if(MSVC) append_list_if(COMPILER_RT_HAS_GS_FLAG /GS- SANITIZER_COMMON_CFLAGS) endif() +append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 SANITIZER_COMMON_CFLAGS) + # Build with optimization, unless we're in debug mode. If we're using MSVC, # always respect the optimization flags set by CMAKE_BUILD_TYPE instead. if(NOT COMPILER_RT_DEBUG AND NOT MSVC) list(APPEND SANITIZER_COMMON_CFLAGS -O3) endif() +# Determine if we should restrict stack frame sizes. +# Stack frames on PowerPC and in debug biuld can be much larger than +# anticipated. +# FIXME: Fix all sanitizers and add -Wframe-larger-than to +# SANITIZER_COMMON_FLAGS +if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG + AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC") + set(SANITIZER_LIMIT_FRAME_SIZE TRUE) +else() + set(SANITIZER_LIMIT_FRAME_SIZE FALSE) +endif() + # Build sanitizer runtimes with debug info. -if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG) +if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG) list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) elseif(COMPILER_RT_HAS_G_FLAG) list(APPEND SANITIZER_COMMON_CFLAGS -g) @@ -283,12 +271,27 @@ append_list_if(COMPILER_RT_HAS_WD4391_FL append_list_if(COMPILER_RT_HAS_WD4722_FLAG /wd4722 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4800_FLAG /wd4800 SANITIZER_COMMON_CFLAGS) if(APPLE) - # Obtain the iOS Simulator SDK path from xcodebuild. - execute_process( - COMMAND xcodebuild -version -sdk iphonesimulator Path - OUTPUT_VARIABLE IOSSIM_SDK_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + macro(find_darwin_sdk_dir var sdk_name) + # Let's first try the internal SDK, otherwise use the public SDK. + execute_process( + COMMAND xcodebuild -version -sdk ${sdk_name}.internal Path + OUTPUT_VARIABLE ${var} + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_FILE /dev/null + ) + if(${var} STREQUAL "") + execute_process( + COMMAND xcodebuild -version -sdk ${sdk_name} Path + OUTPUT_VARIABLE ${var} + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_FILE /dev/null + ) + endif() + endmacro() + + find_darwin_sdk_dir(OSX_SDK_DIR macosx) + find_darwin_sdk_dir(IOSSIM_SDK_DIR iphonesimulator) + string(REGEX MATCH "-mmacosx-version-min=" MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}") set(SANITIZER_COMMON_SUPPORTED_DARWIN_OS osx) @@ -298,10 +301,12 @@ if(APPLE) set(SANITIZER_MIN_OSX_VERSION 10.7) set(CMAKE_OSX_DEPLOYMENT_TARGET "") # We're setting the flag manually below. - set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) + set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} + -isysroot ${OSX_SDK_DIR} -stdlib=libc++) set(DARWIN_iossim_CFLAGS -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR}) - set(DARWIN_osx_LINKFLAGS) + set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} + -isysroot ${OSX_SDK_DIR} -stdlib=libc++) set(DARWIN_iossim_LINKFLAGS -Wl,-ios_simulator_version_min,7.0.0 -mios-simulator-version-min=7.0 Modified: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -131,10 +131,11 @@ set(COMPILER_RT_GTEST_CFLAGS -I${COMPILER_RT_GTEST_PATH} ) +append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_TEST_CFLAGS) + if(MSVC) # clang doesn't support exceptions on Windows yet. - list(APPEND COMPILER_RT_TEST_CFLAGS - -D_HAS_EXCEPTIONS=0) + list(APPEND COMPILER_RT_TEST_CFLAGS -D_HAS_EXCEPTIONS=0) # We should teach clang to understand "#pragma intrinsic", see PR19898. list(APPEND COMPILER_RT_TEST_CFLAGS -Wno-undefined-inline) @@ -156,12 +157,20 @@ endif() # using specified link flags. Make executable a part of provided # test_suite. # add_compiler_rt_test( +# SUBDIR # OBJECTS # DEPS # LINK_FLAGS ) macro(add_compiler_rt_test test_suite test_name) - parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) - set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") + parse_arguments(TEST "SUBDIR;OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + if(TEST_SUBDIR) + set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${TEST_SUBDIR}/${test_name}") + else() + set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") + endif() + if(MSVC) + set(output_bin "${output_bin}.exe") + endif() # Use host compiler in a standalone build, and just-built Clang otherwise. if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND TEST_DEPS clang) Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -9,7 +9,7 @@ macro(clang_compile object_file source) parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) get_filename_component(source_rpath ${source} REALPATH) if(NOT COMPILER_RT_STANDALONE_BUILD) - list(APPEND SOURCE_DEPS clang) + list(APPEND SOURCE_DEPS clang compiler-rt-headers) endif() if (TARGET CompilerRTUnitTestCheckCxx) list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx) Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -1,6 +1,7 @@ include(CheckCXXCompilerFlag) include(CheckLibraryExists) include(CheckSymbolExists) +include(TestBigEndian) # CodeGen options. check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG) @@ -16,6 +17,8 @@ check_cxx_compiler_flag(-ffreestanding check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG) check_cxx_compiler_flag(-std=c++11 COMPILER_RT_HAS_STD_CXX11_FLAG) check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC) +check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG) +check_cxx_compiler_flag(-msse3 COMPILER_RT_HAS_MSSE3_FLAG) check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG) check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG) @@ -26,7 +29,7 @@ check_cxx_compiler_flag(/Oy COMPILER_RT_ check_cxx_compiler_flag(-gline-tables-only COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG) check_cxx_compiler_flag(-g COMPILER_RT_HAS_G_FLAG) check_cxx_compiler_flag(/Zi COMPILER_RT_HAS_Zi_FLAG) - + # Warnings. check_cxx_compiler_flag(-Wall COMPILER_RT_HAS_WALL_FLAG) check_cxx_compiler_flag(-Werror COMPILER_RT_HAS_WERROR_FLAG) @@ -120,6 +123,13 @@ macro(detect_target_arch) endif() endmacro() +# Detect whether the current target platform is 32-bit or 64-bit, and setup +# the correct commandline flags needed to attempt to target 32-bit and 64-bit. +if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND + NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.") +endif() + # Generate the COMPILER_RT_SUPPORTED_ARCH list. if(ANDROID) # Can't rely on LLVM_NATIVE_ARCH in cross-compilation. @@ -128,28 +138,34 @@ if(ANDROID) set(COMPILER_RT_OS_SUFFIX "-android") else() if("${LLVM_NATIVE_ARCH}" STREQUAL "X86") - if (NOT MSVC) - test_target_arch(x86_64 ${TARGET_64_BIT_CFLAGS}) + if(NOT MSVC) + test_target_arch(x86_64 "-m64") + test_target_arch(i386 "-m32") + else() + test_target_arch(i386 "") endif() - test_target_arch(i386 ${TARGET_32_BIT_CFLAGS}) elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC") - test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS}) - test_target_arch(powerpc64le ${TARGET_64_BIT_CFLAGS}) + TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN) + if(HOST_IS_BIG_ENDIAN) + test_target_arch(powerpc64 "-m64") + else() + test_target_arch(powerpc64le "-m64") + endif() elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips") if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el") # regex for mipsel, mips64el - test_target_arch(mipsel ${TARGET_32_BIT_CFLAGS}) - test_target_arch(mips64el ${TARGET_64_BIT_CFLAGS}) + test_target_arch(mipsel "-m32") + test_target_arch(mips64el "-m64") else() - test_target_arch(mips ${TARGET_32_BIT_CFLAGS}) - test_target_arch(mips64 ${TARGET_64_BIT_CFLAGS}) + test_target_arch(mips "-m32") + test_target_arch(mips64 "-m64") endif() elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm") test_target_arch(arm "-march=armv7-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch32") test_target_arch(aarch32 "-march=armv8-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch64") - test_target_arch(aarch64 "-march=aarch64") + test_target_arch(aarch64 "-march=armv8-a") endif() set(COMPILER_RT_OS_SUFFIX "") endif() @@ -168,7 +184,16 @@ function(filter_available_targets out_va set(${out_var} ${archs} PARENT_SCOPE) endfunction() -# Arhcitectures supported by compiler-rt libraries. +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + +# Architectures supported by compiler-rt libraries. filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el) filter_available_targets(ASAN_SUPPORTED_ARCH @@ -183,7 +208,7 @@ filter_available_targets(MSAN_SUPPORTED_ filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 mipsel mips64el aarch64 powerpc64 powerpc64le) filter_available_targets(TSAN_SUPPORTED_ARCH x86_64) -filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel) +filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel mips64 mips64el) if(ANDROID) set(OS_NAME "Android") @@ -205,6 +230,12 @@ else() set(COMPILER_RT_HAS_ASAN FALSE) endif() +if (OS_NAME MATCHES "Linux|FreeBSD|Windows") + set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE) +else() + set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE) +endif() + # TODO: Add builtins support. if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND Modified: vendor/compiler-rt/dist/include/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/include/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -2,6 +2,7 @@ set(SANITIZER_HEADERS sanitizer/allocator_interface.h sanitizer/asan_interface.h sanitizer/common_interface_defs.h + sanitizer/coverage_interface.h sanitizer/dfsan_interface.h sanitizer/linux_syscall_hooks.h sanitizer/lsan_interface.h Modified: vendor/compiler-rt/dist/include/sanitizer/asan_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -114,8 +114,7 @@ extern "C" { // Returns the old value. int __asan_set_error_exit_code(int exit_code); - // Sets the callback to be called right before death on error. - // Passing 0 will unset the callback. + // Deprecated. Call __sanitizer_set_death_callback instead. void __asan_set_death_callback(void (*callback)(void)); void __asan_set_error_report_callback(void (*callback)(const char*)); Modified: vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Tue Feb 10 07:45:43 2015 (r278497) @@ -62,18 +62,6 @@ extern "C" { void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); - // Initialize coverage. - void __sanitizer_cov_init(); - // Record and dump coverage info. - void __sanitizer_cov_dump(); - // Open .sancov.packed in the coverage directory and return the file - // descriptor. Returns -1 on failure, or if coverage dumping is disabled. - // This is intended for use by sandboxing code. - intptr_t __sanitizer_maybe_open_cov_file(const char *name); - // Get the number of total unique covered entities (blocks, edges, calls). - // This can be useful for coverage-directed in-process fuzzers. - uintptr_t __sanitizer_get_total_unique_coverage(); - // Annotate the current state of a contiguous container, such as // std::vector, std::string or similar. // A contiguous container is a container that keeps all of its elements @@ -120,6 +108,9 @@ extern "C" { // Print the stack trace leading to this call. Useful for debugging user code. void __sanitizer_print_stack_trace(); + // Sets the callback to be called right before death on error. + // Passing 0 will unset the callback. + void __sanitizer_set_death_callback(void (*callback)(void)); #ifdef __cplusplus } // extern "C" #endif Added: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,46 @@ +//===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Public interface for sanitizer coverage. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_COVERAG_INTERFACE_H +#define SANITIZER_COVERAG_INTERFACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + // Initialize coverage. + void __sanitizer_cov_init(); + // Record and dump coverage info. + void __sanitizer_cov_dump(); + // Open .sancov.packed in the coverage directory and return the file + // descriptor. Returns -1 on failure, or if coverage dumping is disabled. + // This is intended for use by sandboxing code. + intptr_t __sanitizer_maybe_open_cov_file(const char *name); + // Get the number of total unique covered entities (blocks, edges, calls). + // This can be useful for coverage-directed in-process fuzzers. + uintptr_t __sanitizer_get_total_unique_coverage(); + + // Reset the basic-block (edge) coverage to the initial state. + // Useful for in-process fuzzing to start collecting coverage from scratch. + // Experimental, will likely not work for multi-threaded process. + void __sanitizer_reset_coverage(); + // Set *data to the array of covered PCs and return the size of that array. + // Some of the entries in *data will be zero. + uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SANITIZER_COVERAG_INTERFACE_H Modified: vendor/compiler-rt/dist/include/sanitizer/msan_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -38,7 +38,9 @@ extern "C" { contents). */ void __msan_unpoison_string(const volatile char *a); - /* Make memory region fully uninitialized (without changing its contents). */ + /* Make memory region fully uninitialized (without changing its contents). + This is a legacy interface that does not update origin information. Use + __msan_allocated_memory() instead. */ void __msan_poison(const volatile void *a, size_t size); /* Make memory region partially uninitialized (without changing its contents). Modified: vendor/compiler-rt/dist/lib/asan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -1,10 +1,11 @@ # Build for the AddressSanitizer runtime support library. set(ASAN_SOURCES - asan_allocator2.cc + asan_allocator.cc asan_activation.cc asan_debugging.cc asan_fake_stack.cc + asan_flags.cc asan_globals.cc asan_interceptors.cc asan_linux.cc @@ -64,8 +65,8 @@ if(APPLE) add_compiler_rt_darwin_object_library(RTAsan ${os} ARCH ${ASAN_SUPPORTED_ARCH} SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) endforeach() else() foreach(arch ${ASAN_SUPPORTED_ARCH}) @@ -78,12 +79,10 @@ else() add_compiler_rt_object_library(RTAsan_preinit ${arch} SOURCES ${ASAN_PREINIT_SOURCES} CFLAGS ${ASAN_CFLAGS} DEFS ${ASAN_COMMON_DEFINITIONS}) - if (COMPILER_RT_BUILD_SHARED_ASAN) - add_compiler_rt_object_library(RTAsan_dynamic ${arch} - SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} - CFLAGS ${ASAN_DYNAMIC_CFLAGS} - DEFS ${ASAN_DYNAMIC_DEFINITIONS}) - endif() + add_compiler_rt_object_library(RTAsan_dynamic ${arch} + SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) endforeach() endif() @@ -97,8 +96,8 @@ if(APPLE) $ $ $ - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) add_dependencies(asan clang_rt.asan_${os}_dynamic) endforeach() else() @@ -128,28 +127,25 @@ else() DEFS ${ASAN_COMMON_DEFINITIONS}) add_dependencies(asan clang_rt.asan_cxx-${arch}) - if (COMPILER_RT_BUILD_SHARED_ASAN) - add_compiler_rt_runtime(clang_rt.asan-preinit-${arch} ${arch} STATIC - SOURCES $ - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) - add_dependencies(asan clang_rt.asan-preinit-${arch}) + add_compiler_rt_runtime(clang_rt.asan-preinit-${arch} ${arch} STATIC + SOURCES $ + CFLAGS ${ASAN_CFLAGS} + DEFS ${ASAN_COMMON_DEFINITIONS}) + add_dependencies(asan clang_rt.asan-preinit-${arch}) - if (WIN32) - set(SHARED_ASAN_NAME clang_rt.asan_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) - else() - set(SHARED_ASAN_NAME clang_rt.asan-${arch}${COMPILER_RT_OS_SUFFIX}) - endif() - - add_compiler_rt_runtime(clang_rt.asan-dynamic-${arch} ${arch} SHARED - OUTPUT_NAME ${SHARED_ASAN_NAME} - SOURCES $ - ${ASAN_COMMON_RUNTIME_OBJECTS} - CFLAGS ${ASAN_DYNAMIC_CFLAGS} - DEFS ${ASAN_DYNAMIC_DEFINITIONS}) - target_link_libraries(clang_rt.asan-dynamic-${arch} ${ASAN_DYNAMIC_LIBS}) - add_dependencies(asan clang_rt.asan-dynamic-${arch}) + if (WIN32) + set(SHARED_ASAN_NAME clang_rt.asan_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) + else() + set(SHARED_ASAN_NAME clang_rt.asan-${arch}${COMPILER_RT_OS_SUFFIX}) endif() + add_compiler_rt_runtime(clang_rt.asan-dynamic-${arch} ${arch} SHARED + OUTPUT_NAME ${SHARED_ASAN_NAME} + SOURCES $ + ${ASAN_COMMON_RUNTIME_OBJECTS} + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) + target_link_libraries(clang_rt.asan-dynamic-${arch} ${ASAN_DYNAMIC_LIBS}) + add_dependencies(asan clang_rt.asan-dynamic-${arch}) if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686") add_sanitizer_rt_symbols(clang_rt.asan_cxx-${arch}) Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.cc Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.cc Tue Feb 10 07:45:43 2015 (r278497) @@ -16,40 +16,106 @@ #include "asan_allocator.h" #include "asan_flags.h" #include "asan_internal.h" +#include "asan_poisoning.h" +#include "asan_stack.h" #include "sanitizer_common/sanitizer_flags.h" namespace __asan { static struct AsanDeactivatedFlags { - int quarantine_size; - int max_redzone; + AllocatorOptions allocator_options; int malloc_context_size; bool poison_heap; - bool alloc_dealloc_mismatch; - bool allocator_may_return_null; + bool coverage; + const char *coverage_dir; + + void RegisterActivationFlags(FlagParser *parser, Flags *f, CommonFlags *cf) { +#define ASAN_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &f->Name); +#define COMMON_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &cf->Name); +#include "asan_activation_flags.inc" +#undef ASAN_ACTIVATION_FLAG +#undef COMMON_ACTIVATION_FLAG + + RegisterIncludeFlag(parser, cf); + } + + void OverrideFromActivationFlags() { + Flags f; + CommonFlags cf; + FlagParser parser; + RegisterActivationFlags(&parser, &f, &cf); + + // Copy the current activation flags. + allocator_options.CopyTo(&f, &cf); + cf.malloc_context_size = malloc_context_size; + f.poison_heap = poison_heap; + cf.coverage = coverage; + cf.coverage_dir = coverage_dir; + cf.verbosity = Verbosity(); + cf.help = false; // this is activation-specific help + + // Check if activation flags need to be overriden. + if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) { + parser.ParseString(env); + } + + // Override from getprop asan.options. + char buf[100]; + GetExtraActivationFlags(buf, sizeof(buf)); + parser.ParseString(buf); + + SetVerbosity(cf.verbosity); + + if (Verbosity()) ReportUnrecognizedFlags(); + + if (cf.help) parser.PrintFlagDescriptions(); + + allocator_options.SetFrom(&f, &cf); + malloc_context_size = cf.malloc_context_size; + poison_heap = f.poison_heap; + coverage = cf.coverage; + coverage_dir = cf.coverage_dir; + } + + void Print() { + Report( + "quarantine_size_mb %d, max_redzone %d, poison_heap %d, " + "malloc_context_size %d, alloc_dealloc_mismatch %d, " + "allocator_may_return_null %d, coverage %d, coverage_dir %s\n", + allocator_options.quarantine_size_mb, allocator_options.max_redzone, + poison_heap, malloc_context_size, + allocator_options.alloc_dealloc_mismatch, + allocator_options.may_return_null, coverage, coverage_dir); + } } asan_deactivated_flags; static bool asan_is_deactivated; -void AsanStartDeactivated() { +void AsanDeactivate() { + CHECK(!asan_is_deactivated); VReport(1, "Deactivating ASan\n"); - // Save flag values. - asan_deactivated_flags.quarantine_size = flags()->quarantine_size; - asan_deactivated_flags.max_redzone = flags()->max_redzone; - asan_deactivated_flags.poison_heap = flags()->poison_heap; - asan_deactivated_flags.malloc_context_size = - common_flags()->malloc_context_size; - asan_deactivated_flags.alloc_dealloc_mismatch = - flags()->alloc_dealloc_mismatch; - asan_deactivated_flags.allocator_may_return_null = - common_flags()->allocator_may_return_null; - - flags()->quarantine_size = 0; - flags()->max_redzone = 16; - flags()->poison_heap = false; - common_flags()->malloc_context_size = 0; - flags()->alloc_dealloc_mismatch = false; - common_flags()->allocator_may_return_null = true; + + // Stash runtime state. + GetAllocatorOptions(&asan_deactivated_flags.allocator_options); + asan_deactivated_flags.malloc_context_size = GetMallocContextSize(); + asan_deactivated_flags.poison_heap = CanPoisonMemory(); + asan_deactivated_flags.coverage = common_flags()->coverage; + asan_deactivated_flags.coverage_dir = common_flags()->coverage_dir; + + // Deactivate the runtime. + SetCanPoisonMemory(false); + SetMallocContextSize(1); + ReInitializeCoverage(false, nullptr); + + AllocatorOptions disabled = asan_deactivated_flags.allocator_options; + disabled.quarantine_size_mb = 0; + disabled.min_redzone = 16; // Redzone must be at least 16 bytes long. + disabled.max_redzone = 16; + disabled.alloc_dealloc_mismatch = false; + disabled.may_return_null = true; + ReInitializeAllocator(disabled); asan_is_deactivated = true; } @@ -58,31 +124,19 @@ void AsanActivate() { if (!asan_is_deactivated) return; VReport(1, "Activating ASan\n"); - // Restore flag values. - // FIXME: this is not atomic, and there may be other threads alive. - flags()->quarantine_size = asan_deactivated_flags.quarantine_size; - flags()->max_redzone = asan_deactivated_flags.max_redzone; - flags()->poison_heap = asan_deactivated_flags.poison_heap; - common_flags()->malloc_context_size = - asan_deactivated_flags.malloc_context_size; - flags()->alloc_dealloc_mismatch = - asan_deactivated_flags.alloc_dealloc_mismatch; - common_flags()->allocator_may_return_null = - asan_deactivated_flags.allocator_may_return_null; - - ParseExtraActivationFlags(); + asan_deactivated_flags.OverrideFromActivationFlags(); - ReInitializeAllocator(); + SetCanPoisonMemory(asan_deactivated_flags.poison_heap); + SetMallocContextSize(asan_deactivated_flags.malloc_context_size); + ReInitializeCoverage(asan_deactivated_flags.coverage, + asan_deactivated_flags.coverage_dir); + ReInitializeAllocator(asan_deactivated_flags.allocator_options); asan_is_deactivated = false; - VReport( - 1, - "quarantine_size %d, max_redzone %d, poison_heap %d, " - "malloc_context_size %d, alloc_dealloc_mismatch %d, " - "allocator_may_return_null %d\n", - flags()->quarantine_size, flags()->max_redzone, flags()->poison_heap, - common_flags()->malloc_context_size, flags()->alloc_dealloc_mismatch, - common_flags()->allocator_may_return_null); + if (Verbosity()) { + Report("Activated with flags:\n"); + asan_deactivated_flags.Print(); + } } } // namespace __asan Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.h ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.h Tue Feb 10 07:45:43 2015 (r278497) @@ -16,7 +16,7 @@ #define ASAN_ACTIVATION_H namespace __asan { -void AsanStartDeactivated(); +void AsanDeactivate(); void AsanActivate(); } // namespace __asan Added: vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,35 @@ +//===-- asan_activation_flags.inc -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// A subset of ASan (and common) runtime flags supported at activation time. +// +//===----------------------------------------------------------------------===// +#ifndef ASAN_ACTIVATION_FLAG +# error "Define ASAN_ACTIVATION_FLAG prior to including this file!" +#endif + +#ifndef COMMON_ACTIVATION_FLAG +# error "Define COMMON_ACTIVATION_FLAG prior to including this file!" +#endif + +// ASAN_ACTIVATION_FLAG(Type, Name) +// See COMMON_FLAG in sanitizer_flags.inc for more details. + +ASAN_ACTIVATION_FLAG(int, redzone) +ASAN_ACTIVATION_FLAG(int, max_redzone) +ASAN_ACTIVATION_FLAG(int, quarantine_size_mb) +ASAN_ACTIVATION_FLAG(bool, alloc_dealloc_mismatch) +ASAN_ACTIVATION_FLAG(bool, poison_heap) + +COMMON_ACTIVATION_FLAG(bool, allocator_may_return_null) +COMMON_ACTIVATION_FLAG(int, malloc_context_size) +COMMON_ACTIVATION_FLAG(bool, coverage) +COMMON_ACTIVATION_FLAG(const char *, coverage_dir) +COMMON_ACTIVATION_FLAG(int, verbosity) +COMMON_ACTIVATION_FLAG(bool, help) Added: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,909 @@ +//===-- asan_allocator.cc -------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of AddressSanitizer, an address sanity checker. +// +// Implementation of ASan's memory allocator, 2-nd version. +// This variant uses the allocator from sanitizer_common, i.e. the one shared +// with ThreadSanitizer and MemorySanitizer. +// +//===----------------------------------------------------------------------===// +#include "asan_allocator.h" + +#include "asan_mapping.h" +#include "asan_poisoning.h" +#include "asan_report.h" +#include "asan_stack.h" +#include "asan_thread.h" +#include "sanitizer_common/sanitizer_allocator_interface.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_internal_defs.h" +#include "sanitizer_common/sanitizer_list.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_quarantine.h" +#include "lsan/lsan_common.h" + +namespace __asan { + +// Valid redzone sizes are 16, 32, 64, ... 2048, so we encode them in 3 bits. +// We use adaptive redzones: for larger allocation larger redzones are used. +static u32 RZLog2Size(u32 rz_log) { + CHECK_LT(rz_log, 8); + return 16 << rz_log; +} + +static u32 RZSize2Log(u32 rz_size) { + CHECK_GE(rz_size, 16); + CHECK_LE(rz_size, 2048); + CHECK(IsPowerOfTwo(rz_size)); + u32 res = Log2(rz_size) - 4; + CHECK_EQ(rz_size, RZLog2Size(res)); + return res; +} + +static AsanAllocator &get_allocator(); + +// The memory chunk allocated from the underlying allocator looks like this: +// L L L L L L H H U U U U U U R R +// L -- left redzone words (0 or more bytes) +// H -- ChunkHeader (16 bytes), which is also a part of the left redzone. +// U -- user memory. +// R -- right redzone (0 or more bytes) +// ChunkBase consists of ChunkHeader and other bytes that overlap with user +// memory. + +// If the left redzone is greater than the ChunkHeader size we store a magic +// value in the first uptr word of the memory block and store the address of +// ChunkBase in the next uptr. +// M B L L L L L L L L L H H U U U U U U +// | ^ +// ---------------------| +// M -- magic value kAllocBegMagic +// B -- address of ChunkHeader pointing to the first 'H' +static const uptr kAllocBegMagic = 0xCC6E96B9; + +struct ChunkHeader { + // 1-st 8 bytes. + u32 chunk_state : 8; // Must be first. + u32 alloc_tid : 24; + + u32 free_tid : 24; + u32 from_memalign : 1; + u32 alloc_type : 2; + u32 rz_log : 3; + u32 lsan_tag : 2; + // 2-nd 8 bytes + // This field is used for small sizes. For large sizes it is equal to + // SizeClassMap::kMaxSize and the actual size is stored in the + // SecondaryAllocator's metadata. + u32 user_requested_size; + u32 alloc_context_id; +}; + +struct ChunkBase : ChunkHeader { + // Header2, intersects with user memory. + u32 free_context_id; +}; + +static const uptr kChunkHeaderSize = sizeof(ChunkHeader); +static const uptr kChunkHeader2Size = sizeof(ChunkBase) - kChunkHeaderSize; +COMPILER_CHECK(kChunkHeaderSize == 16); +COMPILER_CHECK(kChunkHeader2Size <= 16); + +// Every chunk of memory allocated by this allocator can be in one of 3 states: +// CHUNK_AVAILABLE: the chunk is in the free list and ready to be allocated. +// CHUNK_ALLOCATED: the chunk is allocated and not yet freed. +// CHUNK_QUARANTINE: the chunk was freed and put into quarantine zone. +enum { + CHUNK_AVAILABLE = 0, // 0 is the default value even if we didn't set it. + CHUNK_ALLOCATED = 2, + CHUNK_QUARANTINE = 3 +}; + +struct AsanChunk: ChunkBase { + uptr Beg() { return reinterpret_cast(this) + kChunkHeaderSize; } + uptr UsedSize(bool locked_version = false) { + if (user_requested_size != SizeClassMap::kMaxSize) + return user_requested_size; + return *reinterpret_cast( + get_allocator().GetMetaData(AllocBeg(locked_version))); + } + void *AllocBeg(bool locked_version = false) { + if (from_memalign) { + if (locked_version) + return get_allocator().GetBlockBeginFastLocked( + reinterpret_cast(this)); + return get_allocator().GetBlockBegin(reinterpret_cast(this)); + } + return reinterpret_cast(Beg() - RZLog2Size(rz_log)); + } + bool AddrIsInside(uptr addr, bool locked_version = false) { + return (addr >= Beg()) && (addr < Beg() + UsedSize(locked_version)); + } +}; + +struct QuarantineCallback { + explicit QuarantineCallback(AllocatorCache *cache) + : cache_(cache) { + } + + void Recycle(AsanChunk *m) { + CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); + atomic_store((atomic_uint8_t*)m, CHUNK_AVAILABLE, memory_order_relaxed); + CHECK_NE(m->alloc_tid, kInvalidTid); + CHECK_NE(m->free_tid, kInvalidTid); + PoisonShadow(m->Beg(), + RoundUpTo(m->UsedSize(), SHADOW_GRANULARITY), + kAsanHeapLeftRedzoneMagic); + void *p = reinterpret_cast(m->AllocBeg()); + if (p != m) { + uptr *alloc_magic = reinterpret_cast(p); + CHECK_EQ(alloc_magic[0], kAllocBegMagic); + // Clear the magic value, as allocator internals may overwrite the + // contents of deallocated chunk, confusing GetAsanChunk lookup. + alloc_magic[0] = 0; + CHECK_EQ(alloc_magic[1], reinterpret_cast(m)); + } + + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.real_frees++; + thread_stats.really_freed += m->UsedSize(); + + get_allocator().Deallocate(cache_, p); + } + + void *Allocate(uptr size) { + return get_allocator().Allocate(cache_, size, 1, false); + } + + void Deallocate(void *p) { + get_allocator().Deallocate(cache_, p); + } + + AllocatorCache *cache_; +}; + +typedef Quarantine AsanQuarantine; +typedef AsanQuarantine::Cache QuarantineCache; + +void AsanMapUnmapCallback::OnMap(uptr p, uptr size) const { + PoisonShadow(p, size, kAsanHeapLeftRedzoneMagic); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.mmaps++; + thread_stats.mmaped += size; +} +void AsanMapUnmapCallback::OnUnmap(uptr p, uptr size) const { + PoisonShadow(p, size, 0); + // We are about to unmap a chunk of user memory. + // Mark the corresponding shadow memory as not needed. + FlushUnneededASanShadowMemory(p, size); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.munmaps++; + thread_stats.munmaped += size; +} + +// We can not use THREADLOCAL because it is not supported on some of the +// platforms we care about (OSX 10.6, Android). +// static THREADLOCAL AllocatorCache cache; +AllocatorCache *GetAllocatorCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + return &ms->allocator_cache; +} + +QuarantineCache *GetQuarantineCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + CHECK_LE(sizeof(QuarantineCache), sizeof(ms->quarantine_cache)); + return reinterpret_cast(ms->quarantine_cache); +} + +void AllocatorOptions::SetFrom(const Flags *f, const CommonFlags *cf) { + quarantine_size_mb = f->quarantine_size_mb; + min_redzone = f->redzone; + max_redzone = f->max_redzone; + may_return_null = cf->allocator_may_return_null; + alloc_dealloc_mismatch = f->alloc_dealloc_mismatch; +} + +void AllocatorOptions::CopyTo(Flags *f, CommonFlags *cf) { + f->quarantine_size_mb = quarantine_size_mb; + f->redzone = min_redzone; + f->max_redzone = max_redzone; + cf->allocator_may_return_null = may_return_null; + f->alloc_dealloc_mismatch = alloc_dealloc_mismatch; +} + +struct Allocator { + static const uptr kMaxAllowedMallocSize = + FIRST_32_SECOND_64(3UL << 30, 64UL << 30); + static const uptr kMaxThreadLocalQuarantine = + FIRST_32_SECOND_64(1 << 18, 1 << 20); + + AsanAllocator allocator; + AsanQuarantine quarantine; + StaticSpinMutex fallback_mutex; + AllocatorCache fallback_allocator_cache; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 07:46:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A7F46E; Tue, 10 Feb 2015 07:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F8912D; Tue, 10 Feb 2015 07:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A7kQjW040028; Tue, 10 Feb 2015 07:46:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7kQ6C040027; Tue, 10 Feb 2015 07:46:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100746.t1A7kQ6C040027@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278498 - vendor/compiler-rt/compiler-rt-r228651 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:46:26 -0000 Author: dim Date: Tue Feb 10 07:46:25 2015 New Revision: 278498 URL: https://svnweb.freebsd.org/changeset/base/278498 Log: Tag compiler-rt trunk r228651. Added: vendor/compiler-rt/compiler-rt-r228651/ - copied from r278497, vendor/compiler-rt/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 08:15:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55B799F4; Tue, 10 Feb 2015 08:15:52 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA98C616; Tue, 10 Feb 2015 08:15:51 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1A8FcfJ037688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2015 10:15:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1A8FcfJ037688 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1A8Fcvw037686; Tue, 10 Feb 2015 10:15:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 10 Feb 2015 10:15:38 +0200 From: Konstantin Belousov To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210081538.GK42409@kib.kiev.ua> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <20150209232826.GJ42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 08:15:52 -0000 On Mon, Feb 09, 2015 at 06:35:55PM -0800, Rui Paulo wrote: > On Feb 9, 2015, at 15:28, Konstantin Belousov wrote: > > Arguably, there should be a knob, probably sysctl, to turn the > > functionality off. I definitely do not want this on crash boxes used for > > userspace debugging. Even despite the example handler is inactive. > > OK, I can provide a sysctl knob. Seen that, thanks. > > >> + len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; > > It is much cleaner to use static const char arrays for the names, > > and use sizeof() - 1 instead of hard-coding commented constants. > > OK. I was trying to avoid allocating >2k on the stack. Probably I was not clear enough. I do not suggest to change data allocation from malloc to automatic. I mean static const char comm_name[] = "comm="; and then use sizeof(comm_name) - 1 and comm_name instead of string literal. > > >> + data = malloc(len, M_TEMP, M_NOWAIT); > > Why is this allocation M_NOWAIT ? > > That should be M_WAITOK. > > >> + freepath = NULL; > >> + } > >> + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) > >> + goto out; > >> + snprintf(data, len, "%s core=%s", data, fullpath); > > This is weird, and highly depends on the implementation details, supplying > > the same string as target and source. IMO strcat(9) is enough there. > > OK, I'll change it to strcat. > > -- > Rui Paulo > > From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 08:32:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAAAAC74; Tue, 10 Feb 2015 08:32:28 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 327D382A; Tue, 10 Feb 2015 08:32:28 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1A8WM9x041393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2015 10:32:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1A8WM9x041393 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1A8WMxt041392; Tue, 10 Feb 2015 10:32:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 10 Feb 2015 10:32:22 +0200 From: Konstantin Belousov To: Rui Paulo Subject: Re: svn commit: r278494 - head/sys/kern Message-ID: <20150210083222.GL42409@kib.kiev.ua> References: <201502100434.t1A4YeLr052513@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502100434.t1A4YeLr052513@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 08:32:28 -0000 On Tue, Feb 10, 2015 at 04:34:40AM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Tue Feb 10 04:34:39 2015 > New Revision: 278494 > URL: https://svnweb.freebsd.org/changeset/base/278494 > > Log: > Sanitise the coredump file names sent to devd. > > While there, add a sysctl to turn this feature off as requested by > kib@. > > Modified: > head/sys/kern/kern_sig.c > > Modified: head/sys/kern/kern_sig.c > ============================================================================== > --- head/sys/kern/kern_sig.c Tue Feb 10 03:34:42 2015 (r278493) > +++ head/sys/kern/kern_sig.c Tue Feb 10 04:34:39 2015 (r278494) > @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > #include "opt_core.h" > > #include > +#include > #include > #include > #include > @@ -179,6 +180,10 @@ static int set_core_nodump_flag = 0; > SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, > 0, "Enable setting the NODUMP flag on coredump files"); > > +static int coredump_devctl = 1; > +SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, > + 0, "Generate a devctl notification when processes coredump"); > + > /* > * Signal properties and actions. > * The array below categorizes the signals and their default actions > @@ -3217,6 +3222,25 @@ out: > return (0); > } > > +static int > +coredump_sanitise_path(const char *path) > +{ > + size_t len, i; > + > + /* > + * Only send a subset of ASCII to devd(8) because it > + * might pass these strings to sh -c. > + */ > + len = strlen(path); > + for (i = 0; i < len; i++) You may check for the nul byte, avoiding first iteration over the string. > + if (!(isalpha(path[i]) || isdigit(path[i])) && > + path[i] != '/' && path[i] != '.' && > + path[i] != '-') > + return (0); > + > + return (1); > +} > + > /* > * Dump a process' core. The main routine does some > * policy checking, and creates the name of the coredump; > @@ -3238,9 +3262,9 @@ coredump(struct thread *td) > void *rl_cookie; > off_t limit; > int compress; > - char *data = NULL; > - size_t len; > + char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */ As I explained in another mail, I did not suggested doing this. > char *fullpath, *freepath = NULL; > + size_t len; > > #ifdef COMPRESS_USER_CORES > compress = compress_user_cores; > @@ -3332,30 +3356,29 @@ close: > * Notify the userland helper that a process triggered a core dump. > * This allows the helper to run an automated debugging session. > */ > - len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1; > - data = malloc(len, M_TEMP, M_NOWAIT); > - if (data == NULL) > + if (coredump_devctl == 0) > goto out; > if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > goto out; > - snprintf(data, len, "comm=%s", fullpath); > - if (freepath != NULL) { > - free(freepath, M_TEMP); > - freepath = NULL; > + if (!coredump_sanitise_path(fullpath)) > + goto out; > + snprintf(data, sizeof(data), "comm=%s ", fullpath); > + free(freepath, M_TEMP); > + freepath = NULL; > + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) { > + printf("could not find coredump\n"); This printf should be removed. > + goto out; > } > - if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) > + if (!coredump_sanitise_path(fullpath)) > goto out; > - snprintf(data, len, "%s core=%s", data, fullpath); > + strlcat(data, "core=", sizeof(data)); > + len = strlcat(data, fullpath, sizeof(data)); > devctl_notify("kernel", "signal", "coredump", data); > - free(name, M_TEMP); > out: > #ifdef AUDIT > audit_proc_coredump(td, name, error); > #endif > - if (freepath != NULL) > - free(freepath, M_TEMP); > - if (data != NULL) > - free(data, M_TEMP); > + free(freepath, M_TEMP); > free(name, M_TEMP); > return (error); > } And there is double-free somewhere. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 10:01:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEEA6E2D; Tue, 10 Feb 2015 10:01:56 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4362120F; Tue, 10 Feb 2015 10:01:56 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id bs8so10769911wib.0; Tue, 10 Feb 2015 02:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1yuF1+FFZvYBo1Lu1733g6FHvqyR9OQVXI2KvYiVlaI=; b=i8Ojgtnz/YcpBM/zeldHVv6ZfEEohV52JGI5MlZDM5XVH2Lsorcwh4K8aq4u4ehDOs E8evdVwJ7+G0mEsrTadDOi6NAuT9JP++nwQ4hmR+78DamgoXV/0Fs5gTPnigDB9h8YjK ME+K4+zC8bLSViR3UGfuA8PeiZ7pdbJThb3gjbbwKOXCF8GyPtiRFFg8DND39kFmn7g/ d4vTCTgtfZyRURI3FNHX+L50lk1Ch2egbtaBud+tVyAT4IShccVFQxuqa7OTMAE6uq5o F8JVUqK60eT9riOwim6IDKp4ZUbbpUvO7AlNYQVubNHDcpB893TF/QrA1DSOK9TU4AsL H8Yg== X-Received: by 10.180.103.7 with SMTP id fs7mr35554694wib.81.1423562514782; Tue, 10 Feb 2015 02:01:54 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id qo10sm18498311wjc.38.2015.02.10.02.01.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Feb 2015 02:01:53 -0800 (PST) Date: Tue, 10 Feb 2015 11:01:51 +0100 From: Mateusz Guzik To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210100151.GA5994@dft-labs.eu> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <20150210024317.GA21779@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 10:01:56 -0000 On Mon, Feb 09, 2015 at 06:57:36PM -0800, Rui Paulo wrote: > On Feb 9, 2015, at 18:43, Mateusz Guzik wrote: > > > > On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: > >> +notify 10 { > >> + match "system" "kernel"; > >> + match "subsystem" "signal"; > >> + match "type" "coredump"; > >> + action "logger $comm $core"; > >> +}; > >> + > >> */ > >> > > [..] > >> + if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > >> + goto out; > >> + snprintf(data, len, "comm=%s", fullpath); > > > > I cannot test it right now, but it looks like immediate privilege > > escalation. > > > > Path is not sanitized in any way and devd passes it to 'sh -c'. > > > > So a file named "a.out; /bin/id; meh" or so should result in execution > > of aforementioned /bin/id. > > Well, you can't have a file name with "/" but you're right. > I mean the whole path. You are resolving the name along with all dirs, so it's just a matter of some mkdirs. > > Another note is that currently devctl is record oriented, but this may > > change at some point and free form userspace text could be used to forge > > new events. > > > > As such is trongly suggest we sanitize this somehow. Maybe a base64 or > > something. > > I was trying hard to avoid this issue in unpublished my crash helper, but I forgot that devd runs execl("sh -c", ....); :-( > > It might just be easier to inspect the path names and allow only [a-z][A-Z][0-9] and '/' before sending the devctl message. > I'm pretty sure sooner or later people will want something with a space, so I would prefer a reasonably complete solution. A hack like the one yu mention should suffice fr now though (with the addition of a dot). -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 11:31:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54ED5307 for ; Tue, 10 Feb 2015 11:31:08 +0000 (UTC) Received: from relay02.pair.com (relay02.pair.com [209.68.5.16]) by mx1.freebsd.org (Postfix) with SMTP id DFAC1DC4 for ; Tue, 10 Feb 2015 11:31:07 +0000 (UTC) Received: (qmail 64308 invoked from network); 10 Feb 2015 11:31:00 -0000 Received: from 188.182.139.176 (HELO x2.osted.lan) (188.182.139.176) by relay02.pair.com with SMTP; 10 Feb 2015 11:31:00 -0000 X-pair-Authenticated: 188.182.139.176 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id t1ABUwbE069606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Feb 2015 12:30:59 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id t1ABUwEv069605; Tue, 10 Feb 2015 12:30:58 +0100 (CET) (envelope-from pho) Date: Tue, 10 Feb 2015 12:30:58 +0100 From: Peter Holm To: randall Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150210113058.GA67277@x2.osted.lan> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <20150209204111.GA47080@x2.osted.lan> <54D9A15D.3030107@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D9A15D.3030107@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 11:31:08 -0000 On Tue, Feb 10, 2015 at 01:12:45AM -0500, randall wrote: > Peter: > > I am not sure what you mean.. :-) > I just realized that the reported panic is in r278471. I'm not able to reproduce the problem with r278472. Sorry for having wasted your time! - Peter From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 11:37:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FA46503; Tue, 10 Feb 2015 11:37:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AD00EAA; Tue, 10 Feb 2015 11:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ABbWKP047325; Tue, 10 Feb 2015 11:37:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ABbWAI047324; Tue, 10 Feb 2015 11:37:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502101137.t1ABbWAI047324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 10 Feb 2015 11:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278500 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 11:37:33 -0000 Author: mav Date: Tue Feb 10 11:37:32 2015 New Revision: 278500 URL: https://svnweb.freebsd.org/changeset/base/278500 Log: Do not abort already aborted tasks. This fixes abort of new tasks with the same tags as previously aborted, but still remaining on the queue. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Feb 10 07:56:14 2015 (r278499) +++ head/sys/cam/ctl/ctl.c Tue Feb 10 11:37:32 2015 (r278500) @@ -12286,64 +12286,57 @@ ctl_abort_task(union ctl_io *io) printf("%s\n", sbuf_data(&sb)); #endif - if ((xio->io_hdr.nexus.targ_port == io->io_hdr.nexus.targ_port) - && (xio->io_hdr.nexus.initid.id == - io->io_hdr.nexus.initid.id)) { - /* - * If the abort says that the task is untagged, the - * task in the queue must be untagged. Otherwise, - * we just check to see whether the tag numbers - * match. This is because the QLogic firmware - * doesn't pass back the tag type in an abort - * request. - */ + if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) + || (xio->io_hdr.nexus.initid.id != io->io_hdr.nexus.initid.id) + || (xio->io_hdr.flags & CTL_FLAG_ABORT)) + continue; + + /* + * If the abort says that the task is untagged, the + * task in the queue must be untagged. Otherwise, + * we just check to see whether the tag numbers + * match. This is because the QLogic firmware + * doesn't pass back the tag type in an abort + * request. + */ #if 0 - if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) - && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) - || (xio->scsiio.tag_num == io->taskio.tag_num)) { + if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) + && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) + || (xio->scsiio.tag_num == io->taskio.tag_num)) { #endif - /* - * XXX KDM we've got problems with FC, because it - * doesn't send down a tag type with aborts. So we - * can only really go by the tag number... - * This may cause problems with parallel SCSI. - * Need to figure that out!! - */ - if (xio->scsiio.tag_num == io->taskio.tag_num) { - xio->io_hdr.flags |= CTL_FLAG_ABORT; - found = 1; - if ((io->io_hdr.flags & - CTL_FLAG_FROM_OTHER_SC) == 0 && - !(lun->flags & CTL_LUN_PRIMARY_SC)) { - union ctl_ha_msg msg_info; - - io->io_hdr.flags |= - CTL_FLAG_SENT_2OTHER_SC; - msg_info.hdr.nexus = io->io_hdr.nexus; - msg_info.task.task_action = - CTL_TASK_ABORT_TASK; - msg_info.task.tag_num = - io->taskio.tag_num; - msg_info.task.tag_type = - io->taskio.tag_type; - msg_info.hdr.msg_type = - CTL_MSG_MANAGE_TASKS; - msg_info.hdr.original_sc = NULL; - msg_info.hdr.serializing_sc = NULL; + /* + * XXX KDM we've got problems with FC, because it + * doesn't send down a tag type with aborts. So we + * can only really go by the tag number... + * This may cause problems with parallel SCSI. + * Need to figure that out!! + */ + if (xio->scsiio.tag_num == io->taskio.tag_num) { + xio->io_hdr.flags |= CTL_FLAG_ABORT; + found = 1; + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0 && + !(lun->flags & CTL_LUN_PRIMARY_SC)) { + union ctl_ha_msg msg_info; + + io->io_hdr.flags |= CTL_FLAG_SENT_2OTHER_SC; + msg_info.hdr.nexus = io->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_ABORT_TASK; + msg_info.task.tag_num = io->taskio.tag_num; + msg_info.task.tag_type = io->taskio.tag_type; + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; #if 0 - printf("Sent Abort to other side\n"); + printf("Sent Abort to other side\n"); #endif - if (CTL_HA_STATUS_SUCCESS != - ctl_ha_msg_send(CTL_HA_CHAN_CTL, - (void *)&msg_info, - sizeof(msg_info), 0)) { - } + if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, + (void *)&msg_info, sizeof(msg_info), 0) != + CTL_HA_STATUS_SUCCESS) { } + } #if 0 - printf("ctl_abort_task: found I/O to abort\n"); + printf("ctl_abort_task: found I/O to abort\n"); #endif - break; - } } } mtx_unlock(&lun->lun_lock); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 12:04:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C1AB4B; Tue, 10 Feb 2015 12:04:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B8BB1E4; Tue, 10 Feb 2015 12:04:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AC4dwj061019; Tue, 10 Feb 2015 12:04:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AC4dHJ061018; Tue, 10 Feb 2015 12:04:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502101204.t1AC4dHJ061018@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 10 Feb 2015 12:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278502 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 12:04:39 -0000 Author: gjb Date: Tue Feb 10 12:04:38 2015 New Revision: 278502 URL: https://svnweb.freebsd.org/changeset/base/278502 Log: In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not a character device before it is sourced. While here, be sure to exit if usage() is called. This should effectively be no-op, but the usage() output was discovered while investigating a larger issue. MFC after: 1 week X-MFC-with: r277458, r277536, r277606, r277609, r277836, r278118, r278119, r278206 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/mk-vmimage.sh Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Tue Feb 10 11:47:03 2015 (r278501) +++ head/release/scripts/mk-vmimage.sh Tue Feb 10 12:04:38 2015 (r278502) @@ -40,6 +40,7 @@ usage() { main() { local arg + VMCONFIG="/dev/null" while getopts "C:c:d:f:i:o:s:S:" arg; do case "${arg}" in C) @@ -76,10 +77,9 @@ main() { -z "${WORLDDIR}" -o \ -z "${DESTDIR}" -o \ -z "${VMSIZE}" -o \ - -z "${VMIMAGE}" -o \ - -z "${VMCONFIG}" ]; + -z "${VMIMAGE}" ]; then - usage + usage || exit 0 fi if [ -z "${VMBUILDCONF}" ] || [ ! -e "${VMBUILDCONF}" ]; then @@ -89,7 +89,7 @@ main() { . "${VMBUILDCONF}" - if [ ! -z "${VMCONFIG}" ] && [ -e "${VMCONFIG}" ]; then + if [ ! -z "${VMCONFIG}" ] && [ ! -c "${VMCONFIG}" ]; then . "${VMCONFIG}" fi From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 12:08:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9690FCD3; Tue, 10 Feb 2015 12:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7493B216; Tue, 10 Feb 2015 12:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AC8rlE061563; Tue, 10 Feb 2015 12:08:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AC8ruq061561; Tue, 10 Feb 2015 12:08:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101208.t1AC8ruq061561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 12:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278503 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 12:08:53 -0000 Author: hselasky Date: Tue Feb 10 12:08:52 2015 New Revision: 278503 URL: https://svnweb.freebsd.org/changeset/base/278503 Log: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. MFC after: 3 days Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Tue Feb 10 12:04:38 2015 (r278502) +++ head/sys/dev/sound/usb/uaudio.c Tue Feb 10 12:08:52 2015 (r278503) @@ -111,6 +111,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -189,7 +190,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -226,11 +226,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1799,14 +1800,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2016,29 +2009,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2082,10 +2090,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2120,21 +2128,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2452,6 +2461,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 12:38:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF037700; Tue, 10 Feb 2015 12:38:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA7A6827; Tue, 10 Feb 2015 12:38:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ACcd8i076097; Tue, 10 Feb 2015 12:38:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ACcdE7076096; Tue, 10 Feb 2015 12:38:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502101238.t1ACcdE7076096@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 10 Feb 2015 12:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278505 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 12:38:40 -0000 Author: gjb Date: Tue Feb 10 12:38:39 2015 New Revision: 278505 URL: https://svnweb.freebsd.org/changeset/base/278505 Log: Bump copyright, forgotten in r278502. MFC after: 1 week X-MFC-with: r277458, r277536, r277606, r277609, r277836, r278118, r278119, r278206, r278502 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/mk-vmimage.sh Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Tue Feb 10 12:35:07 2015 (r278504) +++ head/release/scripts/mk-vmimage.sh Tue Feb 10 12:38:39 2015 (r278505) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2014 The FreeBSD Foundation +# Copyright (c) 2014, 2015 The FreeBSD Foundation # All rights reserved. # # This software was developed by Glen Barber under sponsorship From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:07:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FB57E10; Tue, 10 Feb 2015 13:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B142AE2; Tue, 10 Feb 2015 13:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AD79KS090254; Tue, 10 Feb 2015 13:07:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AD79k8090253; Tue, 10 Feb 2015 13:07:09 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201502101307.t1AD79k8090253@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 10 Feb 2015 13:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278506 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:07:09 -0000 Author: royger Date: Tue Feb 10 13:07:08 2015 New Revision: 278506 URL: https://svnweb.freebsd.org/changeset/base/278506 Log: rc.d: load the network config file for netif r272959 broke compatibility with mfsBSD that stores the default network config file in /etc/rc.conf.d/network. In order to fix that load the network config file from netif also. Modified: head/etc/rc.d/netif Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Tue Feb 10 12:38:39 2015 (r278505) +++ head/etc/rc.d/netif Tue Feb 10 13:07:08 2015 (r278506) @@ -252,5 +252,8 @@ netif_common() debug "The following interfaces were not configured: $_fail" } +# Load the old "network" config file also for compatibility. +# This is needed for mfsBSD at least. +load_rc_config network load_rc_config $name run_rc_command $* From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:16:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF354CA; Tue, 10 Feb 2015 13:16:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9BF1C22; Tue, 10 Feb 2015 13:16:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADGsRa095293; Tue, 10 Feb 2015 13:16:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADGsGH095290; Tue, 10 Feb 2015 13:16:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101316.t1ADGsGH095290@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278507 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:16:55 -0000 Author: hselasky Date: Tue Feb 10 13:16:53 2015 New Revision: 278507 URL: https://svnweb.freebsd.org/changeset/base/278507 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/usb_core.h stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/controller/xhci.c Tue Feb 10 13:16:53 2015 (r278507) @@ -1870,6 +1870,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2110,7 +2119,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/10/sys/dev/usb/usb_core.h ============================================================================== --- stable/10/sys/dev/usb/usb_core.h Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/usb_core.h Tue Feb 10 13:16:53 2015 (r278507) @@ -101,6 +101,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:16:53 2015 (r278507) @@ -1409,6 +1409,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1513,6 +1536,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:18:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F38611; Tue, 10 Feb 2015 13:18:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3A8C37; Tue, 10 Feb 2015 13:18:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADIoO4095600; Tue, 10 Feb 2015 13:18:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADIneB095597; Tue, 10 Feb 2015 13:18:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101318.t1ADIneB095597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278508 - in stable/9/sys/dev/usb: . controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:18:50 -0000 Author: hselasky Date: Tue Feb 10 13:18:48 2015 New Revision: 278508 URL: https://svnweb.freebsd.org/changeset/base/278508 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/usb_core.h stable/9/sys/dev/usb/usb_transfer.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/controller/xhci.c Tue Feb 10 13:18:48 2015 (r278508) @@ -1850,6 +1850,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2089,7 +2098,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/9/sys/dev/usb/usb_core.h ============================================================================== --- stable/9/sys/dev/usb/usb_core.h Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/usb_core.h Tue Feb 10 13:18:48 2015 (r278508) @@ -97,6 +97,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/usb_transfer.c Tue Feb 10 13:18:48 2015 (r278508) @@ -1345,6 +1345,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1449,6 +1472,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:20:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDA3A837; Tue, 10 Feb 2015 13:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A78B0C4E; Tue, 10 Feb 2015 13:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADKZXf098061; Tue, 10 Feb 2015 13:20:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADKYef098058; Tue, 10 Feb 2015 13:20:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101320.t1ADKYef098058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278509 - in stable/8/sys/dev/usb: . controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:20:36 -0000 Author: hselasky Date: Tue Feb 10 13:20:34 2015 New Revision: 278509 URL: https://svnweb.freebsd.org/changeset/base/278509 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/usb_core.h stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/controller/xhci.c Tue Feb 10 13:20:34 2015 (r278509) @@ -1840,6 +1840,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2079,7 +2088,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/8/sys/dev/usb/usb_core.h ============================================================================== --- stable/8/sys/dev/usb/usb_core.h Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/usb_core.h Tue Feb 10 13:20:34 2015 (r278509) @@ -97,6 +97,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/usb_transfer.c Tue Feb 10 13:20:34 2015 (r278509) @@ -1344,6 +1344,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1448,6 +1471,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:25:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 512F8C52; Tue, 10 Feb 2015 13:25:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32444D17; Tue, 10 Feb 2015 13:25:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADPUVc000359; Tue, 10 Feb 2015 13:25:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADPT3t000357; Tue, 10 Feb 2015 13:25:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101325.t1ADPT3t000357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278510 - in stable/10/sys: conf dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:25:30 -0000 Author: hselasky Date: Tue Feb 10 13:25:29 2015 New Revision: 278510 URL: https://svnweb.freebsd.org/changeset/base/278510 Log: MFC r278074: Optimise allocation of USB DMA structures. By default don't double map allocations if only one element should be allocated per page cache. Make one allocation per element compile time configurable. Fix a comment while at it. Modified: stable/10/sys/conf/options stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue Feb 10 13:20:34 2015 (r278509) +++ stable/10/sys/conf/options Tue Feb 10 13:25:29 2015 (r278510) @@ -663,6 +663,7 @@ USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h +USB_DMA_SINGLE_ALLOC opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h UKBD_DFLT_KEYMAP opt_ukbd.h Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:20:34 2015 (r278509) +++ stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:25:29 2015 (r278510) @@ -237,7 +237,11 @@ usbd_transfer_setup_sub_malloc(struct us n_obj = 1; } else { /* compute number of objects per page */ +#ifdef USB_DMA_SINGLE_ALLOC + n_obj = 1; +#else n_obj = (USB_PAGE_SIZE / size); +#endif /* * Compute number of DMA chunks, rounded up * to nearest one: @@ -273,15 +277,33 @@ usbd_transfer_setup_sub_malloc(struct us &parm->curr_xfer->xroot->dma_parent_tag; } - if (ppc) { - *ppc = parm->xfer_page_cache_ptr; + if (ppc != NULL) { + if (n_obj != 1) + *ppc = parm->xfer_page_cache_ptr; + else + *ppc = parm->dma_page_cache_ptr; } r = count; /* set remainder count */ z = n_obj * size; /* set allocation size */ pc = parm->xfer_page_cache_ptr; pg = parm->dma_page_ptr; - for (x = 0; x != n_dma_pc; x++) { + if (n_obj == 1) { + /* + * Avoid mapping memory twice if only a single object + * should be allocated per page cache: + */ + for (x = 0; x != n_dma_pc; x++) { + if (usb_pc_alloc_mem(parm->dma_page_cache_ptr, + pg, z, align)) { + return (1); /* failure */ + } + /* Make room for one DMA page cache and "n_dma_pg" pages */ + parm->dma_page_cache_ptr++; + pg += n_dma_pg; + } + } else { + for (x = 0; x != n_dma_pc; x++) { if (r < n_obj) { /* compute last remainder */ @@ -294,7 +316,7 @@ usbd_transfer_setup_sub_malloc(struct us } /* Set beginning of current buffer */ buf = parm->dma_page_cache_ptr->buffer; - /* Make room for one DMA page cache and one page */ + /* Make room for one DMA page cache and "n_dma_pg" pages */ parm->dma_page_cache_ptr++; pg += n_dma_pg; @@ -314,6 +336,7 @@ usbd_transfer_setup_sub_malloc(struct us } mtx_unlock(pc->tag_parent->mtx); } + } } parm->xfer_page_cache_ptr = pc; From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:29:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99B22FB0; Tue, 10 Feb 2015 13:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84036D58; Tue, 10 Feb 2015 13:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADTjqj000898; Tue, 10 Feb 2015 13:29:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADTjXf000897; Tue, 10 Feb 2015 13:29:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101329.t1ADTjXf000897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278511 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:29:45 -0000 Author: hselasky Date: Tue Feb 10 13:29:44 2015 New Revision: 278511 URL: https://svnweb.freebsd.org/changeset/base/278511 Log: MFC r278103: The flowid and hashtype should be copied from the originating packet when fragmenting IP packets to preserve the order of the packets in a stream. Else the resulting fragments can be sent out of order when the hardware supports multiple transmit rings. Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/ip_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Tue Feb 10 13:25:29 2015 (r278510) +++ stable/10/sys/netinet/ip_output.c Tue Feb 10 13:29:44 2015 (r278511) @@ -798,6 +798,10 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } + /* make sure the flowid is the same for the fragmented mbufs */ + M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); + m->m_pkthdr.flowid = m0->m_pkthdr.flowid; + /* copy multicast flag, if any */ m->m_flags |= (m0->m_flags & M_MCAST); /* * In the first mbuf, leave room for the link header, then From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:36:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F5984C0; Tue, 10 Feb 2015 13:36:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49BE0E2C; Tue, 10 Feb 2015 13:36:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADacFs005378; Tue, 10 Feb 2015 13:36:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADacrn005377; Tue, 10 Feb 2015 13:36:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101336.t1ADacrn005377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278513 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:36:38 -0000 Author: hselasky Date: Tue Feb 10 13:36:37 2015 New Revision: 278513 URL: https://svnweb.freebsd.org/changeset/base/278513 Log: MFC r278103: The flowid and hashtype should be copied from the originating packet when fragmenting IP packets to preserve the order of the packets in a stream. Else the resulting fragments can be sent out of order when the hardware supports multiple transmit rings. Sponsored by: Mellanox Technologies Modified: stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Tue Feb 10 13:34:45 2015 (r278512) +++ stable/9/sys/netinet/ip_output.c Tue Feb 10 13:36:37 2015 (r278513) @@ -787,7 +787,11 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } - m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG; + /* copy multicast and flowid flag, if any */ + m->m_flags |= (m0->m_flags & (M_FLOWID | M_MCAST)) | M_FRAG; + /* make sure the flowid is the same for the fragmented mbufs */ + M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); + m->m_pkthdr.flowid = m0->m_pkthdr.flowid; /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:43:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407B07C6; Tue, 10 Feb 2015 13:43:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B106F1B; Tue, 10 Feb 2015 13:43:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADhOua009761; Tue, 10 Feb 2015 13:43:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADhOkI009760; Tue, 10 Feb 2015 13:43:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101343.t1ADhOkI009760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278514 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:43:24 -0000 Author: hselasky Date: Tue Feb 10 13:43:23 2015 New Revision: 278514 URL: https://svnweb.freebsd.org/changeset/base/278514 Log: Append to the MFC of r278103 that we also pass along the M_FLOWID flag. Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/ip_output.c Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Tue Feb 10 13:36:37 2015 (r278513) +++ stable/10/sys/netinet/ip_output.c Tue Feb 10 13:43:23 2015 (r278514) @@ -801,8 +801,8 @@ smart_frag_failure: /* make sure the flowid is the same for the fragmented mbufs */ M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); m->m_pkthdr.flowid = m0->m_pkthdr.flowid; - /* copy multicast flag, if any */ - m->m_flags |= (m0->m_flags & M_MCAST); + /* copy multicast and flowid flags, if any */ + m->m_flags |= (m0->m_flags & (M_MCAST | M_FLOWID)); /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:45:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE3E7BC0; Tue, 10 Feb 2015 13:45:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 803F3F4E; Tue, 10 Feb 2015 13:45:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADjuai010294; Tue, 10 Feb 2015 13:45:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADjuIT010293; Tue, 10 Feb 2015 13:45:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101345.t1ADjuIT010293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278515 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:45:56 -0000 Author: hselasky Date: Tue Feb 10 13:45:55 2015 New Revision: 278515 URL: https://svnweb.freebsd.org/changeset/base/278515 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/10/sys/dev/usb/usb_msctest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/10/sys/dev/usb/usb_msctest.c Tue Feb 10 13:43:23 2015 (r278514) +++ stable/10/sys/dev/usb/usb_msctest.c Tue Feb 10 13:45:55 2015 (r278515) @@ -112,6 +112,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -695,10 +697,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -711,11 +731,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -742,13 +760,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, - UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:47:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89282DFC; Tue, 10 Feb 2015 13:47:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59350F62; Tue, 10 Feb 2015 13:47:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADlUXt010572; Tue, 10 Feb 2015 13:47:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADlUYP010571; Tue, 10 Feb 2015 13:47:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101347.t1ADlUYP010571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278516 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:47:30 -0000 Author: hselasky Date: Tue Feb 10 13:47:29 2015 New Revision: 278516 URL: https://svnweb.freebsd.org/changeset/base/278516 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/9/sys/dev/usb/usb_msctest.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Tue Feb 10 13:45:55 2015 (r278515) +++ stable/9/sys/dev/usb/usb_msctest.c Tue Feb 10 13:47:29 2015 (r278516) @@ -108,6 +108,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -691,10 +693,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -707,11 +727,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -738,13 +756,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, - UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 13:48:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 027B9FF2; Tue, 10 Feb 2015 13:48:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7EF4F7A; Tue, 10 Feb 2015 13:48:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADmnnH010807; Tue, 10 Feb 2015 13:48:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADmnCg010806; Tue, 10 Feb 2015 13:48:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101348.t1ADmnCg010806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278517 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:48:50 -0000 Author: hselasky Date: Tue Feb 10 13:48:49 2015 New Revision: 278517 URL: https://svnweb.freebsd.org/changeset/base/278517 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/8/sys/dev/usb/usb_msctest.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Tue Feb 10 13:47:29 2015 (r278516) +++ stable/8/sys/dev/usb/usb_msctest.c Tue Feb 10 13:48:49 2015 (r278517) @@ -106,6 +106,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -675,10 +677,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -691,11 +711,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -722,13 +740,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, - UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 14:11:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 216F0913; Tue, 10 Feb 2015 14:11:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 022C12CC; Tue, 10 Feb 2015 14:11:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AEBOUG023902; Tue, 10 Feb 2015 14:11:24 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AEBO27023898; Tue, 10 Feb 2015 14:11:24 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201502101411.t1AEBO27023898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 10 Feb 2015 14:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278518 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 14:11:25 -0000 Author: zbb Date: Tue Feb 10 14:11:23 2015 New Revision: 278518 URL: https://svnweb.freebsd.org/changeset/base/278518 Log: Resolve cache line size from CP15 Switch the cache line size during invalidations/flushes to be read from CP15 cache type register. Submitted by: Wojciech Macek Reviewed by: ian, imp Obtained from: Semihalf Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Feb 10 13:48:49 2015 (r278517) +++ head/sys/arm/arm/cpufunc.c Tue Feb 10 14:11:23 2015 (r278518) @@ -837,6 +837,11 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) +/* Global cache line sizes, use 32 as default */ +int arm_dcache_min_line_size = 32; +int arm_icache_min_line_size = 32; +int arm_idcache_min_line_size = 32; + static void get_cachetype_cp15(void); /* Additional cache information local to this file. Log2 of some of the @@ -868,6 +873,12 @@ get_cachetype_cp15() goto out; if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { + /* Resolve minimal cache line sizes */ + arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); + arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); + arm_idcache_min_line_size = + min(arm_icache_min_line_size, arm_dcache_min_line_size); + __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); arm_cache_level = clevel; Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Tue Feb 10 13:48:49 2015 (r278517) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Tue Feb 10 14:11:23 2015 (r278518) @@ -41,6 +41,12 @@ __FBSDID("$FreeBSD$"); .word _C_LABEL(arm_cache_loc) .Lcache_type: .word _C_LABEL(arm_cache_type) +.Larmv7_dcache_line_size: + .word _C_LABEL(arm_dcache_min_line_size) +.Larmv7_icache_line_size: + .word _C_LABEL(arm_icache_min_line_size) +.Larmv7_idcache_line_size: + .word _C_LABEL(arm_idcache_min_line_size) .Lway_mask: .word 0x3ff .Lmax_index: @@ -180,14 +186,9 @@ ENTRY(armv7_idcache_wbinv_all) RET END(armv7_idcache_wbinv_all) -/* XXX Temporary set it to 32 for MV cores, however this value should be - * get from Cache Type register - */ -.Larmv7_line_size: - .word 32 - ENTRY(armv7_dcache_wb_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -202,7 +203,8 @@ ENTRY(armv7_dcache_wb_range) END(armv7_dcache_wb_range) ENTRY(armv7_dcache_wbinv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -221,7 +223,8 @@ END(armv7_dcache_wbinv_range) * must use wb-inv of the entire cache. */ ENTRY(armv7_dcache_inv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_dcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -236,7 +239,8 @@ ENTRY(armv7_dcache_inv_range) END(armv7_dcache_inv_range) ENTRY(armv7_idcache_wbinv_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_idcache_line_size + ldr ip, [ip] sub r3, ip, #1 and r2, r0, r3 add r1, r1, r2 @@ -264,7 +268,8 @@ ENTRY_NP(armv7_icache_sync_all) END(armv7_icache_sync_all) ENTRY_NP(armv7_icache_sync_range) - ldr ip, .Larmv7_line_size + ldr ip, .Larmv7_icache_line_size + ldr ip, [ip] .Larmv7_sync_next: mcr CP15_ICIMVAU(r0) mcr CP15_DCCMVAC(r0) Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Tue Feb 10 13:48:49 2015 (r278517) +++ head/sys/arm/arm/elf_trampoline.c Tue Feb 10 14:11:23 2015 (r278518) @@ -115,6 +115,10 @@ int arm_pcache_unified; int arm_dcache_align; int arm_dcache_align_mask; +int arm_dcache_min_line_size = 32; +int arm_icache_min_line_size = 32; +int arm_idcache_min_line_size = 32; + u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; @@ -277,6 +281,13 @@ get_cachetype_cp15() goto out; if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { + /* Resolve minimal cache line sizes */ + arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); + arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); + arm_idcache_min_line_size = + (arm_dcache_min_line_size > arm_icache_min_line_size ? + arm_icache_min_line_size : arm_dcache_min_line_size); + __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); arm_cache_level = clevel; Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Feb 10 13:48:49 2015 (r278517) +++ head/sys/arm/include/armreg.h Tue Feb 10 14:11:23 2015 (r278518) @@ -320,6 +320,9 @@ #define CPU_CT_S (1U << 24) /* split cache */ #define CPU_CT_CTYPE(x) (((x) >> 25) & 0xf) /* cache type */ #define CPU_CT_FORMAT(x) ((x) >> 29) +/* Cache type register definitions for ARM v7 */ +#define CPU_CT_IMINLINE(x) ((x) & 0xf) /* I$ min line size */ +#define CPU_CT_DMINLINE(x) (((x) >> 16) & 0xf) /* D$ min line size */ #define CPU_CT_CTYPE_WT 0 /* write-through */ #define CPU_CT_CTYPE_WB1 1 /* write-back, clean w/ read */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 14:18:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 137A3B53; Tue, 10 Feb 2015 14:18:53 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF1D633D; Tue, 10 Feb 2015 14:18:52 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C43F4B91F; Tue, 10 Feb 2015 09:18:51 -0500 (EST) From: John Baldwin To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Date: Tue, 10 Feb 2015 09:16:55 -0500 Message-ID: <1516483.e0EXgdk9ur@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502092313.t19NDpoS083043@svn.freebsd.org> References: <201502092313.t19NDpoS083043@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 10 Feb 2015 09:18:51 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 14:18:53 -0000 On Monday, February 09, 2015 11:13:51 PM Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 23:13:50 2015 > New Revision: 278479 > URL: https://svnweb.freebsd.org/changeset/base/278479 > > Log: > Notify devd(8) when a process crashed. > > This change implements a notification (via devctl) to userland when > the kernel produces coredumps after a process has crashed. > devd can then run a specific command to produce a human readable crash > report. The command is most usually a helper that runs gdb/lldb > commands on the file/coredump pair. It's possible to use this > functionality for implementing automatic generation of crash reports. > > devd(8) will be notified of the full path of the binary that crashed and > the full path of the coredump file. I think this is a very useful feature and I think this is fine to be in the tree as-is for now. My only note is that this is a bit of feature creep for devd (this isn't a device notification, this is a system event notification). As such, I think it might be worth thinking if we (collectively) want to think about having a separate framework at all for system event notification. You could possibly publish other interesting events this way. For example, Isilon currently has a patch to log(9) Witness LORs. I personally think it's a bit hackish and potentially unreliable. A much nicer interface if you want to capture such things would be to publish an event for each logged LOR instead. Machine checks are another example of something that might be nice to publish (though you could possibly make the case that those would not be inappropriate to publish via devd since actual hardware is involved). Disk and PCI errors are another class of thing that it would be nice to publish in an easier to programmaticaly parse manner. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:06:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67289B0B; Tue, 10 Feb 2015 15:06:04 +0000 (UTC) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32920A17; Tue, 10 Feb 2015 15:06:04 +0000 (UTC) Received: by iecvy18 with SMTP id vy18so5849836iec.13; Tue, 10 Feb 2015 07:06:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ENAtZJ01tzIe+iDxlg2fuOO17ZJ77u3WuNchV3mF88M=; b=RtcDGtclkSu5MZ3Oflv81crJGIF7Y4tAQZs97iIi2xzVm1jGPMEL3GvozgV/78jEFk xv1L9Vdo8GMI03Z6RCsXTSkp35NkESbSoC8YPl7Vr3Ryh6t5mZBStu3B/ga+lf7EDHUk BazrEPIo+ibIdsvjCaxZEWXY52bTrBnuCnFMVywkpdUZl+FR59d8nGeu7nC1yXsv/WRw emzBCITG89bboJ2+I4gcXlgTqVskl2yBu1n+YeIASoP6WmnSH/D1zCQeHqk0uEEuNcBp eWTGlWfrEQ/no+EhxNLJ/f1HO9b5Fzcw1v9nrUfNKQGfeca+i+afFgHpVDltmx2Il5yG AZ+w== MIME-Version: 1.0 X-Received: by 10.50.93.70 with SMTP id cs6mr23380250igb.6.1423580763416; Tue, 10 Feb 2015 07:06:03 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.17.7 with HTTP; Tue, 10 Feb 2015 07:06:03 -0800 (PST) In-Reply-To: <1516483.e0EXgdk9ur@ralph.baldwin.cx> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> Date: Tue, 10 Feb 2015 07:06:03 -0800 X-Google-Sender-Auth: RLjUcxn0r4as2h-RCd1KabAsj_4 Message-ID: Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:06:04 -0000 On 10 February 2015 at 06:16, John Baldwin wrote: > On Monday, February 09, 2015 11:13:51 PM Rui Paulo wrote: >> Author: rpaulo >> Date: Mon Feb 9 23:13:50 2015 >> New Revision: 278479 >> URL: https://svnweb.freebsd.org/changeset/base/278479 >> >> Log: >> Notify devd(8) when a process crashed. >> >> This change implements a notification (via devctl) to userland when >> the kernel produces coredumps after a process has crashed. >> devd can then run a specific command to produce a human readable crash >> report. The command is most usually a helper that runs gdb/lldb >> commands on the file/coredump pair. It's possible to use this >> functionality for implementing automatic generation of crash reports. >> >> devd(8) will be notified of the full path of the binary that crashed and >> the full path of the coredump file. > > I think this is a very useful feature and I think this is fine to be in the > tree as-is for now. My only note is that this is a bit of feature creep for > devd (this isn't a device notification, this is a system event notification). > As such, I think it might be worth thinking if we (collectively) want to think > about having a separate framework at all for system event notification. You > could possibly publish other interesting events this way. For example, Isilon > currently has a patch to log(9) Witness LORs. I personally think it's a bit > hackish and potentially unreliable. A much nicer interface if you want to > capture such things would be to publish an event for each logged LOR instead. > Machine checks are another example of something that might be nice to publish > (though you could possibly make the case that those would not be inappropriate > to publish via devd since actual hardware is involved). Disk and PCI errors > are another class of thing that it would be nice to publish in an easier to > programmaticaly parse manner. Cool, so someone's going to add multi-subscriber support to /dev/devctl ? I think devd grows these things because it's easier than teaching the devctl interface to support multiple listeners. -adrian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:13:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16C70D02; Tue, 10 Feb 2015 15:13:01 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C84AE9; Tue, 10 Feb 2015 15:13:00 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YLCUe-000Hmi-11; Tue, 10 Feb 2015 18:12:52 +0300 Date: Tue, 10 Feb 2015 18:12:51 +0300 From: Slawa Olhovchenkov To: Adrian Chadd Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210151251.GA67127@zxy.spb.ru> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:13:01 -0000 On Tue, Feb 10, 2015 at 07:06:03AM -0800, Adrian Chadd wrote: > On 10 February 2015 at 06:16, John Baldwin wrote: > > On Monday, February 09, 2015 11:13:51 PM Rui Paulo wrote: > >> Author: rpaulo > >> Date: Mon Feb 9 23:13:50 2015 > >> New Revision: 278479 > >> URL: https://svnweb.freebsd.org/changeset/base/278479 > >> > >> Log: > >> Notify devd(8) when a process crashed. > >> > >> This change implements a notification (via devctl) to userland when > >> the kernel produces coredumps after a process has crashed. > >> devd can then run a specific command to produce a human readable crash > >> report. The command is most usually a helper that runs gdb/lldb > >> commands on the file/coredump pair. It's possible to use this > >> functionality for implementing automatic generation of crash reports. > >> > >> devd(8) will be notified of the full path of the binary that crashed and > >> the full path of the coredump file. > > > > I think this is a very useful feature and I think this is fine to be in the > > tree as-is for now. My only note is that this is a bit of feature creep for > > devd (this isn't a device notification, this is a system event notification). > > As such, I think it might be worth thinking if we (collectively) want to think > > about having a separate framework at all for system event notification. You > > could possibly publish other interesting events this way. For example, Isilon > > currently has a patch to log(9) Witness LORs. I personally think it's a bit > > hackish and potentially unreliable. A much nicer interface if you want to > > capture such things would be to publish an event for each logged LOR instead. > > Machine checks are another example of something that might be nice to publish > > (though you could possibly make the case that those would not be inappropriate > > to publish via devd since actual hardware is involved). Disk and PCI errors > > are another class of thing that it would be nice to publish in an easier to > > programmaticaly parse manner. > > Cool, so someone's going to add multi-subscriber support to /dev/devctl ? > > I think devd grows these things because it's easier than teaching the > devctl interface to support multiple listeners. /dev/eventctl and eventd? And, may be, rename /dev/devctl2 to /dev/eventctl too. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:15:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29A3FE66; Tue, 10 Feb 2015 15:15:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1589AB01; Tue, 10 Feb 2015 15:15:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AFF82E052540; Tue, 10 Feb 2015 15:15:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AFF83W052539; Tue, 10 Feb 2015 15:15:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201502101515.t1AFF83W052539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Feb 2015 15:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278519 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:15:09 -0000 Author: imp Date: Tue Feb 10 15:15:08 2015 New Revision: 278519 URL: https://svnweb.freebsd.org/changeset/base/278519 Log: Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they are passed down properly when there's more than one. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Feb 10 14:11:23 2015 (r278518) +++ head/sys/conf/kern.pre.mk Tue Feb 10 15:15:08 2015 (r278519) @@ -186,7 +186,7 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} -MKMODULESENV+= MODULES_EXTRA=${MODULES_EXTRA} WITHOUT_MODULES=${WITHOUT_MODULES} +MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}" .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:37:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 594F7326; Tue, 10 Feb 2015 15:37:06 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D52AD2E; Tue, 10 Feb 2015 15:37:06 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B66CFB91E; Tue, 10 Feb 2015 10:37:04 -0500 (EST) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r278479 - in head: etc sys/kern Date: Tue, 10 Feb 2015 10:36:51 -0500 Message-ID: <2907775.GXqUUp6Hz6@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 10 Feb 2015 10:37:04 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:37:06 -0000 On Tuesday, February 10, 2015 07:06:03 AM Adrian Chadd wrote: > On 10 February 2015 at 06:16, John Baldwin wrote: > > On Monday, February 09, 2015 11:13:51 PM Rui Paulo wrote: > >> Author: rpaulo > >> Date: Mon Feb 9 23:13:50 2015 > >> New Revision: 278479 > >> URL: https://svnweb.freebsd.org/changeset/base/278479 > >> > >> Log: > >> Notify devd(8) when a process crashed. > >> > >> This change implements a notification (via devctl) to userland when > >> the kernel produces coredumps after a process has crashed. > >> devd can then run a specific command to produce a human readable crash > >> report. The command is most usually a helper that runs gdb/lldb > >> commands on the file/coredump pair. It's possible to use this > >> functionality for implementing automatic generation of crash reports. > >> > >> devd(8) will be notified of the full path of the binary that crashed > >> and > >> the full path of the coredump file. > > > > I think this is a very useful feature and I think this is fine to be in > > the > > tree as-is for now. My only note is that this is a bit of feature creep > > for devd (this isn't a device notification, this is a system event > > notification). As such, I think it might be worth thinking if we > > (collectively) want to think about having a separate framework at all for > > system event notification. You could possibly publish other interesting > > events this way. For example, Isilon currently has a patch to log(9) > > Witness LORs. I personally think it's a bit hackish and potentially > > unreliable. A much nicer interface if you want to capture such things > > would be to publish an event for each logged LOR instead. Machine checks > > are another example of something that might be nice to publish (though > > you could possibly make the case that those would not be inappropriate to > > publish via devd since actual hardware is involved). Disk and PCI errors > > are another class of thing that it would be nice to publish in an easier > > to programmaticaly parse manner. > > Cool, so someone's going to add multi-subscriber support to /dev/devctl ? Eh, devd publishes /var/run/devd.pipe already which supports multiple subscribers. I think that was one of the intentional design decisions was to handle multiple subscribers in userland rather than the kernel. > I think devd grows these things because it's easier than teaching the > devctl interface to support multiple listeners. That wasn't really my question. My question was if we want distinct streams or if we want want unified stream. Having a unified stream might very well make sense (and if so we could rename devd to make that more obvious). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:37:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E67AC463; Tue, 10 Feb 2015 15:37:21 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 75FE4D33; Tue, 10 Feb 2015 15:37:21 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 90077D6425D; Wed, 11 Feb 2015 02:37:13 +1100 (AEDT) Date: Wed, 11 Feb 2015 02:37:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jung-uk Kim Subject: Re: svn commit: r278474 - head/sys/sys In-Reply-To: <54D92CE8.1030803@FreeBSD.org> Message-ID: <20150211014516.N1511@besplex.bde.org> References: <201502092103.t19L3OAn013792@svn.freebsd.org> <1698688.fEq0HxqPxg@ralph.baldwin.cx> <54D92CE8.1030803@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=7oXREgloDtZ4TWZj2REA:9 a=3_mRkF-kOeVxiea6:21 a=zPFTeV5YefL7qYvv:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:37:22 -0000 On Mon, 9 Feb 2015, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 02/09/2015 16:08, John Baldwin wrote: >> On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: >>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 >>> URL: https://svnweb.freebsd.org/changeset/base/278474 >>> >>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation >>> for bitsets and use this to implement CPU_COUNT() to count the >>> number of CPUs in a cpuset. >>> >>> MFC after: 2 weeks >> >> Yes, __builtin_popcnt() works with GCC 4.2. It should also allow >> the compiler to DTRT in userland uses of this if -msse4.2 is >> enabled. > > Back in 2012, when I submitted a similar patch, bde noted > __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* because > it emits a library call. Also, the gcc library uses a fairly slow implementation (a 256-byte lookup table), even in gcc-4.8. On modern CPUs, this is probably slower than the bit-magic algorithm in . In the usual case where the arch doesn't support popcount in hardware, clang generates inline code that uses much the same bit-magic algorithm as in . It also uses this for its libgcc.a. gcc48 only has library support for 32-bit and 64-bit integers on 64-bit arches. clang also supports a "ti2" (128-bit?) integer type in its libgcc.a. I don't know how to test this. (__int128 works for declaring 128-bit variables, but the only popcount builtins according to the available documentation (strings clang) are *popcount(), *popcountl() and *popcountll(), and ll is the same as l on amd64. The implementation in is a silly optimization. It also supports 16-bit integers but not 64-bit ones. If optimizing popcount was important, then it would be done in libc first and would support 64-bit integers. It would use the builtin iff it is available and doesn't reduce to a library call that is slower than the bit-magic algorithm. This is not easy, since compilers don't even tell you if their builtins reduce to library calls, and whether they do depends on the arch (*). Older compilers also don't tell you if their builtins exist. Some builtins have a type-generic API, but unfortunately this not one. This means that the builtin can barely do as well as the bit-magic inline function for 16-bit integers since you cannot even write the name of the builtin for this case (you have to promote to 32 bits; popcount on this is probably faster than bit-magic, but bit-magic has more bits to look at). Similarly for 128-bit intergers. (*) Since generic amd64 and i386 have no popcount instruction in hardware, using builtin popcount rarely uses the hardware instruction (it takes special -march to get it, and the resulting binaries don't run on generic CPUs). Thus using the builtin works worse than using the old inline function in most cases. Except, the old inline function is only implemented in the kernel, and isn't implemented for 64-bit integers. gcc-4.8 generates the hardware popcount if the arch supports it. Only its library popcounts are slower than clang's. gcc-4.2 presumably doesn't generate the hardware popcount, since it doesn't have a -march for newer CPUs that have it. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:43:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4250762A; Tue, 10 Feb 2015 15:43:14 +0000 (UTC) Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [54.149.88.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19C37E10; Tue, 10 Feb 2015 15:43:13 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YLCy0-0002b7-4H; Tue, 10 Feb 2015 15:43:12 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1AFh9NR081932; Tue, 10 Feb 2015 08:43:09 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19DtXoobPm6gQbvIC+dlQaK Message-ID: <1423582989.80968.16.camel@freebsd.org> Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Ian Lepore To: Adrian Chadd Date: Tue, 10 Feb 2015 08:43:09 -0700 In-Reply-To: References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:43:14 -0000 On Tue, 2015-02-10 at 07:06 -0800, Adrian Chadd wrote: > On 10 February 2015 at 06:16, John Baldwin wrote: > > On Monday, February 09, 2015 11:13:51 PM Rui Paulo wrote: > >> Author: rpaulo > >> Date: Mon Feb 9 23:13:50 2015 > >> New Revision: 278479 > >> URL: https://svnweb.freebsd.org/changeset/base/278479 > >> > >> Log: > >> Notify devd(8) when a process crashed. > >> > >> This change implements a notification (via devctl) to userland when > >> the kernel produces coredumps after a process has crashed. > >> devd can then run a specific command to produce a human readable crash > >> report. The command is most usually a helper that runs gdb/lldb > >> commands on the file/coredump pair. It's possible to use this > >> functionality for implementing automatic generation of crash reports. > >> > >> devd(8) will be notified of the full path of the binary that crashed and > >> the full path of the coredump file. > > > > I think this is a very useful feature and I think this is fine to be in the > > tree as-is for now. My only note is that this is a bit of feature creep for > > devd (this isn't a device notification, this is a system event notification). > > As such, I think it might be worth thinking if we (collectively) want to think > > about having a separate framework at all for system event notification. You > > could possibly publish other interesting events this way. For example, Isilon > > currently has a patch to log(9) Witness LORs. I personally think it's a bit > > hackish and potentially unreliable. A much nicer interface if you want to > > capture such things would be to publish an event for each logged LOR instead. > > Machine checks are another example of something that might be nice to publish > > (though you could possibly make the case that those would not be inappropriate > > to publish via devd since actual hardware is involved). Disk and PCI errors > > are another class of thing that it would be nice to publish in an easier to > > programmaticaly parse manner. > > Cool, so someone's going to add multi-subscriber support to /dev/devctl ? > I don't see how you get that from the foregoing at all. Doing fan-out in the kernel is hard, and doing it in userland is easier, so the existing devd model could be an appropriate one to follow for a general "kernel events which are not hardware events" system. > I think devd grows these things because it's easier than teaching the > devctl interface to support multiple listeners. Until recently, devd only grew additional support for things which are device-related, modulo the zfs stuff that I don't know much about. I was under the impression that that also was device-related in some way, such as zfs reporting on device errors or attach/remove and things related to that (like health of the pool(s) affected by the device change). Maybe the zfs stuff was the beginning of the mission creep and still had enough of a device-related fig leaf to not look like creep. But there's no disguising the fact that post-processing core dumps has absolutely nothing to do with devices. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 15:58:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC4FEA20; Tue, 10 Feb 2015 15:58:36 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 822AEF1A; Tue, 10 Feb 2015 15:58:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5A5C7B91E; Tue, 10 Feb 2015 10:58:35 -0500 (EST) From: John Baldwin To: Bruce Evans Subject: Re: svn commit: r278474 - head/sys/sys Date: Tue, 10 Feb 2015 10:58:24 -0500 Message-ID: <12119175.I8M1urv6pf@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150211014516.N1511@besplex.bde.org> References: <201502092103.t19L3OAn013792@svn.freebsd.org> <54D92CE8.1030803@FreeBSD.org> <20150211014516.N1511@besplex.bde.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 10 Feb 2015 10:58:35 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 15:58:36 -0000 On Wednesday, February 11, 2015 02:37:05 AM Bruce Evans wrote: > On Mon, 9 Feb 2015, Jung-uk Kim wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > On 02/09/2015 16:08, John Baldwin wrote: > >> On Monday, February 09, 2015 09:03:24 PM John Baldwin wrote: > >>> Author: jhb Date: Mon Feb 9 21:03:23 2015 New Revision: 278474 > >>> URL: https://svnweb.freebsd.org/changeset/base/278474 > >>> > >>> Log: Use __builtin_popcnt() to implement a BIT_COUNT() operation > >>> for bitsets and use this to implement CPU_COUNT() to count the > >>> number of CPUs in a cpuset. > >>> > >>> MFC after: 2 weeks > >> > >> Yes, __builtin_popcnt() works with GCC 4.2. It should also allow > >> the compiler to DTRT in userland uses of this if -msse4.2 is > >> enabled. > > > > Back in 2012, when I submitted a similar patch, bde noted > > __builtin_popcount*() cannot be used with GCC 4.2 for *kernel* because > > it emits a library call. > > (*) Since generic amd64 and i386 have no popcount instruction in hardware, > using builtin popcount rarely uses the hardware instruction (it takes > special -march to get it, and the resulting binaries don't run on generic > CPUs). Thus using the builtin works worse than using the old inline > function in most cases. Except, the old inline function is only > implemented in the kernel, and isn't implemented for 64-bit integers. > > gcc-4.8 generates the hardware popcount if the arch supports it. Only > its library popcounts are slower than clang's. gcc-4.2 presumably > doesn't generate the hardware popcount, since it doesn't have a -march > for newer CPUs that have it. I don't really expect CPU_COUNT() to be used in places where performance is of the utmost importance. (For example in igb I use it in attach to enumerate the set of CPUs to bind queues to, but nowhere else.) I can implement a bitcount64 by using bitcount32 on both halves unless someone has a better suggestion and we can use the bitcount routines instead of __builtin_popcountl in BIT_COUNT() for GCC if we care that strongly about it. Alternatively, I'm happy to implement the libcall for GCC 4.2 for the kernel so that __builtin_popcountl() works. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 16:17:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7AC811E; Tue, 10 Feb 2015 16:17:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A957A151; Tue, 10 Feb 2015 16:17:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AGHH95081340; Tue, 10 Feb 2015 16:17:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AGHH12081338; Tue, 10 Feb 2015 16:17:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502101617.t1AGHH12081338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 10 Feb 2015 16:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278521 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 16:17:18 -0000 Author: trasz Date: Tue Feb 10 16:17:16 2015 New Revision: 278521 URL: https://svnweb.freebsd.org/changeset/base/278521 Log: Restore ABI compatibility, broken in r273127. Note that while this fixes ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8) is neccessary. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs_ioctl.h Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Tue Feb 10 16:01:16 2015 (r278520) +++ head/sys/fs/autofs/autofs.c Tue Feb 10 16:17:16 2015 (r278521) @@ -584,6 +584,34 @@ autofs_ioctl_request(struct autofs_daemo } static int +autofs_ioctl_done_101(struct autofs_daemon_done_101 *add) +{ + struct autofs_request *ar; + + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { + if (ar->ar_id == add->add_id) + break; + } + + if (ar == NULL) { + sx_xunlock(&autofs_softc->sc_lock); + AUTOFS_DEBUG("id %d not found", add->add_id); + return (ESRCH); + } + + ar->ar_error = add->add_error; + ar->ar_wildcards = true; + ar->ar_done = true; + ar->ar_in_progress = false; + cv_broadcast(&autofs_softc->sc_cv); + + sx_xunlock(&autofs_softc->sc_lock); + + return (0); +} + +static int autofs_ioctl_done(struct autofs_daemon_done *add) { struct autofs_request *ar; @@ -658,6 +686,9 @@ autofs_ioctl(struct cdev *dev, u_long cm case AUTOFSREQUEST: return (autofs_ioctl_request( (struct autofs_daemon_request *)arg)); + case AUTOFSDONE101: + return (autofs_ioctl_done_101( + (struct autofs_daemon_done_101 *)arg)); case AUTOFSDONE: return (autofs_ioctl_done( (struct autofs_daemon_done *)arg)); Modified: head/sys/fs/autofs/autofs_ioctl.h ============================================================================== --- head/sys/fs/autofs/autofs_ioctl.h Tue Feb 10 16:01:16 2015 (r278520) +++ head/sys/fs/autofs/autofs_ioctl.h Tue Feb 10 16:17:16 2015 (r278521) @@ -71,6 +71,21 @@ struct autofs_daemon_request { char adr_options[MAXPATHLEN]; }; +/* + * Compatibility with 10.1-RELEASE automountd(8). + */ +struct autofs_daemon_done_101 { + /* + * Identifier, copied from adr_id. + */ + int add_id; + + /* + * Error number, possibly returned to userland. + */ + int add_error; +}; + struct autofs_daemon_done { /* * Identifier, copied from adr_id. @@ -87,9 +102,15 @@ struct autofs_daemon_done { * Error number, possibly returned to userland. */ int add_error; + + /* + * Reserved for future use. + */ + int add_spare[7]; }; #define AUTOFSREQUEST _IOR('I', 0x01, struct autofs_daemon_request) -#define AUTOFSDONE _IOW('I', 0x02, struct autofs_daemon_done) +#define AUTOFSDONE101 _IOW('I', 0x02, struct autofs_daemon_done_101) +#define AUTOFSDONE _IOW('I', 0x03, struct autofs_daemon_done) #endif /* !AUTOFS_IOCTL_H */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 16:34:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FE8752A for ; Tue, 10 Feb 2015 16:34:27 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EDD437D for ; Tue, 10 Feb 2015 16:34:27 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AGYRHs024158 for ; Tue, 10 Feb 2015 16:34:27 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1AGYR4u024157 for svn-src-all@freebsd.org; Tue, 10 Feb 2015 16:34:27 GMT (envelope-from bdrewery) Received: (qmail 27866 invoked from network); 10 Feb 2015 10:34:25 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 10 Feb 2015 10:34:25 -0600 Message-ID: <54DA3312.8050709@FreeBSD.org> Date: Tue, 10 Feb 2015 10:34:26 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278521 - head/sys/fs/autofs References: <201502101617.t1AGHH12081338@svn.freebsd.org> In-Reply-To: <201502101617.t1AGHH12081338@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hvAL1Kvs7R0oS14cdtKhSDoSC0AADtqkr" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 16:34:27 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hvAL1Kvs7R0oS14cdtKhSDoSC0AADtqkr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/10/2015 10:17 AM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Tue Feb 10 16:17:16 2015 > New Revision: 278521 > URL: https://svnweb.freebsd.org/changeset/base/278521 >=20 > Log: > Restore ABI compatibility, broken in r273127. Note that while this f= ixes > ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd= (8) > is neccessary. I was going to say __FreeBSD_version should probably be bumped, but I suppose it's unlikely there are any consumers outside of automountd(8) already. An entry in UPDATING may be worth adding for head noting the rebuild need. We don't all read commit logs. > =20 > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/sys/fs/autofs/autofs.c > head/sys/fs/autofs/autofs_ioctl.h >=20 > Modified: head/sys/fs/autofs/autofs.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/autofs/autofs.c Tue Feb 10 16:01:16 2015 (r278520) > +++ head/sys/fs/autofs/autofs.c Tue Feb 10 16:17:16 2015 (r278521) > @@ -584,6 +584,34 @@ autofs_ioctl_request(struct autofs_daemo > } > =20 > static int > +autofs_ioctl_done_101(struct autofs_daemon_done_101 *add) > +{ > + struct autofs_request *ar; > + > + sx_xlock(&autofs_softc->sc_lock); > + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { > + if (ar->ar_id =3D=3D add->add_id) > + break; > + } > + > + if (ar =3D=3D NULL) { > + sx_xunlock(&autofs_softc->sc_lock); > + AUTOFS_DEBUG("id %d not found", add->add_id); > + return (ESRCH); > + } > + > + ar->ar_error =3D add->add_error; > + ar->ar_wildcards =3D true; > + ar->ar_done =3D true; > + ar->ar_in_progress =3D false; > + cv_broadcast(&autofs_softc->sc_cv); > + > + sx_xunlock(&autofs_softc->sc_lock); > + > + return (0); > +} > + > +static int > autofs_ioctl_done(struct autofs_daemon_done *add) > { > struct autofs_request *ar; > @@ -658,6 +686,9 @@ autofs_ioctl(struct cdev *dev, u_long cm > case AUTOFSREQUEST: > return (autofs_ioctl_request( > (struct autofs_daemon_request *)arg)); > + case AUTOFSDONE101: > + return (autofs_ioctl_done_101( > + (struct autofs_daemon_done_101 *)arg)); > case AUTOFSDONE: > return (autofs_ioctl_done( > (struct autofs_daemon_done *)arg)); >=20 > Modified: head/sys/fs/autofs/autofs_ioctl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/autofs/autofs_ioctl.h Tue Feb 10 16:01:16 2015 (r278520= ) > +++ head/sys/fs/autofs/autofs_ioctl.h Tue Feb 10 16:17:16 2015 (r278521= ) > @@ -71,6 +71,21 @@ struct autofs_daemon_request { > char adr_options[MAXPATHLEN]; > }; > =20 > +/* > + * Compatibility with 10.1-RELEASE automountd(8). > + */ > +struct autofs_daemon_done_101 { > + /* > + * Identifier, copied from adr_id. > + */ > + int add_id; > + > + /* > + * Error number, possibly returned to userland. > + */ > + int add_error; > +}; > + > struct autofs_daemon_done { > /* > * Identifier, copied from adr_id. > @@ -87,9 +102,15 @@ struct autofs_daemon_done { > * Error number, possibly returned to userland. > */ > int add_error; > + > + /* > + * Reserved for future use. > + */ > + int add_spare[7]; > }; > =20 > #define AUTOFSREQUEST _IOR('I', 0x01, struct autofs_daemon_request) > -#define AUTOFSDONE _IOW('I', 0x02, struct autofs_daemon_done) > +#define AUTOFSDONE101 _IOW('I', 0x02, struct autofs_daemon_done_101) > +#define AUTOFSDONE _IOW('I', 0x03, struct autofs_daemon_done) > =20 > #endif /* !AUTOFS_IOCTL_H */ >=20 --=20 Regards, Bryan Drewery --hvAL1Kvs7R0oS14cdtKhSDoSC0AADtqkr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU2jMSAAoJEDXXcbtuRpfPNCIIAK9eD/Eufk1wFHncLdi88FAk rZ5lTGSRC0F9ZMnP59mYRpCu9RiYU76Ip+yjQgEE3Ly81/U7PvWROfuOZn6PMbNT f421mNAzrW7EXT9teIfiVV/kS2oQ0cUf04fuWtwIl3sGf4UScw9/0jlI8W37QF8H D71n+msaMwotwAzp1GEW0p7zoR/sGFUgk7dDzFYd5PTzMBLSlkFmdSg3HxT0BtJE wxbHhRwxOSddwbrZkVThjXare2h1TlG3r0NhQ/NsU3EJAluFiQtcF5Piz6Nc1qLj Z2/WSOaFZMipoaV6jaPZO8JiQ/+N0qNKrxvMxOZvNKULfbFuXudr0yImXQo4bPk= =E0jk -----END PGP SIGNATURE----- --hvAL1Kvs7R0oS14cdtKhSDoSC0AADtqkr-- From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 16:34:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91065674; Tue, 10 Feb 2015 16:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4CF38B; Tue, 10 Feb 2015 16:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AGYi6a090552; Tue, 10 Feb 2015 16:34:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AGYgVl090543; Tue, 10 Feb 2015 16:34:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502101634.t1AGYgVl090543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 16:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278522 - in stable/10/sys: amd64/include i386/include kern sys x86/include x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 16:34:44 -0000 Author: jhb Date: Tue Feb 10 16:34:42 2015 New Revision: 278522 URL: https://svnweb.freebsd.org/changeset/base/278522 Log: MFC 273800: Rework virtual machine hypervisor detection. - Move the existing code to x86/x86/identcpu.c since it is x86-specific. - If the CPUID2_HV flag is set, assume a hypervisor is present and query the 0x40000000 leaf to determine the hypervisor vendor ID. Export the vendor ID and the highest supported hypervisor CPUID leaf via hv_vendor[] and hv_high variables, respectively. The hv_vendor[] array is also exported via the hw.hv_vendor sysctl. - Merge the VMWare detection code from tsc.c into the new probe in identcpu.c. Add a VM_GUEST_VMWARE to identify vmware and use that in the TSC code to identify VMWare. Added: stable/10/sys/x86/include/vmware.h - copied unchanged from r273800, head/sys/x86/include/vmware.h Modified: stable/10/sys/amd64/include/md_var.h stable/10/sys/i386/include/md_var.h stable/10/sys/kern/subr_param.c stable/10/sys/sys/systm.h stable/10/sys/x86/x86/identcpu.c stable/10/sys/x86/x86/tsc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/md_var.h ============================================================================== --- stable/10/sys/amd64/include/md_var.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/amd64/include/md_var.h Tue Feb 10 16:34:42 2015 (r278522) @@ -63,6 +63,8 @@ extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; extern u_int cpu_maxphyaddr; extern char ctx_switch_xsave[]; +extern u_int hv_high; +extern char hv_vendor[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/i386/include/md_var.h Tue Feb 10 16:34:42 2015 (r278522) @@ -66,6 +66,8 @@ extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; #endif +extern u_int hv_high; +extern char hv_vendor[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: stable/10/sys/kern/subr_param.c ============================================================================== --- stable/10/sys/kern/subr_param.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/kern/subr_param.c Tue Feb 10 16:34:42 2015 (r278522) @@ -99,7 +99,11 @@ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ long maxpipekva; /* Limit on pipe KVA */ -int vm_guest; /* Running as virtual machine guest? */ +#ifdef XEN +int vm_guest = VM_GUEST_XEN; +#else +int vm_guest = VM_GUEST_NO; /* Running as virtual machine guest? */ +#endif u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ u_long maxdsiz; /* max data size */ @@ -136,7 +140,7 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, "Amount to grow stack on a stack fault"); SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, NULL, 0, sysctl_kern_vm_guest, "A", - "Virtual machine guest detected? (none|generic|xen)"); + "Virtual machine guest detected?"); /* * These have to be allocated somewhere; allocating @@ -154,73 +158,18 @@ static const char *const vm_guest_sysctl "generic", "xen", "hv", + "vmware", NULL }; CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); -#ifndef XEN -static const char *const vm_bnames[] = { - "QEMU", /* QEMU */ - "Plex86", /* Plex86 */ - "Bochs", /* Bochs */ - "Xen", /* Xen */ - "BHYVE", /* bhyve */ - "Seabios", /* KVM */ - NULL -}; - -static const char *const vm_pnames[] = { - "VMware Virtual Platform", /* VMWare VM */ - "Virtual Machine", /* Microsoft VirtualPC */ - "VirtualBox", /* Sun xVM VirtualBox */ - "Parallels Virtual Platform", /* Parallels VM */ - "KVM", /* KVM */ - NULL -}; - - -/* - * Detect known Virtual Machine hosts by inspecting the emulated BIOS. - */ -static enum VM_GUEST -detect_virtual(void) -{ - char *sysenv; - int i; - - sysenv = getenv("smbios.bios.vendor"); - if (sysenv != NULL) { - for (i = 0; vm_bnames[i] != NULL; i++) - if (strcmp(sysenv, vm_bnames[i]) == 0) { - freeenv(sysenv); - return (VM_GUEST_VM); - } - freeenv(sysenv); - } - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - for (i = 0; vm_pnames[i] != NULL; i++) - if (strcmp(sysenv, vm_pnames[i]) == 0) { - freeenv(sysenv); - return (VM_GUEST_VM); - } - freeenv(sysenv); - } - return (VM_GUEST_NO); -} -#endif - /* * Boot time overrides that are not scaled against main memory */ void init_param1(void) { -#ifndef XEN - vm_guest = detect_virtual(); -#else - vm_guest = VM_GUEST_XEN; -#endif + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); if (hz == -1) Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/sys/systm.h Tue Feb 10 16:34:42 2015 (r278522) @@ -73,7 +73,7 @@ extern int vm_guest; /* Running as virt * Keep in sync with vm_guest_sysctl_names[]. */ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV, - VM_LAST }; + VM_GUEST_VMWARE, VM_LAST }; #if defined(WITNESS) || defined(INVARIANTS) void kassert_panic(const char *fmt, ...) __printflike(1, 2); Copied: stable/10/sys/x86/include/vmware.h (from r273800, head/sys/x86/include/vmware.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/x86/include/vmware.h Tue Feb 10 16:34:42 2015 (r278522, copy of r273800, head/sys/x86/include/vmware.h) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2011-2014 Jung-uk Kim + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _X86_VMWARE_H_ +#define _X86_VMWARE_H_ + +#define VMW_HVMAGIC 0x564d5868 +#define VMW_HVPORT 0x5658 +#define VMW_HVCMD_GETVERSION 10 +#define VMW_HVCMD_GETHZ 45 + +static __inline void +vmware_hvcall(u_int cmd, u_int *p) +{ + + __asm __volatile("inl %w3, %0" + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) + : "memory"); +} + +#endif /* !_X86_VMWARE_H_ */ Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/x86/x86/identcpu.c Tue Feb 10 16:34:42 2015 (r278522) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -63,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef __i386__ #define IDENTBLUE_CYRIX486 0 @@ -76,6 +78,7 @@ static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_INTEL_info(void); static void print_INTEL_TLB(u_int data); +static void print_hypervisor_info(void); static void print_svm_info(void); static void print_via_padlock_info(void); static void print_vmx_info(void); @@ -120,6 +123,11 @@ static int hw_clockrate; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &hw_clockrate, 0, "CPU instruction clock rate"); +u_int hv_high; +char hv_vendor[16]; +SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD, hv_vendor, 0, + "Hypervisor vendor"); + static eventhandler_tag tsc_post_tag; static char cpu_brand[48]; @@ -949,7 +957,6 @@ printcpuinfo(void) if (tsc_perf_stat) printf(", performance statistics"); } - } #ifdef __i386__ } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { @@ -967,17 +974,18 @@ printcpuinfo(void) if (*cpu_vendor || cpu_id) printf("\n"); - if (!bootverbose) - return; - - if (cpu_vendor_id == CPU_VENDOR_AMD) - print_AMD_info(); - else if (cpu_vendor_id == CPU_VENDOR_INTEL) - print_INTEL_info(); + if (bootverbose) { + if (cpu_vendor_id == CPU_VENDOR_AMD) + print_AMD_info(); + else if (cpu_vendor_id == CPU_VENDOR_INTEL) + print_INTEL_info(); #ifdef __i386__ - else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) - print_transmeta_info(); + else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) + print_transmeta_info(); #endif + } + + print_hypervisor_info(); } void @@ -1182,6 +1190,99 @@ hook_tsc_freq(void *arg __unused) SYSINIT(hook_tsc_freq, SI_SUB_CONFIGURE, SI_ORDER_ANY, hook_tsc_freq, NULL); +#ifndef XEN +static const char *const vm_bnames[] = { + "QEMU", /* QEMU */ + "Plex86", /* Plex86 */ + "Bochs", /* Bochs */ + "Xen", /* Xen */ + "BHYVE", /* bhyve */ + "Seabios", /* KVM */ + NULL +}; + +static const char *const vm_pnames[] = { + "VMware Virtual Platform", /* VMWare VM */ + "Virtual Machine", /* Microsoft VirtualPC */ + "VirtualBox", /* Sun xVM VirtualBox */ + "Parallels Virtual Platform", /* Parallels VM */ + "KVM", /* KVM */ + NULL +}; + +static void +identify_hypervisor(void) +{ + u_int regs[4]; + char *p; + int i; + + /* + * [RFC] CPUID usage for interaction between Hypervisors and Linux. + * http://lkml.org/lkml/2008/10/1/246 + * + * KB1009458: Mechanisms to determine if software is running in + * a VMware virtual machine + * http://kb.vmware.com/kb/1009458 + */ + if (cpu_feature2 & CPUID2_HV) { + vm_guest = VM_GUEST_VM; + do_cpuid(0x40000000, regs); + if (regs[0] >= 0x40000000) { + hv_high = regs[0]; + ((u_int *)&hv_vendor)[0] = regs[1]; + ((u_int *)&hv_vendor)[1] = regs[2]; + ((u_int *)&hv_vendor)[2] = regs[3]; + hv_vendor[12] = '\0'; + if (strcmp(hv_vendor, "VMwareVMware") == 0) + vm_guest = VM_GUEST_VMWARE; + } + return; + } + + /* + * Examine SMBIOS strings for older hypervisors. + */ + p = getenv("smbios.system.serial"); + if (p != NULL) { + if (strncmp(p, "VMware-", 7) == 0 || strncmp(p, "VMW", 3) == 0) { + vmware_hvcall(VMW_HVCMD_GETVERSION, regs); + if (regs[1] == VMW_HVMAGIC) { + vm_guest = VM_GUEST_VMWARE; + freeenv(p); + return; + } + } + freeenv(p); + } + + /* + * XXX: Some of these entries may not be needed since they were + * added to FreeBSD before the checks above. + */ + p = getenv("smbios.bios.vendor"); + if (p != NULL) { + for (i = 0; vm_bnames[i] != NULL; i++) + if (strcmp(p, vm_bnames[i]) == 0) { + vm_guest = VM_GUEST_VM; + freeenv(p); + return; + } + freeenv(p); + } + p = getenv("smbios.system.product"); + if (p != NULL) { + for (i = 0; vm_pnames[i] != NULL; i++) + if (strcmp(p, vm_pnames[i]) == 0) { + vm_guest = VM_GUEST_VM; + freeenv(p); + return; + } + freeenv(p); + } +} +#endif + /* * Final stage of CPU identification. */ @@ -1213,6 +1314,9 @@ identify_cpu(void) cpu_feature2 = regs[2]; #endif +#ifndef XEN + identify_hypervisor(); +#endif cpu_vendor_id = find_cpu_vendor_id(); /* @@ -2049,3 +2153,11 @@ print_vmx_info(void) ); } } + +static void +print_hypervisor_info(void) +{ + + if (*hv_vendor) + printf("Hypervisor: Origin = \"%s\"\n", hv_vendor); +} Modified: stable/10/sys/x86/x86/tsc.c ============================================================================== --- stable/10/sys/x86/x86/tsc.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/x86/x86/tsc.c Tue Feb 10 16:34:42 2015 (r278522) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "cpufreq_if.h" @@ -108,72 +109,11 @@ static struct timecounter tsc_timecounte 800, /* quality (adjusted in code) */ }; -#define VMW_HVMAGIC 0x564d5868 -#define VMW_HVPORT 0x5658 -#define VMW_HVCMD_GETVERSION 10 -#define VMW_HVCMD_GETHZ 45 - -static __inline void -vmware_hvcall(u_int cmd, u_int *p) -{ - - __asm __volatile("inl %w3, %0" - : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) - : "memory"); -} - -static int +static void tsc_freq_vmware(void) { - char hv_sig[13]; u_int regs[4]; - char *p; - u_int hv_high; - int i; - /* - * [RFC] CPUID usage for interaction between Hypervisors and Linux. - * http://lkml.org/lkml/2008/10/1/246 - * - * KB1009458: Mechanisms to determine if software is running in - * a VMware virtual machine - * http://kb.vmware.com/kb/1009458 - */ - hv_high = 0; - if ((cpu_feature2 & CPUID2_HV) != 0) { - do_cpuid(0x40000000, regs); - hv_high = regs[0]; - for (i = 1, p = hv_sig; i < 4; i++, p += sizeof(regs) / 4) - memcpy(p, ®s[i], sizeof(regs[i])); - *p = '\0'; - if (bootverbose) { - /* - * HV vendor ID string - * ------------+-------------- - * KVM "KVMKVMKVM" - * Microsoft "Microsoft Hv" - * VMware "VMwareVMware" - * Xen "XenVMMXenVMM" - */ - printf("Hypervisor: Origin = \"%s\"\n", hv_sig); - } - if (strncmp(hv_sig, "VMwareVMware", 12) != 0) - return (0); - } else { - p = getenv("smbios.system.serial"); - if (p == NULL) - return (0); - if (strncmp(p, "VMware-", 7) != 0 && - strncmp(p, "VMW", 3) != 0) { - freeenv(p); - return (0); - } - freeenv(p); - vmware_hvcall(VMW_HVCMD_GETVERSION, regs); - if (regs[1] != VMW_HVMAGIC) - return (0); - } if (hv_high >= 0x40000010) { do_cpuid(0x40000010, regs); tsc_freq = regs[0] * 1000; @@ -183,7 +123,6 @@ tsc_freq_vmware(void) tsc_freq = regs[0] | ((uint64_t)regs[1] << 32); } tsc_is_invariant = 1; - return (1); } static void @@ -267,8 +206,10 @@ probe_tsc_freq(void) } } - if (tsc_freq_vmware()) + if (vm_guest == VM_GUEST_VMWARE) { + tsc_freq_vmware(); return; + } switch (cpu_vendor_id) { case CPU_VENDOR_AMD: From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 16:56:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3097E06; Tue, 10 Feb 2015 16:56:33 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E926822; Tue, 10 Feb 2015 16:56:33 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id w55so23379135wes.4; Tue, 10 Feb 2015 08:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=8WxpQETtv5HY2rXceEU9EpulZauCeWPErK59kGFCdBA=; b=Bb/kVKUmiAf4HoS+uJPkMv6Bn1LtbzbOnrbQr052EYkmrkbrSJ5GboxeOM0AYXC51L 8w8M67AWfp5MnaoZ+cFkr2+z2Jq6OYOsJRHKuSTZCKGEi0DRJq3XGajTRCofgTlXxp3D +KVNE1pPZxU5nJHHCatrsSYrKl0Nz1teg97FfqCBWYYUGuXsCH/AaLaO5LCCixlIKHlE UDu+AB8Az4d92o/Yazd8F2sEnhO0ZOcm/rD+1dKZ1J3rTshnZe/kvi3vJFFTTMj8Qz02 XTysl+12qgCNBXchjT/aX+kvEU4R1vsLCKf6cVvXXMetEEIPw41kIa0+wEVZM1TRnVot FATw== X-Received: by 10.194.173.138 with SMTP id bk10mr52406975wjc.112.1423587391728; Tue, 10 Feb 2015 08:56:31 -0800 (PST) Received: from brick.home (ace138.neoplus.adsl.tpnet.pl. [83.25.56.138]) by mx.google.com with ESMTPSA id fd10sm4208832wib.4.2015.02.10.08.56.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2015 08:56:31 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 10 Feb 2015 17:56:28 +0100 From: Edward Tomasz Napierala To: Bryan Drewery Subject: Re: svn commit: r278521 - head/sys/fs/autofs Message-ID: <20150210165628.GB59710@brick.home> Mail-Followup-To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201502101617.t1AGHH12081338@svn.freebsd.org> <54DA3312.8050709@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54DA3312.8050709@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 16:56:33 -0000 On 0210T1034, Bryan Drewery wrote: > On 2/10/2015 10:17 AM, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Tue Feb 10 16:17:16 2015 > > New Revision: 278521 > > URL: https://svnweb.freebsd.org/changeset/base/278521 > > > > Log: > > Restore ABI compatibility, broken in r273127. Note that while this fixes > > ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8) > > is neccessary. > > I was going to say __FreeBSD_version should probably be bumped, but I > suppose it's unlikely there are any consumers outside of automountd(8) > already. Indeed, I hadn't heard of any. From my point of view it's a private API between autofs(4) and automountd(8). > An entry in UPDATING may be worth adding for head noting the > rebuild need. We don't all read commit logs. Okay. What do you think about the following: 20150210: The autofs(4) ABI was changed in order to restore binary compatibility with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to work with the new kernel. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 17:08:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0A8F19A for ; Tue, 10 Feb 2015 17:08:25 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96A72935 for ; Tue, 10 Feb 2015 17:08:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AH8P4G034353 for ; Tue, 10 Feb 2015 17:08:25 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1AH8PUe034352 for svn-src-all@freebsd.org; Tue, 10 Feb 2015 17:08:25 GMT (envelope-from bdrewery) Received: (qmail 62297 invoked from network); 10 Feb 2015 11:08:21 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 10 Feb 2015 11:08:21 -0600 Message-ID: <54DA3B06.9020401@FreeBSD.org> Date: Tue, 10 Feb 2015 11:08:22 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278521 - head/sys/fs/autofs References: <201502101617.t1AGHH12081338@svn.freebsd.org> <54DA3312.8050709@FreeBSD.org> <20150210165628.GB59710@brick.home> In-Reply-To: <20150210165628.GB59710@brick.home> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9riaMH6JBUr3i3W6uXtUPH4HsEQgnTmxC" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 17:08:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9riaMH6JBUr3i3W6uXtUPH4HsEQgnTmxC Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2/10/2015 10:56 AM, Edward Tomasz Napierala wrote: > On 0210T1034, Bryan Drewery wrote: >> On 2/10/2015 10:17 AM, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Tue Feb 10 16:17:16 2015 >>> New Revision: 278521 >>> URL: https://svnweb.freebsd.org/changeset/base/278521 >>> >>> Log: >>> Restore ABI compatibility, broken in r273127. Note that while this= fixes >>> ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automoun= td(8) >>> is neccessary. >> >> I was going to say __FreeBSD_version should probably be bumped, but I >> suppose it's unlikely there are any consumers outside of automountd(8)= >> already. >=20 > Indeed, I hadn't heard of any. From my point of view it's a private > API between autofs(4) and automountd(8). >=20 >> An entry in UPDATING may be worth adding for head noting the >> rebuild need. We don't all read commit logs. >=20 > Okay. What do you think about the following: >=20 > 20150210: > The autofs(4) ABI was changed in order to restore binary compatibility= > with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to wo= rk > with the new kernel. >=20 Sounds fine. Thanks! --=20 Regards, Bryan Drewery --9riaMH6JBUr3i3W6uXtUPH4HsEQgnTmxC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU2jsGAAoJEDXXcbtuRpfPk2kIAJtvsmTkyEhVO7WDXDpU8B2X CHeeZrlWjObDLJnpPQoz6mTqlbrwTuerzL5ZKGYxFmgsU0cVYv1UDkJCI/0YkhFT Gm2i+g211MIzbp7jdytb/ylXgQ8x6K5O1PCngSh5HcdHW5uTfz1IEbXgN1XoeEkf IFxePWuFpEewrh+xOzwIzZefM4yFoZQrnRGLlpKlLRFTr62znXzqpyK+1dMspeUz PBca65pULG9CHTLETbXjopG2ZNecpoPKIDkdjG5zo+ZCndZR757UZKIhnk+6HcOY 7wRWcwIXh0aFqmeqRin0uVZ5r3ryFTQIHv0QfB1s7IeIEZN6tMnHn+n96QXgsD4= =R/On -----END PGP SIGNATURE----- --9riaMH6JBUr3i3W6uXtUPH4HsEQgnTmxC-- From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:00:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 740ABD6; Tue, 10 Feb 2015 18:00:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45832E80; Tue, 10 Feb 2015 18:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AI0X78031066; Tue, 10 Feb 2015 18:00:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AI0WI1031062; Tue, 10 Feb 2015 18:00:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502101800.t1AI0WI1031062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 10 Feb 2015 18:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278523 - in head: sys/kern usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:00:33 -0000 Author: kib Date: Tue Feb 10 18:00:32 2015 New Revision: 278523 URL: https://svnweb.freebsd.org/changeset/base/278523 Log: Mountd iterating over the mount points may race with the parallel unmount, which causes error from nmount(2) call when performing MNT_DELEXPORT over the directory which ceased to be a mount point. The race is legitimate and innocent, but results in the chatty mountd. Silence it by providing an distinguished error code for the situation, and ignoring the error in mountd loop. Based on the patch by: Andreas Longwitz Prodded and tested by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_mount.c head/usr.sbin/mountd/mountd.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue Feb 10 16:34:42 2015 (r278522) +++ head/sys/kern/vfs_mount.c Tue Feb 10 18:00:32 2015 (r278523) @@ -888,12 +888,18 @@ vfs_domount_update( ASSERT_VOP_ELOCKED(vp, __func__); KASSERT((fsflags & MNT_UPDATE) != 0, ("MNT_UPDATE should be here")); + mp = vp->v_mount; if ((vp->v_vflag & VV_ROOT) == 0) { + if (vfs_copyopt(*optlist, "export", &export, sizeof(export)) + == 0) + error = EXDEV; + else + error = EINVAL; vput(vp); - return (EINVAL); + return (error); } - mp = vp->v_mount; + /* * We only allow the filesystem to be reloaded if it * is currently mounted read-only. Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Tue Feb 10 16:34:42 2015 (r278522) +++ head/usr.sbin/mountd/mountd.c Tue Feb 10 18:00:32 2015 (r278523) @@ -1747,8 +1747,12 @@ get_exportlist(void) iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; errmsg[0] = '\0'; + /* + * EXDEV is returned when path exists but is not a + * mount point. May happens if raced with unmount. + */ if (nmount(iov, iovlen, fsp->f_flags) < 0 && - errno != ENOENT && errno != ENOTSUP) { + errno != ENOENT && errno != ENOTSUP && errno != EXDEV) { syslog(LOG_ERR, "can't delete exports for %s: %m %s", fsp->f_mntonname, errmsg); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:05:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7002A41E; Tue, 10 Feb 2015 18:05:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C43FF5F; Tue, 10 Feb 2015 18:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AI5xHB034844; Tue, 10 Feb 2015 18:05:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AI5xb3034843; Tue, 10 Feb 2015 18:05:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502101805.t1AI5xb3034843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 10 Feb 2015 18:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278524 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:05:59 -0000 Author: trasz Date: Tue Feb 10 18:05:58 2015 New Revision: 278524 URL: https://svnweb.freebsd.org/changeset/base/278524 Log: Update UPDATING after changing autofs(4) ABI. Suggested by: bdrewery@ Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Feb 10 18:00:32 2015 (r278523) +++ head/UPDATING Tue Feb 10 18:05:58 2015 (r278524) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150210: + The autofs(4) ABI was changed in order to restore binary compatibility + with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to work + with the new kernel. + 20150131: The powerpc64 kernel has been changed to a position-independent executable. This can only be booted with a new version of loader(8), From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:30:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45D5EAAB; Tue, 10 Feb 2015 18:30:41 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11A21220; Tue, 10 Feb 2015 18:30:40 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJK00J8CJERBC20@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 18:30:31 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_06:2015-02-10,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100174 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJK00KL7JERZL80@st11p02mm-spool002.mac.com>; Tue, 10 Feb 2015 18:30:27 +0000 (GMT) To: John Baldwin From: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Date: Tue, 10 Feb 2015 18:30:27 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: <8e5503e1-755c-49e4-ab4d-a0ad1ae91f97@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:30:41 -0000 On Feb 10, 2015, at 07:37 AM, John Baldwin wrote:=0AThat= wasn't really my question. My question was if we want distinct streams =0A= or if we want want unified stream. Having a unified stream might very well= =0Amake sense (and if so we could rename devd to make that more obvious).= =0A=0AI'm fine with renaming devd to eventd or something else, but Ian was= saying that he's worried about the number of notifications that devd has = to process. =C2=A0I'm not sure that's a real problem at this point, though= . =C2=A0On freefall, devd used 0.07 seconds of CPU time and has been runni= ng for a 1 day and a half. =C2=A0On my BeagleBone, devd used 0.61 seconds = of CPU time and it has been up for 5 days and a half. =C2=A0 On my VM that= has been up for 5 days and a half, it used 4 seconds of CPU time. =C2=A0R= enaming sounds like a good idea and it looks like we could leave the optim= isations to a later time.=0A=0AAnother thing I had in mind (which is more = work) was to abstract the devctl kernel code in an API which could make it= easy to fan out the notifications to multiple /dev devices. =C2=A0However= , that may be overkill.= From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:35:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2242CE1; Tue, 10 Feb 2015 18:35:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E00E31E; Tue, 10 Feb 2015 18:35:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AIZlPX049131; Tue, 10 Feb 2015 18:35:47 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AIZlnu049130; Tue, 10 Feb 2015 18:35:47 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502101835.t1AIZlnu049130@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 10 Feb 2015 18:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278525 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:35:47 -0000 Author: rpaulo Date: Tue Feb 10 18:35:46 2015 New Revision: 278525 URL: https://svnweb.freebsd.org/changeset/base/278525 Log: Remove a printf and an strlen() from the coredump code. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Feb 10 18:05:58 2015 (r278524) +++ head/sys/kern/kern_sig.c Tue Feb 10 18:35:46 2015 (r278525) @@ -3225,14 +3225,13 @@ out: static int coredump_sanitise_path(const char *path) { - size_t len, i; + size_t i; /* * Only send a subset of ASCII to devd(8) because it * might pass these strings to sh -c. */ - len = strlen(path); - for (i = 0; i < len; i++) + for (i = 0; path[i]; i++) if (!(isalpha(path[i]) || isdigit(path[i])) && path[i] != '/' && path[i] != '.' && path[i] != '-') @@ -3365,10 +3364,8 @@ close: snprintf(data, sizeof(data), "comm=%s ", fullpath); free(freepath, M_TEMP); freepath = NULL; - if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) { - printf("could not find coredump\n"); + if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) goto out; - } if (!coredump_sanitise_path(fullpath)) goto out; strlcat(data, "core=", sizeof(data)); From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:36:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31EFAEFA; Tue, 10 Feb 2015 18:36:42 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E9D9F32F; Tue, 10 Feb 2015 18:36:41 +0000 (UTC) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.14.9) with ESMTPSA id t1AIaSeb005471 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2015 18:36:33 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: David Chisnall In-Reply-To: <8e5503e1-755c-49e4-ab4d-a0ad1ae91f97@me.com> Date: Tue, 10 Feb 2015 18:36:23 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <575FA8C1-0204-455C-A35A-787C48066AA5@FreeBSD.org> References: <8e5503e1-755c-49e4-ab4d-a0ad1ae91f97@me.com> To: Rui Paulo X-Mailer: Apple Mail (2.2070.6) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:36:42 -0000 On 10 Feb 2015, at 18:30, Rui Paulo wrote: >=20 > Another thing I had in mind (which is more work) was to abstract the = devctl kernel code in an API which could make it easy to fan out the = notifications to multiple /dev devices. However, that may be overkill. This kind of notification is something that kdbus is increasingly being = used for on Linux. The primitive allows events to originate either in = the kernel or in userspace and to be sent either point-to-point or to a = bloom filter set of recipients (so you occasionally get some messages = you're not expecting, but hopefully don't get too many spurious = wakeups). David From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:36:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBBD1158; Tue, 10 Feb 2015 18:36:52 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtpout001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98DBE332; Tue, 10 Feb 2015 18:36:52 +0000 (UTC) Received: from st11p02mm-spool001.mac.com ([17.172.220.246]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJK005HFJP54W30@st11p02mm-asmtp001.mac.com>; Tue, 10 Feb 2015 18:36:42 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_06:2015-02-10,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100174 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool001.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJK007VOJP51140@st11p02mm-spool001.mac.com>; Tue, 10 Feb 2015 18:36:41 +0000 (GMT) To: Konstantin Belousov From: Rui Paulo Subject: Re: svn commit: r278494 - head/sys/kern Date: Tue, 10 Feb 2015 18:36:41 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: <72be7da9-2c3f-45ec-963a-cea7bff5df5e@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:36:52 -0000 On Feb 10, 2015, at 12:32 AM, Konstantin Belousov wr= ote:=0A=0AAnd there is double-free somewhere.=0A=C2=A0=0AAre you talking a= bout the Jenkins error? =C2=A0I think that was the free(name) which was th= e result of a mis-merge and which I fixed yesterday. =C2=A0Jenkins build #= 671 seems to be ok.= From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:49:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6047B496; Tue, 10 Feb 2015 18:49:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3AC649; Tue, 10 Feb 2015 18:49:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AInETj054485; Tue, 10 Feb 2015 18:49:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AInE4M054484; Tue, 10 Feb 2015 18:49:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502101849.t1AInE4M054484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 10 Feb 2015 18:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278526 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:49:14 -0000 Author: gjb Date: Tue Feb 10 18:49:13 2015 New Revision: 278526 URL: https://svnweb.freebsd.org/changeset/base/278526 Log: Fix a rendering issue in the nullfs(5) manual page. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/nullfs.5 Modified: head/share/man/man5/nullfs.5 ============================================================================== --- head/share/man/man5/nullfs.5 Tue Feb 10 18:35:46 2015 (r278525) +++ head/share/man/man5/nullfs.5 Tue Feb 10 18:49:13 2015 (r278526) @@ -24,15 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd February 10, 2015 .Dt NULLFS 5 .Os .Sh NAME .Nm nullfs .Nd "null file system" .Sh SYNOPSIS -To enable support for -.Nm , +To enable support for this driver, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "options NULLFS" From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:51:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C34A56D1; Tue, 10 Feb 2015 18:51:59 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79AA374E; Tue, 10 Feb 2015 18:51:59 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YLFub-000Lcl-9U; Tue, 10 Feb 2015 21:51:53 +0300 Date: Tue, 10 Feb 2015 21:51:53 +0300 From: Slawa Olhovchenkov To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210185153.GA81421@zxy.spb.ru> References: <8e5503e1-755c-49e4-ab4d-a0ad1ae91f97@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8e5503e1-755c-49e4-ab4d-a0ad1ae91f97@me.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:51:59 -0000 On Tue, Feb 10, 2015 at 06:30:27PM +0000, Rui Paulo wrote: > On Feb 10, 2015, at 07:37 AM, John Baldwin wrote: > That wasn't really my question. My question was if we want distinct streams > or if we want want unified stream. Having a unified stream might very well > make sense (and if so we could rename devd to make that more obvious). > > I'm fine with renaming devd to eventd or something else, but Ian was > saying that he's worried about the number of notifications that devd > has to process. šI'm not sure that's a real problem at this point, > though. šOn freefall, devd used 0.07 seconds of CPU time and has > been running for a 1 day and a half. šOn my BeagleBone, devd used > 0.61 seconds of CPU time and it has been up for 5 days and a half. š > On my VM that has been up for 5 days and a half, it used 4 seconds > of CPU time. šRenaming sounds like a good idea and it looks like we > could leave the optimisations to a later time. For common case (I am not talk about current devd implementation -- I am don't have any inforamtion/metrics/etc) routing and processing events may be sensitive to delay and ordering: may be exist requirement 'delay not more then 700ns', may be exist requirement 'next event process only after complete process previos event'. And some event handling may be very CPU/disk/etc consumption. Need to good think over and design API and architecure. From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 18:55:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6AAA9C0; Tue, 10 Feb 2015 18:55:58 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9227C774; Tue, 10 Feb 2015 18:55:57 +0000 (UTC) Received: from st11p02mm-spool001.mac.com ([17.172.220.246]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJK00LTFKKGF200@st11p02mm-asmtp002.mac.com>; Tue, 10 Feb 2015 18:55:29 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_06:2015-02-10,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=18 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502100177 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool001.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJK007XPKKG1150@st11p02mm-spool001.mac.com>; Tue, 10 Feb 2015 18:55:28 +0000 (GMT) To: Slawa Olhovchenkov From: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Date: Tue, 10 Feb 2015 18:55:28 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 18:55:59 -0000 On Feb 10, 2015, at 10:52 AM, Slawa Olhovchenkov wrote:=0A= For common case (I am not talk about current devd implementation -- I=0Aam= don't have any inforamtion/metrics/etc) routing and processing=0Aevents m= ay be sensitive to delay and ordering: may be exist=0Arequirement 'delay n= ot more then 700ns', may be exist requirement=0A'next event process only a= fter complete process previos event'. And=0Asome event handling may be ver= y CPU/disk/etc consumption. Need to good=0Athink over and design API and a= rchitecure.=0A=C2=A0=0Arouting events do not come over devd (or any other = /dev device): there's a routing socket specifically tailored for that purp= ose. =C2=A0For that type of latency, you probably don't want to be crossin= g the kernel/userland barrier too often (or never).= From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 19:41:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53E696C8; Tue, 10 Feb 2015 19:41:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B281CC9; Tue, 10 Feb 2015 19:41:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AJfaVU081966; Tue, 10 Feb 2015 19:41:36 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AJfViu081908; Tue, 10 Feb 2015 19:41:31 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201502101941.t1AJfViu081908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 10 Feb 2015 19:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278529 - in head: cddl/contrib/opensolaris/lib/libdtrace/arm cddl/contrib/opensolaris/tools/ctf/cvt cddl/lib cddl/lib/libdtrace cddl/usr.sbin lib lib/libproc sys/arm/arm sys/arm/conf s... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 19:41:36 -0000 Author: gnn Date: Tue Feb 10 19:41:30 2015 New Revision: 278529 URL: https://svnweb.freebsd.org/changeset/base/278529 Log: Initial version of DTrace on ARM32. Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj Added: head/cddl/contrib/opensolaris/lib/libdtrace/arm/ head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/arm/ head/sys/cddl/contrib/opensolaris/uts/arm/dtrace/ head/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/arm/sys/ head/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h (contents, props changed) head/sys/cddl/dev/dtrace/arm/ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S (contents, props changed) head/sys/cddl/dev/dtrace/arm/dtrace_isa.c (contents, props changed) head/sys/cddl/dev/dtrace/arm/dtrace_subr.c (contents, props changed) head/sys/cddl/dev/dtrace/arm/regset.h (contents, props changed) head/sys/cddl/dev/fbt/arm/ head/sys/cddl/dev/fbt/arm/fbt_isa.c (contents, props changed) head/sys/cddl/dev/fbt/arm/fbt_isa.h (contents, props changed) Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c head/cddl/lib/Makefile head/cddl/lib/libdtrace/Makefile head/cddl/usr.sbin/Makefile head/lib/Makefile head/lib/libproc/proc_bkpt.c head/lib/libproc/proc_regs.c head/sys/arm/arm/exception.S head/sys/arm/arm/identcpu.c head/sys/arm/arm/trap.c head/sys/arm/conf/BEAGLEBONE head/sys/arm/include/cpufunc.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/dev/lockstat/lockstat.c head/sys/cddl/dev/profile/profile.c head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtrace/Makefile Added: head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c Tue Feb 10 19:41:30 2015 (r278529) @@ -0,0 +1,190 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * Copyright 2014 Howard Su + * Copyright 2015 George V. Neville-Neil + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include +#include + +#include +#include + +#if !defined(sun) +#define PR_MODEL_ILP32 1 +#define PR_MODEL_LP64 2 +#include +#endif + +#define OP(x) ((x) >> 30) +#define OP2(x) (((x) >> 22) & 0x07) +#define COND(x) (((x) >> 25) & 0x0f) +#define A(x) (((x) >> 29) & 0x01) + +#define OP_BRANCH 0 + +#define OP2_BPcc 0x1 +#define OP2_Bicc 0x2 +#define OP2_BPr 0x3 +#define OP2_FBPfcc 0x5 +#define OP2_FBfcc 0x6 + +/*ARGSUSED*/ +int +dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) +{ + ftp->ftps_type = DTFTP_ENTRY; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + ftp->ftps_offs[0] = 0; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (1); +} + +int +dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret) +{ + + uint32_t *text; + int i; + int srdepth = 0; + + dt_dprintf("%s: unimplemented\n", __func__); + return (DT_PROC_ERR); + + if ((text = malloc(symp->st_size + 4)) == NULL) { + dt_dprintf("mr sparkle: malloc() failed\n"); + return (DT_PROC_ERR); + } + + if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { + dt_dprintf("mr sparkle: Pread() failed\n"); + free(text); + return (DT_PROC_ERR); + } + + /* + * Leave a dummy instruction in the last slot to simplify edge + * conditions. + */ + text[symp->st_size / 4] = 0; + + ftp->ftps_type = DTFTP_RETURN; + ftp->ftps_pc = symp->st_value; + ftp->ftps_size = symp->st_size; + ftp->ftps_noffs = 0; + + + free(text); + if (ftp->ftps_noffs > 0) { + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + } + + + return (ftp->ftps_noffs); +} + +/*ARGSUSED*/ +int +dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off) +{ + if (off & 0x3) + return (DT_PROC_ALIGN); + + ftp->ftps_type = DTFTP_OFFSETS; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 1; + ftp->ftps_offs[0] = off; + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (1); +} + +/*ARGSUSED*/ +int +dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp, + fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern) +{ + ulong_t i; + + ftp->ftps_type = DTFTP_OFFSETS; + ftp->ftps_pc = (uintptr_t)symp->st_value; + ftp->ftps_size = (size_t)symp->st_size; + ftp->ftps_noffs = 0; + + /* + * If we're matching against everything, just iterate through each + * instruction in the function, otherwise look for matching offset + * names by constructing the string and comparing it against the + * pattern. + */ + if (strcmp("*", pattern) == 0) { + for (i = 0; i < symp->st_size; i += 4) { + ftp->ftps_offs[ftp->ftps_noffs++] = i; + } + } else { + char name[sizeof (i) * 2 + 1]; + + for (i = 0; i < symp->st_size; i += 4) { + (void) sprintf(name, "%lx", i); + if (gmatch(name, pattern)) + ftp->ftps_offs[ftp->ftps_noffs++] = i; + } + } + + if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { + dt_dprintf("fasttrap probe creation ioctl failed: %s\n", + strerror(errno)); + return (dt_set_errno(dtp, errno)); + } + + return (ftp->ftps_noffs); +} Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Tue Feb 10 19:41:30 2015 (r278529) @@ -169,12 +169,12 @@ write_objects(iidesc_t *idp, ctf_buf_t * { ushort_t id = (idp ? idp->ii_dtype->t_id : 0); - ctf_buf_write(b, &id, sizeof (id)); - if (target_requires_swap) { SWAP_16(id); } + ctf_buf_write(b, &id, sizeof (id)); + debug(3, "Wrote object %s (%d)\n", (idp ? idp->ii_name : "(null)"), id); } Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Tue Feb 10 19:04:58 2015 (r278528) +++ head/cddl/lib/Makefile Tue Feb 10 19:41:30 2015 (r278529) @@ -27,7 +27,8 @@ _libzpool= libzpool .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ - ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \ + ${MACHINE_CPUARCH} == "arm" _drti= drti _libdtrace= libdtrace .endif Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Tue Feb 10 19:04:58 2015 (r278528) +++ head/cddl/lib/libdtrace/Makefile Tue Feb 10 19:41:30 2015 (r278529) @@ -81,6 +81,10 @@ CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/ut CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips .PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips +.elif ${MACHINE_CPUARCH} == "arm" +CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm +.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/arm +.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/arm .elif ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Tue Feb 10 19:04:58 2015 (r278528) +++ head/cddl/usr.sbin/Makefile Tue Feb 10 19:41:30 2015 (r278529) @@ -30,6 +30,12 @@ _plockstat= plockstat .endif .endif +.if ${MACHINE_CPUARCH} == "arm" +_dtrace= dtrace +_dtruss= dtruss +_lockstat= lockstat +.endif + .if ${MACHINE_CPUARCH} == "mips" _dtrace= dtrace .endif Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Feb 10 19:04:58 2015 (r278528) +++ head/lib/Makefile Tue Feb 10 19:41:30 2015 (r278529) @@ -284,6 +284,12 @@ _libsmb= libsmb _libsmb= libsmb .endif +.if ${MACHINE_CPUARCH} == "arm" +_libsmb= libsmb +_libproc= libproc +_librtld_db= librtld_db +.endif + .if ${MK_OPENSSL} != "no" _libmp= libmp .endif Modified: head/lib/libproc/proc_bkpt.c ============================================================================== --- head/lib/libproc/proc_bkpt.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/lib/libproc/proc_bkpt.c Tue Feb 10 19:41:30 2015 (r278529) @@ -51,6 +51,9 @@ __FBSDID("$FreeBSD$"); #elif defined(__powerpc__) #define BREAKPOINT_INSTR 0x7fe00008 /* trap */ #define BREAKPOINT_INSTR_SZ 4 +#elif defined(__arm__) +#define BREAKPOINT_INSTR 0xe7ffffff /* bkpt */ +#define BREAKPOINT_INSTR_SZ 4 #else #error "Add support for your architecture" #endif Modified: head/lib/libproc/proc_regs.c ============================================================================== --- head/lib/libproc/proc_regs.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/lib/libproc/proc_regs.c Tue Feb 10 19:41:30 2015 (r278529) @@ -56,6 +56,8 @@ proc_regget(struct proc_handle *phdl, pr case REG_PC: #if defined(__amd64__) *regvalue = regs.r_rip; +#elif defined(__arm__) + *regvalue = regs.r_pc; #elif defined(__i386__) *regvalue = regs.r_eip; #elif defined(__mips__) @@ -67,6 +69,8 @@ proc_regget(struct proc_handle *phdl, pr case REG_SP: #if defined(__amd64__) *regvalue = regs.r_rsp; +#elif defined(__arm__) + *regvalue = regs.r_sp; #elif defined(__i386__) *regvalue = regs.r_esp; #elif defined(__mips__) @@ -99,6 +103,8 @@ proc_regset(struct proc_handle *phdl, pr case REG_PC: #if defined(__amd64__) regs.r_rip = regvalue; +#elif defined(__arm__) + regs.r_pc = regvalue; #elif defined(__i386__) regs.r_eip = regvalue; #elif defined(__mips__) @@ -110,6 +116,8 @@ proc_regset(struct proc_handle *phdl, pr case REG_SP: #if defined(__amd64__) regs.r_rsp = regvalue; +#elif defined(__arm__) + regs.r_sp = regvalue; #elif defined(__i386__) regs.r_esp = regvalue; #elif defined(__mips__) Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/arm/arm/exception.S Tue Feb 10 19:41:30 2015 (r278529) @@ -48,11 +48,26 @@ #include "assym.s" +#include "opt_kdtrace.h" #include #include #include __FBSDID("$FreeBSD$"); +#ifdef KDTRACE_HOOKS + .bss + .align 4 + .global _C_LABEL(dtrace_invop_jump_addr) +_C_LABEL(dtrace_invop_jump_addr): + .word 0 + .word 0 + + .global _C_LABEL(dtrace_invop_calltrap_addr) +_C_LABEL(dtrace_invop_calltrap_addr): + .word 0 + .word 0 +#endif + .text .align 2 Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/arm/arm/identcpu.c Tue Feb 10 19:41:30 2015 (r278529) @@ -387,7 +387,7 @@ identify_arm_cpu(void) u_int8_t type, linesize; int i; - cpuid = cpu_id(); + cpuid = cpu_ident(); if (cpuid == 0) { printf("Processor failed probe - no CPU ID\n"); Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/arm/arm/trap.c Tue Feb 10 19:41:30 2015 (r278529) @@ -78,6 +78,9 @@ * Created : 28/11/94 */ +#ifdef KDTRACE_HOOKS +#include +#endif #include __FBSDID("$FreeBSD$"); @@ -427,6 +430,13 @@ dab_fatal(struct trapframe *tf, u_int fs { const char *mode; +#ifdef KDTRACE_HOOKS + if (!TRAP_USERMODE(tf)) { + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far & FAULT_TYPE_MASK)) + return (0); + } +#endif + mode = TRAP_USERMODE(tf) ? "user" : "kernel"; disable_interrupts(PSR_I|PSR_F); Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/arm/conf/BEAGLEBONE Tue Feb 10 19:41:30 2015 (r278529) @@ -27,6 +27,12 @@ include "../ti/am335x/std.am335x" makeoptions WITHOUT_MODULES="ahc" +# DTrace support +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # all architectures - kernel ELF linker loads CTF data +makeoptions WITH_CTF=1 +makeoptions MODULES_OVERRIDE="opensolaris dtrace dtrace/lockstat dtrace/profile dtrace/fbt" + options HZ=100 options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/arm/include/cpufunc.h Tue Feb 10 19:41:30 2015 (r278529) @@ -175,7 +175,7 @@ struct cpu_functions { extern struct cpu_functions cpufuncs; extern u_int cputype; -#define cpu_id() cpufuncs.cf_id() +#define cpu_ident() cpufuncs.cf_id() #define cpu_cpwait() cpufuncs.cf_cpwait() #define cpu_control(c, e) cpufuncs.cf_control(c, e) Added: head/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c Tue Feb 10 19:41:30 2015 (r278529) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +/* + * XXX: Placeholder for ARM fasttrap code + */ Added: head/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h Tue Feb 10 19:41:30 2015 (r278529) @@ -0,0 +1,94 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _FASTTRAP_ISA_H +#define _FASTTRAP_ISA_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This is our reserved trap instruction: ta 0x38 + */ +#define FASTTRAP_INSTR 0x91d02038 + +#define FASTTRAP_SUNWDTRACE_SIZE 128 + +typedef uint32_t fasttrap_instr_t; + +typedef struct fasttrap_machtp { + fasttrap_instr_t ftmt_instr; /* original instruction */ + uintptr_t ftmt_dest; /* destination of DCTI */ + uint8_t ftmt_type; /* emulation type */ + uint8_t ftmt_flags; /* emulation flags */ + uint8_t ftmt_cc; /* which cc to look at */ + uint8_t ftmt_code; /* branch condition */ +} fasttrap_machtp_t; + +#define ftt_instr ftt_mtp.ftmt_instr +#define ftt_dest ftt_mtp.ftmt_dest +#define ftt_type ftt_mtp.ftmt_type +#define ftt_flags ftt_mtp.ftmt_flags +#define ftt_cc ftt_mtp.ftmt_cc +#define ftt_code ftt_mtp.ftmt_code + +#define FASTTRAP_T_COMMON 0x00 /* common case -- no emulation */ +#define FASTTRAP_T_CCR 0x01 /* integer condition code branch */ +#define FASTTRAP_T_FCC 0x02 /* floating-point branch */ +#define FASTTRAP_T_REG 0x03 /* register predicated branch */ +#define FASTTRAP_T_ALWAYS 0x04 /* branch always */ +#define FASTTRAP_T_CALL 0x05 /* call instruction */ +#define FASTTRAP_T_JMPL 0x06 /* jmpl instruction */ +#define FASTTRAP_T_RDPC 0x07 /* rdpc instruction */ +#define FASTTRAP_T_RETURN 0x08 /* return instruction */ + +/* + * For performance rather than correctness. + */ +#define FASTTRAP_T_SAVE 0x10 /* save instruction (func entry only) */ +#define FASTTRAP_T_RESTORE 0x11 /* restore instruction */ +#define FASTTRAP_T_OR 0x12 /* mov instruction */ +#define FASTTRAP_T_SETHI 0x13 /* sethi instruction (includes nop) */ + +#define FASTTRAP_F_ANNUL 0x01 /* branch is annulled */ +#define FASTTRAP_F_RETMAYBE 0x02 /* not definitely a return site */ + +#define FASTTRAP_AFRAMES 3 +#define FASTTRAP_RETURN_AFRAMES 4 +#define FASTTRAP_ENTRY_AFRAMES 3 +#define FASTTRAP_OFFSET_AFRAMES 3 + + +#ifdef __cplusplus +} +#endif + +#endif /* _FASTTRAP_ISA_H */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Feb 10 19:41:30 2015 (r278529) @@ -11880,7 +11880,7 @@ err: int i; *factor = 1; -#if defined(__amd64__) || defined(__mips__) || defined(__powerpc__) +#if defined(__amd64__) || defined(__arm__) || defined(__mips__) || defined(__powerpc__) /* * FreeBSD isn't good at limiting the amount of memory we * ask to malloc, so let's place a limit here before trying Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Tue Feb 10 19:04:58 2015 (r278528) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Tue Feb 10 19:41:30 2015 (r278529) @@ -2434,6 +2434,13 @@ extern void dtrace_helpers_destroy(proc_ #define DTRACE_INVOP_MFLR_R0 5 #define DTRACE_INVOP_NOP 6 +#elif defined(__arm__) + +#define DTRACE_INVOP_PUSHM 1 +#define DTRACE_INVOP_POPM 2 +#define DTRACE_INVOP_B 3 + + #endif #ifdef __cplusplus Added: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Tue Feb 10 19:41:30 2015 (r278529) @@ -0,0 +1,197 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#define _ASM +#define _LOCORE +#define LOCORE + +#include +#include + +#include +#include + +#include "assym.s" + +/* +void dtrace_membar_producer(void) +*/ +ENTRY(dtrace_membar_producer) + RET +END(dtrace_membar_producer) + +/* +void dtrace_membar_consumer(void) +*/ +ENTRY(dtrace_membar_consumer) + RET +END(dtrace_membar_consumer) + +/* +dtrace_icookie_t dtrace_interrupt_disable(void) +*/ +ENTRY(dtrace_interrupt_disable) + mrs r0, cpsr + mov r1, r0 + orr r1, r1, #(PSR_I | PSR_F) + msr cpsr_c, r1 + RET +END(dtrace_interrupt_disable) + +/* +void dtrace_interrupt_enable(dtrace_icookie_t cookie) +*/ +ENTRY(dtrace_interrupt_enable) + and r0, r0, #(PSR_I | PSR_F) + mrs r1, cpsr + bic r1, r1, #(PSR_I | PSR_F) + orr r1, r1, r0 + msr cpsr_c, r1 + RET +END(dtrace_interrupt_enable) +/* +uint8_t +dtrace_fuword8_nocheck(void *addr) +*/ +ENTRY(dtrace_fuword8_nocheck) + ldrb r3, [r0] + mov r0, r3 + RET +END(dtrace_fuword8_nocheck) + +/* +uint16_t +dtrace_fuword16_nocheck(void *addr) +*/ +ENTRY(dtrace_fuword16_nocheck) + ldrh r3, [r0] + mov r0, r3 + RET +END(dtrace_fuword16_nocheck) + +/* +uint32_t +dtrace_fuword32_nocheck(void *addr) +*/ +ENTRY(dtrace_fuword32_nocheck) + ldr r3, [r0] + mov r0, r3 + RET +END(dtrace_fuword32_nocheck) + +/* +uint64_t +dtrace_fuword64_nocheck(void *addr) +*/ +ENTRY(dtrace_fuword64_nocheck) + ldm r0, {r2, r3} + + mov r0, r2 + mov r1, r3 +#if defined(__BIG_ENDIAN__) +/* big endian */ + mov r0, r3 + mov r1, r2 +#else +/* little endian */ + mov r0, r2 + mov r1, r3 + +#endif + RET +END(dtrace_fuword64_nocheck) + +/* +void +dtrace_copy(uintptr_t uaddr, uintptr_t kaddr, size_t size) +*/ +ENTRY(dtrace_copy) + stmfd sp!, {r4-r5} /* stack is 8 byte aligned */ + teq r2, #0x00000000 + mov r5, #0x00000000 + beq 2f + +1: ldrb r4, [r0], #0x0001 + add r5, r5, #0x00000001 + strb r4, [r1], #0x0001 + teqne r5, r2 + bne 1b + +2: ldmfd sp!, {r4-r5} /* stack is 8 byte aligned */ + RET +END(dtrace_copy) + +/* +void +dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, + volatile uint16_t *flags) +XXX: Check for flags? +*/ +ENTRY(dtrace_copystr) + stmfd sp!, {r4-r5} /* stack is 8 byte aligned */ + teq r2, #0x00000000 + mov r5, #0x00000000 + beq 2f + +1: ldrb r4, [r0], #0x0001 + add r5, r5, #0x00000001 + teq r4, #0x00000000 + strb r4, [r1], #0x0001 + teqne r5, r2 + bne 1b + +2: ldmfd sp!, {r4-r5} /* stack is 8 byte aligned */ + RET +END(dtrace_copystr) + +/* +void +vpanic(const char *format, va_list alist) +*/ +ENTRY(vpanic) /* Initial stack layout: */ +vpanic_common: + RET +END(vpanic) + +/* +void +dtrace_vpanic(const char *format, va_list alist) +*/ +ENTRY(dtrace_vpanic) /* Initial stack layout: */ + b vpanic + RET +END(dtrace_vpanic) /* Initial stack layout: */ + +/* +uintptr_t +dtrace_caller(int aframes) +*/ +ENTRY(dtrace_caller) + mov r0, #-1 + RET +END(dtrace_caller) Added: head/sys/cddl/dev/dtrace/arm/dtrace_isa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Tue Feb 10 19:41:30 2015 (r278529) @@ -0,0 +1,356 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "regset.h" + +/* + * Wee need some reasonable default to prevent backtrace code + * from wandering too far + */ +#define MAX_FUNCTION_SIZE 0x10000 +#define MAX_PROLOGUE_SIZE 0x100 + + +uint8_t dtrace_fuword8_nocheck(void *); +uint16_t dtrace_fuword16_nocheck(void *); +uint32_t dtrace_fuword32_nocheck(void *); +uint64_t dtrace_fuword64_nocheck(void *); + +void +dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, + uint32_t *intrpc) +{ + u_int32_t *frame, *lastframe; + int scp_offset; + int depth = 0; + pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller; + + if (intrpc != 0) + pcstack[depth++] = (pc_t) intrpc; + + aframes++; + + frame = (u_int32_t *)__builtin_frame_address(0);; + lastframe = NULL; + scp_offset = -(get_pc_str_offset() >> 2); + + while ((frame != NULL) && (depth < pcstack_limit)) { + db_addr_t scp; +#if 0 + u_int32_t savecode; + int r; + u_int32_t *rp; +#endif + + /* + * In theory, the SCP isn't guaranteed to be in the function + * that generated the stack frame. We hope for the best. + */ + scp = frame[FR_SCP]; + + if (aframes > 0) { + aframes--; + if ((aframes == 0) && (caller != 0)) { + pcstack[depth++] = caller; + } + } + else { + pcstack[depth++] = scp; + } + +#if 0 + savecode = ((u_int32_t *)scp)[scp_offset]; + if ((savecode & 0x0e100000) == 0x08000000) { + /* Looks like an STM */ + rp = frame - 4; + for (r = 10; r >= 0; r--) { + if (savecode & (1 << r)) { + /* register r == *rp-- */ + } + } + } +#endif + + /* + * Switch to next frame up + */ + if (frame[FR_RFP] == 0) + break; /* Top of stack */ + + lastframe = frame; + frame = (u_int32_t *)(frame[FR_RFP]); + + if (INKERNEL((int)frame)) { + /* staying in kernel */ + if (frame <= lastframe) { + /* bad frame pointer */ + break; + } + } + else + break; + } + + for (; depth < pcstack_limit; depth++) { + pcstack[depth] = 0; + } +} + +void +dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit) +{ + printf("IMPLEMENT ME: %s\n", __func__); +} + +int +dtrace_getustackdepth(void) +{ + printf("IMPLEMENT ME: %s\n", __func__); + return (0); +} + +void +dtrace_getufpstack(uint64_t *pcstack, uint64_t *fpstack, int pcstack_limit) +{ + printf("IMPLEMENT ME: %s\n", __func__); +} + +/*ARGSUSED*/ +uint64_t +dtrace_getarg(int arg, int aframes) +{ +/* struct arm_frame *fp = (struct arm_frame *)dtrace_getfp();*/ + + return (0); +} + +int +dtrace_getstackdepth(int aframes) +{ + u_int32_t *frame, *lastframe; + int scp_offset; + int depth = 1; + + frame = (u_int32_t *)__builtin_frame_address(0);; + lastframe = NULL; + scp_offset = -(get_pc_str_offset() >> 2); + + while (frame != NULL) { + db_addr_t scp; +#if 0 + u_int32_t savecode; + int r; + u_int32_t *rp; +#endif + + /* + * In theory, the SCP isn't guaranteed to be in the function + * that generated the stack frame. We hope for the best. + */ + scp = frame[FR_SCP]; + + depth++; + + /* + * Switch to next frame up + */ + if (frame[FR_RFP] == 0) + break; /* Top of stack */ + + lastframe = frame; + frame = (u_int32_t *)(frame[FR_RFP]); + + if (INKERNEL((int)frame)) { + /* staying in kernel */ + if (frame <= lastframe) { + /* bad frame pointer */ + break; + } + } + else + break; + } + + if (depth < aframes) + return 0; + else + return depth - aframes; + +} + +ulong_t +dtrace_getreg(struct trapframe *rp, uint_t reg) +{ + printf("IMPLEMENT ME: %s\n", __func__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 20:15:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A09C3BB; Tue, 10 Feb 2015 20:15:51 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 542AC81; Tue, 10 Feb 2015 20:15:50 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t1AKFoaE034106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Feb 2015 12:15:50 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t1AKFoXs034105; Tue, 10 Feb 2015 12:15:50 -0800 (PST) (envelope-from jmg) Date: Tue, 10 Feb 2015 12:15:50 -0800 From: John-Mark Gurney To: John Baldwin Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210201550.GH1953@funkthat.com> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> <2907775.GXqUUp6Hz6@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2907775.GXqUUp6Hz6@ralph.baldwin.cx> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Tue, 10 Feb 2015 12:15:50 -0800 (PST) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Rui Paulo , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 20:15:51 -0000 John Baldwin wrote this message on Tue, Feb 10, 2015 at 10:36 -0500: > > I think devd grows these things because it's easier than teaching the > > devctl interface to support multiple listeners. > > That wasn't really my question. My question was if we want distinct streams > or if we want want unified stream. Having a unified stream might very well > make sense (and if so we could rename devd to make that more obvious). The biggested issue that I see w/ using devd as the gateway is that as we add more events, devd will now have to be woken up for ALL events, even when the even has no listeners for it... If we keep adding events, this will be very bad for laptop battery life... This is becoming a standard pub/sub type problem, and there is plenty of research/programs out there that already does this... As someone mentioned earlier, it seems like using kqueue is starting to make more sense for this type of thing where various programs can select what they get woken up for... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 20:21:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0A036DA; Tue, 10 Feb 2015 20:21:01 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57ACE16E; Tue, 10 Feb 2015 20:21:01 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YLHIm-000NVa-A9; Tue, 10 Feb 2015 23:20:56 +0300 Date: Tue, 10 Feb 2015 23:20:56 +0300 From: Slawa Olhovchenkov To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150210202056.GM3698@zxy.spb.ru> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 20:21:01 -0000 On Tue, Feb 10, 2015 at 06:55:28PM +0000, Rui Paulo wrote: > On Feb 10, 2015, at 10:52 AM, Slawa Olhovchenkov wrote: > For common case (I am not talk about current devd implementation -- I > am don't have any inforamtion/metrics/etc) routing and processing > events may be sensitive to delay and ordering: may be exist > requirement 'delay not more then 700ns', may be exist requirement > 'next event process only after complete process previos event'. And > some event handling may be very CPU/disk/etc consumption. Need to good > think over and design API and architecure. > š > routing events do not come over devd (or any other /dev device): > there's a routing socket specifically tailored for that purpose. I am talk abot this: nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03eb"; match "product" "0x2109"; action "kldload -n uftdi"; }; > šFor that type of latency, you probably don't want to be crossing > the kernel/userland barrier too often (or never). We have action for coredump. And have action for automount (when inserting USB disk). Must be coredump wait for complete mounting USB disk? For flapping USB disk need to start multiple mount script? From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 20:45:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F394D82; Tue, 10 Feb 2015 20:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE134651; Tue, 10 Feb 2015 20:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AKjeBS011230; Tue, 10 Feb 2015 20:45:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AKjemC011229; Tue, 10 Feb 2015 20:45:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201502102045.t1AKjemC011229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 10 Feb 2015 20:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278530 - head/lib/libc/nls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 20:45:41 -0000 Author: bdrewery Date: Tue Feb 10 20:45:40 2015 New Revision: 278530 URL: https://svnweb.freebsd.org/changeset/base/278530 Log: When catopen(3) returns an error, it caches the result of that error from r202992. The refcount on the cache entry is not initialized, so any attempt to clean the cache will skip over this item since it likely has a >0 value. This change is currently a NOP. There is work in progress to support freeing the cache which requires this change to avoid a memory leak. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Tue Feb 10 19:41:30 2015 (r278529) +++ head/lib/libc/nls/msgcat.c Tue Feb 10 20:45:40 2015 (r278530) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); np->name = strdup(n); \ np->path = NULL; \ np->catd = NLERR; \ + np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:30:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED2D9B1E; Tue, 10 Feb 2015 21:30:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77EDAAB; Tue, 10 Feb 2015 21:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALULWW034216; Tue, 10 Feb 2015 21:30:21 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALULrg034215; Tue, 10 Feb 2015 21:30:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102130.t1ALULrg034215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278531 - stable/9/sys/x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:30:22 -0000 Author: marius Date: Tue Feb 10 21:30:20 2015 New Revision: 278531 URL: https://svnweb.freebsd.org/changeset/base/278531 Log: Fix PAE build, bus_size_t still is 32 bit in that case. Modified: stable/9/sys/x86/x86/busdma_machdep.c Modified: stable/9/sys/x86/x86/busdma_machdep.c ============================================================================== --- stable/9/sys/x86/x86/busdma_machdep.c Tue Feb 10 20:45:40 2015 (r278530) +++ stable/9/sys/x86/x86/busdma_machdep.c Tue Feb 10 21:30:20 2015 (r278531) @@ -964,7 +964,7 @@ busdma_sysctl_tree_top(struct bounce_zon return (bz->sysctl_tree_top); } -#if defined(__amd64__) || defined(PAE) +#if defined(__amd64__) #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD #else #define SYSCTL_ADD_BUS_SIZE_T(ctx, parent, nbr, name, flag, ptr, desc) \ From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:33:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 517A0E63; Tue, 10 Feb 2015 21:33:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BB82BB6; Tue, 10 Feb 2015 21:33:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALXXw5035613; Tue, 10 Feb 2015 21:33:33 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALXWqL035610; Tue, 10 Feb 2015 21:33:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102133.t1ALXWqL035610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278532 - in head/sys/dev: malo mwl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:33:33 -0000 Author: marius Date: Tue Feb 10 21:33:32 2015 New Revision: 278532 URL: https://svnweb.freebsd.org/changeset/base/278532 Log: Fix compilation with GCC in the PAE case. MFC after: 3 days Modified: head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Tue Feb 10 21:30:20 2015 (r278531) +++ head/sys/dev/malo/if_malo.c Tue Feb 10 21:33:32 2015 (r278532) @@ -165,7 +165,7 @@ static void malo_bar0_write4(struct malo_softc *sc, bus_size_t off, uint32_t val) { DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%jx val 0x%x\n", - __func__, (intmax_t)off, val); + __func__, (uintmax_t)off, val); bus_space_write_4(sc->malo_io0t, sc->malo_io0h, off, val); } @@ -510,9 +510,10 @@ malo_desc_setup(struct malo_softc *sc, c ds = dd->dd_desc; memset(ds, 0, dd->dd_desc_len); - DPRINTF(sc, MALO_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n", + DPRINTF(sc, MALO_DEBUG_RESET, + "%s: %s DMA map: %p (%lu) -> 0x%jx (%lu)\n", __func__, dd->dd_name, ds, (u_long) dd->dd_desc_len, - (caddr_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len); + (uintmax_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len); return 0; fail2: @@ -877,10 +878,9 @@ malo_printrxbuf(const struct malo_rxbuf const struct malo_rxdesc *ds = bf->bf_desc; uint32_t status = le32toh(ds->status); - printf("R[%2u] (DS.V:%p DS.P:%p) NEXT:%08x DATA:%08x RC:%02x%s\n" + printf("R[%2u] (DS.V:%p DS.P:0x%jx) NEXT:%08x DATA:%08x RC:%02x%s\n" " STAT:%02x LEN:%04x SNR:%02x NF:%02x CHAN:%02x" - " RATE:%02x QOS:%04x\n", - ix, ds, (const struct malo_desc *)bf->bf_daddr, + " RATE:%02x QOS:%04x\n", ix, ds, (uintmax_t)bf->bf_daddr, le32toh(ds->physnext), le32toh(ds->physbuffdata), ds->rxcontrol, ds->rxcontrol != MALO_RXD_CTRL_DRIVER_OWN ? @@ -896,8 +896,7 @@ malo_printtxbuf(const struct malo_txbuf uint32_t status = le32toh(ds->status); printf("Q%u[%3u]", qnum, ix); - printf(" (DS.V:%p DS.P:%p)\n", - ds, (const struct malo_txdesc *)bf->bf_daddr); + printf(" (DS.V:%p DS.P:0x%jx)\n", ds, (uintmax_t)bf->bf_daddr); printf(" NEXT:%08x DATA:%08x LEN:%04x STAT:%08x%s\n", le32toh(ds->physnext), le32toh(ds->pktptr), le16toh(ds->pktlen), status, Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Tue Feb 10 21:30:20 2015 (r278531) +++ head/sys/dev/mwl/if_mwl.c Tue Feb 10 21:33:32 2015 (r278532) @@ -2056,9 +2056,10 @@ mwl_desc_setup(struct mwl_softc *sc, con ds = dd->dd_desc; memset(ds, 0, dd->dd_desc_len); - DPRINTF(sc, MWL_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n", + DPRINTF(sc, MWL_DEBUG_RESET, + "%s: %s DMA map: %p (%lu) -> 0x%jx (%lu)\n", __func__, dd->dd_name, ds, (u_long) dd->dd_desc_len, - (caddr_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len); + (uintmax_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len); return 0; fail2: @@ -4688,11 +4689,10 @@ mwl_printrxbuf(const struct mwl_rxbuf *b const struct mwl_rxdesc *ds = bf->bf_desc; uint32_t status = le32toh(ds->Status); - printf("R[%2u] (DS.V:%p DS.P:%p) NEXT:%08x DATA:%08x RC:%02x%s\n" + printf("R[%2u] (DS.V:%p DS.P:0x%jx) NEXT:%08x DATA:%08x RC:%02x%s\n" " STAT:%02x LEN:%04x RSSI:%02x CHAN:%02x RATE:%02x QOS:%04x HT:%04x\n", - ix, ds, (const struct mwl_desc *)bf->bf_daddr, - le32toh(ds->pPhysNext), le32toh(ds->pPhysBuffData), - ds->RxControl, + ix, ds, (uintmax_t)bf->bf_daddr, le32toh(ds->pPhysNext), + le32toh(ds->pPhysBuffData), ds->RxControl, ds->RxControl != EAGLE_RXD_CTRL_DRIVER_OWN ? "" : (status & EAGLE_RXD_STATUS_OK) ? " *" : " !", ds->Status, le16toh(ds->PktLen), ds->RSSI, ds->Channel, @@ -4706,8 +4706,7 @@ mwl_printtxbuf(const struct mwl_txbuf *b uint32_t status = le32toh(ds->Status); printf("Q%u[%3u]", qnum, ix); - printf(" (DS.V:%p DS.P:%p)\n", - ds, (const struct mwl_txdesc *)bf->bf_daddr); + printf(" (DS.V:%p DS.P:0x%jx)\n", ds, (uintmax_t)bf->bf_daddr); printf(" NEXT:%08x DATA:%08x LEN:%04x STAT:%08x%s\n", le32toh(ds->pPhysNext), le32toh(ds->PktPtr), le16toh(ds->PktLen), status, From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:40:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F76C2DB; Tue, 10 Feb 2015 21:40:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2971DC52; Tue, 10 Feb 2015 21:40:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALeWfU036731; Tue, 10 Feb 2015 21:40:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALeWgo036730; Tue, 10 Feb 2015 21:40:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102140.t1ALeWgo036730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278533 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:40:32 -0000 Author: marius Date: Tue Feb 10 21:40:31 2015 New Revision: 278533 URL: https://svnweb.freebsd.org/changeset/base/278533 Log: MFC: r273050 class, subclass and progif were never used, so don't bother setting them. Modified: stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:33:32 2015 (r278532) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:40:31 2015 (r278533) @@ -261,16 +261,12 @@ sdhci_pci_attach(device_t dev) struct sdhci_pci_softc *sc = device_get_softc(dev); uint32_t model; uint16_t subvendor; - uint8_t class, subclass, progif; int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); - class = pci_get_class(dev); - subclass = pci_get_subclass(dev); - progif = pci_get_progif(dev); /* Apply chip specific quirks. */ for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:41:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E416502; Tue, 10 Feb 2015 21:41:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F143CFA; Tue, 10 Feb 2015 21:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALfuRD038626; Tue, 10 Feb 2015 21:41:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALfuK3038625; Tue, 10 Feb 2015 21:41:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502102141.t1ALfuK3038625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 21:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278534 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:41:57 -0000 Author: jhb Date: Tue Feb 10 21:41:56 2015 New Revision: 278534 URL: https://svnweb.freebsd.org/changeset/base/278534 Log: MFC 277709: Use an sbuf to generate the output of the net.inet.tcp.hostcache.list sysctl to avoid a possible buffer overflow if the cache grows while the text is being generated. PR: 172675 Modified: stable/10/sys/netinet/tcp_hostcache.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netinet/tcp_hostcache.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/10/sys/netinet/tcp_hostcache.c Tue Feb 10 21:40:31 2015 (r278533) +++ stable/10/sys/netinet/tcp_hostcache.c Tue Feb 10 21:41:56 2015 (r278534) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -592,30 +593,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -637,13 +635,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:41:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D966C503; Tue, 10 Feb 2015 21:41:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9803CFB; Tue, 10 Feb 2015 21:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALfv9Z038632; Tue, 10 Feb 2015 21:41:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALfv7C038631; Tue, 10 Feb 2015 21:41:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502102141.t1ALfv7C038631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 21:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278534 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:41:58 -0000 Author: jhb Date: Tue Feb 10 21:41:56 2015 New Revision: 278534 URL: https://svnweb.freebsd.org/changeset/base/278534 Log: MFC 277709: Use an sbuf to generate the output of the net.inet.tcp.hostcache.list sysctl to avoid a possible buffer overflow if the cache grows while the text is being generated. PR: 172675 Modified: stable/9/sys/netinet/tcp_hostcache.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet/tcp_hostcache.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/9/sys/netinet/tcp_hostcache.c Tue Feb 10 21:40:31 2015 (r278533) +++ stable/9/sys/netinet/tcp_hostcache.c Tue Feb 10 21:41:56 2015 (r278534) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -592,30 +593,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -637,13 +635,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 21:44:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3FF4820; Tue, 10 Feb 2015 21:44:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93E7FD24; Tue, 10 Feb 2015 21:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALiTIM040906; Tue, 10 Feb 2015 21:44:29 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALiTjB040905; Tue, 10 Feb 2015 21:44:29 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102144.t1ALiTjB040905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278535 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:44:29 -0000 Author: marius Date: Tue Feb 10 21:44:28 2015 New Revision: 278535 URL: https://svnweb.freebsd.org/changeset/base/278535 Log: MFC: r276469 - Switching the mode of Ricoh R5CE823 to SD2.0 causes their PCI device ID to change to 0xe822, which may be persistent across reboots and, thus, confuse other OSes. Therefore, restore the original mode and frequency setting on detach and shutdown. - Report Ricoh R5CE822 as such. - According to Linux, Ricoh R5CE822 also need SDHCI_QUIRK_LOWER_FREQUENCY. - Nuke an unused softc member. Modified: stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:41:56 2015 (r278534) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:44:28 2015 (r278535) @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); */ #define SDHC_PCI_MODE_KEY 0xf9 #define SDHC_PCI_MODE 0x150 -#define SDHC_PCI_MODE_SD20 0x10 +#define SDHC_PCI_MODE_SD20 0x10 #define SDHC_PCI_BASE_FREQ_KEY 0xfc #define SDHC_PCI_BASE_FREQ 0xe1 @@ -83,8 +83,9 @@ static const struct sdhci_device { } sdhci_devices[] = { { 0x08221180, 0xffff, "RICOH R5C822 SD", SDHCI_QUIRK_FORCE_DMA }, - { 0xe8221180, 0xffff, "RICOH SD", - SDHCI_QUIRK_FORCE_DMA }, + { 0xe8221180, 0xffff, "RICOH R5CE822 SD", + SDHCI_QUIRK_FORCE_DMA | + SDHCI_QUIRK_LOWER_FREQUENCY }, { 0xe8231180, 0xffff, "RICOH R5CE823 SD", SDHCI_QUIRK_LOWER_FREQUENCY }, { 0x8034104c, 0xffff, "TI XX21/XX11 SD", @@ -109,7 +110,6 @@ static const struct sdhci_device { }; struct sdhci_pci_softc { - device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ void *intrhand; /* Interrupt handle */ @@ -117,6 +117,8 @@ struct sdhci_pci_softc { int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ + uint8_t cfg_freq; /* Saved mode */ + uint8_t cfg_mode; /* Saved frequency */ }; static int sdhci_enable_msi = 1; @@ -207,21 +209,43 @@ static void sdhci_pci_intr(void *arg); static void sdhci_lower_frequency(device_t dev) { + struct sdhci_pci_softc *sc = device_get_softc(dev); - /* Enable SD2.0 mode. */ + /* + * Enable SD2.0 mode. + * NB: for RICOH R5CE823, this changes the PCI device ID to 0xe822. + */ pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1); + sc->cfg_mode = pci_read_config(dev, SDHC_PCI_MODE, 1); pci_write_config(dev, SDHC_PCI_MODE, SDHC_PCI_MODE_SD20, 1); pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1); /* * Some SD/MMC cards don't work with the default base - * clock frequency of 200MHz. Lower it to 50Hz. + * clock frequency of 200 MHz. Lower it to 50 MHz. */ pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1); + sc->cfg_freq = pci_read_config(dev, SDHC_PCI_BASE_FREQ, 1); pci_write_config(dev, SDHC_PCI_BASE_FREQ, 50, 1); pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1); } +static void +sdhci_restore_frequency(device_t dev) +{ + struct sdhci_pci_softc *sc = device_get_softc(dev); + + /* Restore mode. */ + pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1); + pci_write_config(dev, SDHC_PCI_MODE, sc->cfg_mode, 1); + pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1); + + /* Restore frequency. */ + pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1); + pci_write_config(dev, SDHC_PCI_BASE_FREQ, sc->cfg_freq, 1); + pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1); +} + static int sdhci_pci_probe(device_t dev) { @@ -263,7 +287,6 @@ sdhci_pci_attach(device_t dev) uint16_t subvendor; int bar, err, rid, slots, i; - sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); @@ -353,6 +376,18 @@ sdhci_pci_detach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res[i]), sc->mem_res[i]); } + if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) + sdhci_restore_frequency(dev); + return (0); +} + +static int +sdhci_pci_shutdown(device_t dev) +{ + struct sdhci_pci_softc *sc = device_get_softc(dev); + + if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) + sdhci_restore_frequency(dev); return (0); } @@ -398,6 +433,7 @@ static device_method_t sdhci_methods[] = DEVMETHOD(device_probe, sdhci_pci_probe), DEVMETHOD(device_attach, sdhci_pci_attach), DEVMETHOD(device_detach, sdhci_pci_detach), + DEVMETHOD(device_shutdown, sdhci_pci_shutdown), DEVMETHOD(device_suspend, sdhci_pci_suspend), DEVMETHOD(device_resume, sdhci_pci_resume), From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 22:23:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0B068B3; Tue, 10 Feb 2015 22:23:38 +0000 (UTC) Received: from pmta2.delivery10.ore.mailhop.org (pmta2.delivery10.ore.mailhop.org [54.69.62.154]) by mx1.freebsd.org (Postfix) with ESMTP id B87781E8; Tue, 10 Feb 2015 22:23:38 +0000 (UTC) Received: from smtp2.ore.mailhop.org (172.31.36.112) by pmta2.delivery1.ore.mailhop.org id hra2eo20u50d; Tue, 10 Feb 2015 20:32:41 +0000 (envelope-from ) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YLHU6-000585-TN; Tue, 10 Feb 2015 20:32:39 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1AKWbcJ083573; Tue, 10 Feb 2015 13:32:37 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19pzzN6L/PMgMaSvJE571gA Message-ID: <1423600357.80968.25.camel@freebsd.org> Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Ian Lepore To: John-Mark Gurney Date: Tue, 10 Feb 2015 13:32:37 -0700 In-Reply-To: <20150210201550.GH1953@funkthat.com> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <1516483.e0EXgdk9ur@ralph.baldwin.cx> <2907775.GXqUUp6Hz6@ralph.baldwin.cx> <20150210201550.GH1953@funkthat.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Rui Paulo , John Baldwin , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 22:23:39 -0000 On Tue, 2015-02-10 at 12:15 -0800, John-Mark Gurney wrote: > John Baldwin wrote this message on Tue, Feb 10, 2015 at 10:36 -0500: > > > I think devd grows these things because it's easier than teaching the > > > devctl interface to support multiple listeners. > > > > That wasn't really my question. My question was if we want distinct streams > > or if we want want unified stream. Having a unified stream might very well > > make sense (and if so we could rename devd to make that more obvious). > > The biggested issue that I see w/ using devd as the gateway is that > as we add more events, devd will now have to be woken up for ALL events, > even when the even has no listeners for it... If we keep adding events, > this will be very bad for laptop battery life... > That's similar to my worry but for our apps at $work the problem extends to them as well... the kernel will wake up devd for lots of events it doesn't need to process, then it fans them out to our app which also gets woken for events that it's not interested in. Big iron in datacenters isn't going to have any problems with this, but embedded systems at the low end are still somewhat cycle-sensitive. The worrisome part is the creep. Right now it's just crashdumps, and that isn't going to add any overhead for $work, because our apps never crash (::grin::). But the floodgates are open and in a couple years it's going to be a lot of new kinds of events and a lot of new cycles consumed processing them in userland. > This is becoming a standard pub/sub type problem, and there is plenty > of research/programs out there that already does this... > > As someone mentioned earlier, it seems like using kqueue is starting > to make more sense for this type of thing where various programs can > select what they get woken up for... > Filtering at the source (or nearer to it) does seem to be one way to get everything that's good about a generic event notification daemon without all of the bad that will accumulate if we just stumble into it without a long term vision. I'm not as familiar with kevent specifics as I'd like to be, so I can't say it's a ready to use off the shelf solution, but it may be part of one. -- Ian From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 22:23:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A624A9F2; Tue, 10 Feb 2015 22:23:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F0F1F0; Tue, 10 Feb 2015 22:23:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1AMNr2V060625; Tue, 10 Feb 2015 22:23:53 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AMNrW8060624; Tue, 10 Feb 2015 22:23:53 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201502102223.t1AMNrW8060624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Tue, 10 Feb 2015 22:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278541 - head/usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 22:23:53 -0000 Author: grembo (ports committer) Date: Tue Feb 10 22:23:52 2015 New Revision: 278541 URL: https://svnweb.freebsd.org/changeset/base/278541 Log: Add xo_finish() to w.c in case it's invoked as uptime Reviewed by: marcel Approved by: marcel Differential Revision: https://reviews.freebsd.org/D1821 Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Tue Feb 10 22:05:57 2015 (r278540) +++ head/usr.bin/w/w.c Tue Feb 10 22:23:52 2015 (r278541) @@ -264,7 +264,9 @@ main(int argc, char *argv[]) if (header || wcmd == 0) { pr_header(&now, nusers); if (wcmd == 0) { - xo_close_container("uptime-information"); + xo_close_container("uptime-information"); + xo_finish(); + (void)kvm_close(kd); exit(0); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 23:18:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DCA2153; Tue, 10 Feb 2015 23:18:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7836F98F; Tue, 10 Feb 2015 23:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ANIbUY085220; Tue, 10 Feb 2015 23:18:37 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ANIb2N085219; Tue, 10 Feb 2015 23:18:37 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201502102318.t1ANIb2N085219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Tue, 10 Feb 2015 23:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278543 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 23:18:37 -0000 Author: jmg Date: Tue Feb 10 23:18:36 2015 New Revision: 278543 URL: https://svnweb.freebsd.org/changeset/base/278543 Log: fetch has supported https for a while.. I would convert the url to https, but we still don't install a CA set by default... we even don't install the CA that authenticates www.FreeBSD.org.. Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Tue Feb 10 22:29:07 2015 (r278542) +++ head/games/fortune/datfiles/freebsd-tips Tue Feb 10 23:18:36 2015 (r278543) @@ -443,7 +443,7 @@ on this system. Example entries are in % You can use "pkg info" to see a list of packages you have installed. % -You can use the 'fetch' command to retrieve files over ftp or http. +You can use the 'fetch' command to retrieve files over ftp, http or https. fetch http://www.FreeBSD.org/index.html From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 00:43:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B60E307; Wed, 11 Feb 2015 00:43:43 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtpout001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4790D2EF; Wed, 11 Feb 2015 00:43:42 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJL0067M0ORQB30@st11p02mm-asmtp001.mac.com>; Wed, 11 Feb 2015 00:43:40 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-10_07:2015-02-10,2015-02-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502110005 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJL00GZE0ORIA30@st11p02mm-spool002.mac.com>; Wed, 11 Feb 2015 00:43:39 +0000 (GMT) To: Konstantin Belousov From: Rui Paulo Subject: =?utf-8?B?UmU6IHN2biBjb21taXQ6IHIyNzg0NzMgLSBpbiBoZWFkL3N5czogYW1kNjQv?= =?utf-8?B?YW1kNjQgYW1kNjQvaW5jbHVkZSBhbWQ2NC92bW0gY29udHJpYi9kZXYvYWNw?= =?utf-8?B?aWNhL2luY2x1ZGUgaTM4Ni9pMzg2IGkzODYvaW5jbHVkZSB4ODYvYWNwaWNh?= =?utf-8?B?IHg4Ni9pbmNsdWRlIHg4Ni94ODYgeDg2L3hlbg==?= Date: Wed, 11 Feb 2015 00:43:39 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 00:43:43 -0000 On Feb 09, 2015, at 01:01 PM, Konstantin Belousov wrote:= =0A=0AAuthor: kib=0ADate: Mon Feb 9 21:00:56 2015=0ANew Revision: 278473=0A= URL: https://svnweb.freebsd.org/changeset/base/278473=0A=0ALog:=0AAdd x2AP= IC support. Enable it by default if CPU is capable. The=0Ahw.x2apic_enable= tunable allows disabling it from the loader prompt.=0A=C2=A0=0AThis break= s VMware Fusion when the host CPU has x2APIC support. =C2=A0In my case, mp= t(4) was unable to receive interrupts and USB was similarly broken. =C2=A0= It's possible that this is a VMware bug, but you might want to avoid turni= ng this on when running under the VMware hypervisor.= From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 00:58:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EAEC4F6; Wed, 11 Feb 2015 00:58:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 500793F7; Wed, 11 Feb 2015 00:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B0wGWV032752; Wed, 11 Feb 2015 00:58:16 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B0wGYZ032751; Wed, 11 Feb 2015 00:58:16 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502110058.t1B0wGYZ032751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 11 Feb 2015 00:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278545 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 00:58:17 -0000 Author: rpaulo Date: Wed Feb 11 00:58:15 2015 New Revision: 278545 URL: https://svnweb.freebsd.org/changeset/base/278545 Log: Restore the data array in coredump(), but use a different style to calculate the length. Requested by: kib Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Feb 10 23:48:06 2015 (r278544) +++ head/sys/kern/kern_sig.c Wed Feb 11 00:58:15 2015 (r278545) @@ -3261,9 +3261,11 @@ coredump(struct thread *td) void *rl_cookie; off_t limit; int compress; - char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */ + char *data = NULL; char *fullpath, *freepath = NULL; size_t len; + static const char comm_name[] = "comm="; + static const char core_name[] = "core="; #ifdef COMPRESS_USER_CORES compress = compress_user_cores; @@ -3357,25 +3359,31 @@ close: */ if (coredump_devctl == 0) goto out; + len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 + + sizeof(' ') + sizeof(core_name) - 1; + data = malloc(len, M_TEMP, M_WAITOK); + if (data == NULL) + goto out; if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) goto out; if (!coredump_sanitise_path(fullpath)) goto out; - snprintf(data, sizeof(data), "comm=%s ", fullpath); + snprintf(data, len, "%s%s ", comm_name, fullpath); free(freepath, M_TEMP); freepath = NULL; if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) goto out; if (!coredump_sanitise_path(fullpath)) goto out; - strlcat(data, "core=", sizeof(data)); - len = strlcat(data, fullpath, sizeof(data)); + strlcat(data, core_name, len); + strlcat(data, fullpath, len); devctl_notify("kernel", "signal", "coredump", data); out: #ifdef AUDIT audit_proc_coredump(td, name, error); #endif free(freepath, M_TEMP); + free(data, M_TEMP); free(name, M_TEMP); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 02:43:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38E2E6B9; Wed, 11 Feb 2015 02:43:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241CD8; Wed, 11 Feb 2015 02:43:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B2hx3Z082990; Wed, 11 Feb 2015 02:43:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B2hwMY082989; Wed, 11 Feb 2015 02:43:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201502110243.t1B2hwMY082989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 11 Feb 2015 02:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278550 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 02:43:59 -0000 Author: cy Date: Wed Feb 11 02:43:58 2015 New Revision: 278550 URL: https://svnweb.freebsd.org/changeset/base/278550 Log: MFC r277854: ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4 and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table, including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa statement. PR: 188318 Modified: stable/10/etc/rc.d/ipfilter Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/ipfilter ============================================================================== --- stable/10/etc/rc.d/ipfilter Wed Feb 11 02:02:56 2015 (r278549) +++ stable/10/etc/rc.d/ipfilter Wed Feb 11 02:43:58 2015 (r278550) @@ -65,7 +65,6 @@ ipfilter_reload() err 1 'Load of rules into alternate set failed; aborting reload' fi fi - ${ipfilter_program:-/sbin/ipf} -I -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 05:25:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 685A0D6; Wed, 11 Feb 2015 05:25:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 511F62ED; Wed, 11 Feb 2015 05:25:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B5PPbf059374; Wed, 11 Feb 2015 05:25:25 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B5PONC059370; Wed, 11 Feb 2015 05:25:24 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201502110525.t1B5PONC059370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 11 Feb 2015 05:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278551 - in head: share/man/man4 sys/contrib/dev/ral sys/dev/ral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 05:25:25 -0000 Author: kevlo Date: Wed Feb 11 05:25:23 2015 New Revision: 278551 URL: https://svnweb.freebsd.org/changeset/base/278551 Log: Add preliminary support for the Ralink RT5390 and RT5392 chipsets. Committed over the D-Link DWA-525 rev A2 on amd64 with WPA. Modified: head/share/man/man4/ral.4 head/sys/contrib/dev/ral/microcode.h head/sys/contrib/dev/ral/rt2860.fw.uu head/sys/dev/ral/if_ral_pci.c head/sys/dev/ral/rt2860.c head/sys/dev/ral/rt2860reg.h Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Wed Feb 11 02:43:58 2015 (r278550) +++ head/share/man/man4/ral.4 Wed Feb 11 05:25:23 2015 (r278551) @@ -42,7 +42,7 @@ if_ral_load="YES" The .Nm driver supports PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500, -RT2501, RT2600, RT2700, RT2800 and RT3090 chipsets. +RT2501, RT2600, RT2700, RT2800, RT3090 and RT3900E chipsets. .Pp The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink. It consists of two integrated chips, an RT2560 MAC/BBP and an RT2525 radio @@ -104,6 +104,13 @@ interfaces may be operated together with .Cm hostap interface to construct a wireless repeater device. .Pp +The RT3900E chipset is a single-chip 802.11n adapters from Ralink. +The MAC/Baseband Processor can be an RT5390 or RT5392. +The RT5390 chip operates in the 2GHz spectrum and supports 1 transmit path +and 1 receiver path (1T1R). +The RT5392 chip operates in the 2GHz spectrum and supports up to 2 transmit +paths and 2 receiver paths (2T2R). +.Pp The transmit speed is user-selectable or can be adapted automatically by the driver depending on the number of hardware transmission retries. For more information on configuring this device, see @@ -142,6 +149,7 @@ chipsets, including: .It "Compex WLP54G" Ta RT2560 Ta PCI .It "Conceptronic C54RC" Ta RT2560 Ta CardBus .It "Conceptronic C54Ri" Ta RT2560 Ta PCI +.It "D-Link DWA-525 rev A2" Ta RT5392 Ta PCI .It "Digitus DN-7001G-RA" Ta RT2560 Ta CardBus .It "Digitus DN-7006G-RA" Ta RT2560 Ta PCI .It "E-Tech WGPC02" Ta RT2560 Ta CardBus Modified: head/sys/contrib/dev/ral/microcode.h ============================================================================== --- head/sys/contrib/dev/ral/microcode.h Wed Feb 11 02:43:58 2015 (r278550) +++ head/sys/contrib/dev/ral/microcode.h Wed Feb 11 05:25:23 2015 (r278551) @@ -2268,24 +2268,24 @@ static const uint8_t rt2661[] = { }; static const uint8_t rt2860[] = { - 0x02, 0x03, 0x5b, 0x02, 0x02, 0xa6, 0x22, 0x22, 0xff, 0xff, 0xff, + 0x02, 0x02, 0xa3, 0x02, 0x02, 0x2e, 0x22, 0xff, 0xff, 0xff, 0xff, 0x02, 0x01, 0x2c, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0xdd, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18, 0xc2, 0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x09, 0x90, 0x04, 0x16, 0xe0, 0x30, 0xe3, 0x03, 0x74, 0x08, 0xf0, 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, 0x00, 0xcb, 0x74, 0x80, 0xf0, 0x90, 0x70, 0x12, - 0xe0, 0xf5, 0x36, 0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30, + 0xe0, 0xf5, 0x24, 0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30, 0x14, 0x60, 0x42, 0x24, 0xe2, 0x60, 0x47, 0x14, 0x60, 0x55, 0x24, 0x21, 0x70, 0x60, 0xe5, 0x55, 0x24, 0xfe, 0x60, 0x07, 0x14, 0x60, 0x08, 0x24, 0x02, 0x70, 0x08, 0x7d, 0x01, 0x80, 0x28, 0x7d, 0x02, - 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x50, 0x85, 0x36, 0x40, + 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x50, 0x85, 0x24, 0x40, 0xd2, 0x01, 0x80, 0x3e, 0xe5, 0x55, 0x64, 0x03, 0x60, 0x04, 0xe5, - 0x55, 0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x36, 0x41, 0xd2, - 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, 0x36, 0x12, 0x02, 0x82, 0x80, + 0x55, 0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x24, 0x41, 0xd2, + 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, 0x24, 0x12, 0x02, 0x0a, 0x80, 0x20, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x47, 0x90, 0x70, 0x11, 0xe0, 0xf5, 0x44, 0x12, 0x10, 0x25, 0x80, 0x06, 0x90, 0x70, 0x10, 0xe0, - 0xf5, 0x45, 0xe4, 0xfd, 0xaf, 0x36, 0x12, 0x02, 0x82, 0xd2, 0x04, + 0xf5, 0x45, 0xe4, 0xfd, 0xaf, 0x24, 0x12, 0x02, 0x0a, 0xd2, 0x04, 0x90, 0x70, 0x13, 0xe4, 0xf0, 0x90, 0x70, 0x13, 0xe4, 0xf0, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, @@ -2302,54 +2302,54 @@ static const uint8_t rt2860[] = { 0x15, 0x50, 0x80, 0x02, 0xc2, 0x59, 0xd5, 0x53, 0x07, 0x30, 0x60, 0x04, 0x15, 0x46, 0xd2, 0x04, 0x30, 0x45, 0x03, 0x12, 0x10, 0x0f, 0xc2, 0x8d, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, - 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x43, - 0xc2, 0xaf, 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, - 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0, - 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x37, 0x90, - 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, - 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, - 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0xc2, 0x05, 0xd2, - 0xaf, 0x22, 0x12, 0x02, 0xc8, 0x30, 0x45, 0x03, 0x12, 0x10, 0x03, - 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, 0x10, 0x1c, 0x30, 0x02, - 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03, 0x06, 0x20, - 0x0b, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20, 0x0c, 0x03, - 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, 0x20, 0x11, 0x06, 0xe5, 0x2b, - 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xa9, 0x12, - 0x03, 0x1c, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4, 0xf5, 0x20, - 0xf5, 0x21, 0xf5, 0x53, 0xf5, 0x46, 0xf5, 0x2b, 0xf5, 0x2c, 0xc2, - 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04, 0x18, 0x74, - 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0xc2, 0x1a, 0xc2, - 0x18, 0xc2, 0x1b, 0x22, 0xc8, 0xef, 0xc8, 0xe6, 0xfa, 0x08, 0xe6, - 0x4a, 0x60, 0x0c, 0xc8, 0xef, 0xc8, 0x08, 0xe6, 0x16, 0x18, 0x70, - 0x01, 0x16, 0xc3, 0x22, 0xed, 0x24, 0xff, 0xfd, 0xec, 0x34, 0xff, - 0xc8, 0xef, 0xc8, 0xf6, 0x08, 0xc6, 0xed, 0xc6, 0xd3, 0x22, 0xd0, - 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, - 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, - 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, - 0xa3, 0xa3, 0x80, 0xdf, 0xef, 0xf4, 0x60, 0x1f, 0xe4, 0xfe, 0x12, - 0x03, 0x67, 0xe0, 0xb4, 0xff, 0x12, 0x12, 0x03, 0x67, 0xef, 0xf0, - 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, - 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xe3, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, - 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, 0xaf, - 0x30, 0x45, 0x03, 0x12, 0x10, 0x06, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, - 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc2, 0xaf, 0x12, - 0x00, 0x06, 0x12, 0x02, 0x09, 0x12, 0x02, 0xe1, 0xe4, 0xf5, 0x22, - 0xf5, 0x47, 0x90, 0x04, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0xaf, 0x22, - 0x75, 0x89, 0x02, 0xe4, 0xf5, 0x8c, 0xf5, 0x8a, 0xf5, 0x88, 0xf5, - 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x18, 0xd2, 0x8c, 0x75, 0xa8, 0x05, - 0x22, 0xef, 0x60, 0x03, 0x1f, 0x80, 0xfa, 0x22, 0xff, 0xc0, 0x26, + 0xf0, 0xd0, 0xe0, 0x32, 0x12, 0x02, 0x50, 0x30, 0x45, 0x03, 0x12, + 0x10, 0x03, 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, 0x10, 0x1c, + 0x30, 0x02, 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03, + 0x06, 0x20, 0x0b, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20, + 0x0c, 0x03, 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, 0x20, 0x11, 0x06, + 0xe5, 0x2b, 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, + 0xa9, 0x12, 0x02, 0x80, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4, + 0xf5, 0x20, 0xf5, 0x21, 0xf5, 0x53, 0xf5, 0x46, 0xf5, 0x2b, 0xf5, + 0x2c, 0xc2, 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04, + 0x18, 0x74, 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0x22, + 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, + 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, + 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, + 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xef, 0xf4, 0x60, 0x1f, 0xe4, 0xfe, + 0x12, 0x02, 0xaf, 0xe0, 0xb4, 0xff, 0x12, 0x12, 0x02, 0xaf, 0xef, + 0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, + 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xe3, 0x22, 0xc0, 0xe0, 0xc0, + 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, + 0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x06, 0xd2, 0xaf, 0xd0, 0xd0, + 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc2, 0xaf, + 0x12, 0x00, 0x06, 0x12, 0x01, 0xbe, 0x12, 0x02, 0x69, 0xe4, 0xf5, + 0x22, 0xf5, 0x47, 0x90, 0x04, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0xaf, + 0x22, 0x75, 0x89, 0x02, 0xe4, 0xf5, 0x8c, 0xf5, 0x8a, 0xf5, 0x88, + 0xf5, 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x18, 0xd2, 0x8c, 0x75, 0xa8, + 0x05, 0x22, 0x30, 0x45, 0x03, 0x12, 0x10, 0x15, 0xe5, 0x20, 0x70, + 0x03, 0x20, 0x10, 0x03, 0x30, 0x11, 0x03, 0x43, 0x87, 0x01, 0x22, + 0xce, 0xef, 0xce, 0xee, 0x60, 0x08, 0x7f, 0xff, 0x12, 0x02, 0xc5, + 0x1e, 0x80, 0xf5, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, + 0x81, 0x5f, 0x02, 0x01, 0x7a, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, + 0x34, 0x70, 0xf5, 0x83, 0x22, 0xef, 0x90, 0x02, 0xc3, 0x93, 0x90, + 0x03, 0x00, 0x73, 0x0a, 0x18, 0xef, 0x60, 0x03, 0x1f, 0x80, 0xfa, + 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x26, 0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x26, 0x0a, 0x22, 0xc0, 0x26, 0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, - 0x75, 0x26, 0x18, 0x22, 0x30, 0x45, 0x03, 0x12, 0x10, 0x15, 0xe5, - 0x20, 0x70, 0x03, 0x20, 0x10, 0x03, 0x30, 0x11, 0x03, 0x43, 0x87, - 0x01, 0x22, 0xce, 0xef, 0xce, 0xee, 0x60, 0x08, 0x7f, 0xff, 0x12, - 0x02, 0xf8, 0x1e, 0x80, 0xf5, 0x22, 0xc8, 0xef, 0xc8, 0xe6, 0x60, - 0x03, 0x16, 0xc3, 0x22, 0xed, 0x14, 0xf6, 0xd3, 0x22, 0xc8, 0xef, - 0xc8, 0xe6, 0x60, 0x06, 0x16, 0xe6, 0x24, 0xff, 0xb3, 0x22, 0xc3, - 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x5f, 0x02, - 0x01, 0xc5, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, - 0x83, 0x22, 0xef, 0x90, 0x03, 0x7b, 0x93, 0x90, 0x03, 0x00, 0x73, - 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x75, 0x26, 0x18, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -2641,318 +2641,318 @@ static const uint8_t rt2860[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, - 0x10, 0x3b, 0x02, 0x10, 0x3c, 0x02, 0x13, 0xbc, 0x02, 0x13, 0xbd, - 0x02, 0x14, 0x72, 0x02, 0x14, 0x73, 0xc3, 0x22, 0xff, 0xff, 0x02, - 0x19, 0x4a, 0x02, 0x1a, 0xf4, 0x02, 0x15, 0x6c, 0x02, 0x14, 0xa7, - 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x01, 0x7a, 0x30, 0x06, - 0x06, 0x20, 0x0e, 0x03, 0x12, 0x1c, 0x2e, 0x22, 0x22, 0x90, 0x04, - 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, 0x13, 0xbb, 0x90, 0x70, 0x12, - 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x02, 0x5c, 0x10, - 0xfb, 0x30, 0x10, 0xd2, 0x31, 0x10, 0x93, 0x33, 0x10, 0xa1, 0x34, - 0x10, 0xb4, 0x35, 0x10, 0xab, 0x36, 0x11, 0x09, 0x50, 0x11, 0x4e, - 0x51, 0x11, 0x57, 0x52, 0x11, 0x57, 0x53, 0x11, 0x57, 0x54, 0x11, - 0x93, 0x55, 0x11, 0xf0, 0x56, 0x12, 0x43, 0x70, 0x12, 0x69, 0x71, - 0x12, 0x92, 0x72, 0x13, 0x3e, 0x73, 0x13, 0x61, 0x80, 0x13, 0x88, - 0x83, 0x13, 0xa0, 0x84, 0x00, 0x00, 0x13, 0xbb, 0xd2, 0x18, 0xd2, - 0x61, 0x75, 0x35, 0x2a, 0x75, 0x32, 0x0b, 0x75, 0x33, 0xb8, 0x22, - 0xc2, 0x18, 0x90, 0x01, 0x14, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x90, - 0x70, 0x11, 0xe0, 0xf5, 0x3c, 0x02, 0x13, 0xb5, 0xe5, 0x55, 0xb4, + 0x10, 0x32, 0x02, 0x10, 0x33, 0x02, 0x14, 0xc2, 0x02, 0x14, 0xc3, + 0x02, 0x15, 0x8f, 0x02, 0x15, 0x90, 0xc3, 0x22, 0xff, 0xff, 0x02, + 0x1a, 0x6f, 0x02, 0x1b, 0xec, 0x02, 0x16, 0xbc, 0x02, 0x15, 0xf7, + 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x1d, 0x19, 0x22, 0x22, + 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, 0x14, 0xc1, 0x90, + 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x01, + 0xe4, 0x10, 0xda, 0x30, 0x10, 0xb1, 0x31, 0x10, 0x93, 0x35, 0x10, + 0x8a, 0x36, 0x10, 0xe7, 0x40, 0x10, 0xfe, 0x41, 0x11, 0x15, 0x50, + 0x11, 0x5a, 0x51, 0x11, 0x63, 0x52, 0x11, 0x63, 0x53, 0x11, 0x63, + 0x54, 0x11, 0x9f, 0x55, 0x11, 0xfc, 0x56, 0x12, 0x4f, 0x64, 0x12, + 0x6a, 0x72, 0x13, 0x1e, 0x73, 0x13, 0x42, 0x74, 0x14, 0x35, 0x80, + 0x14, 0xa5, 0x83, 0x14, 0x5c, 0x91, 0x00, 0x00, 0x14, 0xc1, 0x90, + 0x70, 0x11, 0xe0, 0xf5, 0x3c, 0x02, 0x14, 0xbb, 0xe5, 0x55, 0xb4, 0x02, 0x0f, 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01, 0x0d, 0x74, 0x08, 0xf0, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x02, 0xaf, 0x56, 0x12, - 0x02, 0x82, 0x02, 0x13, 0xb5, 0x20, 0x02, 0x03, 0x30, 0x03, 0x0a, - 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02, 0x13, 0xb5, 0xe5, - 0x34, 0xd3, 0x94, 0x01, 0x40, 0x0c, 0x90, 0x01, 0x0c, 0xe0, 0x44, + 0x02, 0x0a, 0x02, 0x14, 0xbb, 0x20, 0x02, 0x03, 0x30, 0x03, 0x0a, + 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x02, 0x14, 0xbb, 0xe5, + 0x30, 0xd3, 0x94, 0x01, 0x40, 0x0c, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x85, 0x56, 0x41, 0xd2, - 0x02, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0x70, 0x03, 0x02, 0x13, - 0xbb, 0xe0, 0xf5, 0x30, 0x22, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, - 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0xbb, 0x90, 0x70, 0x10, - 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, 0xe0, - 0xb4, 0x08, 0x06, 0x75, 0x4e, 0x01, 0x75, 0x4f, 0x84, 0x90, 0x70, - 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x02, 0x12, 0x90, 0x70, 0x11, - 0xe0, 0x64, 0x08, 0x60, 0x04, 0xe0, 0xb4, 0x20, 0x06, 0x75, 0x4e, - 0x03, 0x75, 0x4f, 0x20, 0xe4, 0xf5, 0x27, 0x22, 0x90, 0x70, 0x11, - 0xe0, 0x24, 0xff, 0x92, 0x47, 0x22, 0xe5, 0x34, 0xd3, 0x94, 0x01, - 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x49, 0x90, 0x04, - 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, - 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90, - 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, 0xef, - 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02, 0x13, 0xb5, - 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, - 0x02, 0x13, 0x49, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x1d, 0xe5, 0x47, - 0x64, 0x08, 0x60, 0x17, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x11, 0xe5, - 0x47, 0x64, 0x0a, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x0b, 0x60, 0x05, - 0xe5, 0x47, 0xb4, 0x0c, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x0f, - 0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, - 0x03, 0xe4, 0xf5, 0x46, 0xe5, 0x47, 0xb4, 0x0a, 0x08, 0xe5, 0x3a, - 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12, - 0x02, 0x82, 0xd2, 0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0xff, - 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, 0x11, 0xe0, 0x55, - 0x27, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0, 0x90, - 0x70, 0x19, 0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x30, - 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, 0x18, 0xe0, 0xf5, 0x27, - 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef, - 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, - 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, - 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, - 0x02, 0x13, 0x49, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, - 0xe0, 0xfd, 0xed, 0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, - 0x02, 0x82, 0x02, 0x13, 0xb5, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, - 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x49, 0x90, 0x70, 0x10, - 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, - 0x83, 0xe0, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02, - 0x13, 0xb5, 0x90, 0x10, 0x00, 0xe0, 0xf5, 0x57, 0xe4, 0xf5, 0x58, - 0xf5, 0x59, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x28, 0x05, 0x75, 0x58, - 0x01, 0x80, 0x3c, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x30, 0x05, 0x75, - 0x58, 0x02, 0x80, 0x30, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x33, 0x05, - 0x75, 0x58, 0x04, 0x80, 0x24, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x35, - 0x0c, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x72, 0x05, 0x75, 0x58, 0x08, - 0x80, 0x11, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x35, 0x0a, 0x90, 0x10, - 0x02, 0xe0, 0xb4, 0x93, 0x03, 0x75, 0x58, 0x10, 0xe5, 0x58, 0x30, - 0xe1, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, 0x90, - 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, - 0xfe, 0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75, - 0x3a, 0xff, 0xc2, 0x1a, 0xc2, 0x18, 0xc2, 0x1b, 0xf5, 0x34, 0x90, - 0x05, 0xa4, 0x74, 0x11, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0xa3, 0x74, - 0x03, 0xf0, 0xe4, 0xf5, 0x30, 0xc2, 0x19, 0x90, 0x01, 0x0d, 0xe0, - 0x44, 0x40, 0xf0, 0x75, 0x3c, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, - 0x02, 0x82, 0xe4, 0x90, 0x70, 0x32, 0xf0, 0x80, 0x77, 0xe5, 0x34, - 0xd3, 0x94, 0x01, 0x40, 0x0b, 0xe5, 0x55, 0x60, 0x07, 0x7d, 0x03, - 0xaf, 0x56, 0x02, 0x02, 0x82, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, - 0x92, 0x93, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x54, - 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x0d, 0xe5, 0x55, 0x60, 0x09, - 0x7d, 0x03, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x40, 0x90, 0x70, - 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf, - 0x56, 0x12, 0x02, 0x82, 0x80, 0x2d, 0xe4, 0xf5, 0x34, 0xf5, 0x30, - 0x90, 0x70, 0x10, 0xe0, 0xf4, 0x60, 0x03, 0xe0, 0xf5, 0x34, 0xad, - 0x57, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x15, 0xd2, 0x19, 0x05, - 0x2f, 0xe5, 0x2f, 0xb4, 0x1a, 0x03, 0xe4, 0xf5, 0x2f, 0xd2, 0x04, - 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x90, 0x04, 0x14, 0x74, - 0x80, 0xf0, 0x22, 0x22, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x17, - 0xe5, 0x55, 0xb4, 0x02, 0x12, 0xe5, 0x30, 0x60, 0x0e, 0x30, 0x60, - 0x0b, 0x74, 0xfd, 0x25, 0x46, 0xf5, 0x46, 0xd2, 0x04, 0xe4, 0xf5, - 0x53, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x14, 0x71, 0x30, 0x60, 0x21, - 0xb2, 0x4d, 0x30, 0x4d, 0x1c, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, - 0x11, 0xe5, 0x55, 0xb4, 0x02, 0x0c, 0xe5, 0x30, 0x60, 0x08, 0x74, - 0x03, 0x25, 0x46, 0xf5, 0x46, 0x80, 0x02, 0x05, 0x46, 0xc2, 0x04, - 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70, - 0x02, 0x15, 0x4e, 0x30, 0x1a, 0x49, 0x7f, 0x32, 0x7d, 0xb8, 0x7c, - 0x0b, 0x12, 0x02, 0x35, 0x50, 0x06, 0x90, 0x04, 0x10, 0x74, 0x40, - 0xf0, 0x7f, 0x35, 0x7d, 0x32, 0x12, 0x03, 0x3f, 0x50, 0x09, 0x90, - 0x10, 0x04, 0xe0, 0x54, 0xf7, 0xf0, 0xd2, 0x06, 0xe5, 0x35, 0xd3, - 0x94, 0x2d, 0x40, 0x30, 0x30, 0x1b, 0x2d, 0xc2, 0x1b, 0xa2, 0x18, - 0x92, 0x1a, 0x20, 0x1a, 0x24, 0x90, 0x04, 0x09, 0xe0, 0x54, 0xdd, - 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x08, 0xf0, 0xc2, 0x61, 0xd2, - 0x03, 0x22, 0xe4, 0xf5, 0x35, 0xa2, 0x18, 0x92, 0x1a, 0x30, 0x1a, - 0x07, 0x90, 0x04, 0x09, 0xe0, 0x44, 0x22, 0xf0, 0x22, 0x22, 0x30, - 0x14, 0x30, 0x90, 0x70, 0x19, 0xe0, 0x55, 0x27, 0xff, 0x90, 0x70, - 0x18, 0xe0, 0x4f, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, - 0x70, 0x19, 0xe0, 0xfe, 0xef, 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, - 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90, - 0x02, 0x28, 0xef, 0xf0, 0xc2, 0x14, 0x22, 0xc2, 0x4b, 0xc2, 0x4c, - 0xe5, 0x44, 0x12, 0x02, 0x5c, 0x14, 0xc9, 0x00, 0x15, 0x57, 0x04, - 0x15, 0x53, 0x08, 0x15, 0x33, 0x10, 0x14, 0xdd, 0x20, 0x14, 0xfd, - 0x60, 0x15, 0x0e, 0xa0, 0x00, 0x00, 0x15, 0x59, 0x85, 0x48, 0x43, - 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, - 0x03, 0x02, 0x15, 0x59, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, - 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, - 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x61, - 0x53, 0x43, 0x0f, 0x80, 0x5c, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, - 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4d, 0x80, 0x1b, - 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, - 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, - 0x47, 0x64, 0x06, 0x70, 0x30, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, - 0xf5, 0x43, 0x80, 0x26, 0xe5, 0x47, 0x64, 0x04, 0x60, 0x05, 0xe5, - 0x47, 0xb4, 0x05, 0x06, 0x43, 0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, - 0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, - 0x43, 0x80, 0x06, 0xd2, 0x4b, 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, - 0x2a, 0xe5, 0x42, 0xc4, 0x54, 0xf0, 0xff, 0xe5, 0x43, 0x54, 0x0f, - 0x4f, 0xf5, 0x5f, 0xd2, 0x60, 0x22, 0xd2, 0x15, 0xe5, 0x47, 0x24, - 0xf5, 0x60, 0x0b, 0x24, 0xcb, 0x60, 0x07, 0x24, 0x40, 0x70, 0x06, - 0xc2, 0x15, 0x22, 0x12, 0x19, 0x15, 0x12, 0x15, 0x8e, 0xc2, 0x15, - 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x90, 0x04, - 0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x1c, 0x80, 0x08, 0xe5, - 0x4e, 0x45, 0x4f, 0x24, 0xff, 0x92, 0x1c, 0xd2, 0xaf, 0x90, 0x04, - 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x1d, 0x74, 0x1e, 0xf0, 0xe5, 0x5f, - 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x2a, 0x70, 0x13, 0x30, 0x1c, 0x05, - 0xe5, 0x5f, 0x20, 0xe5, 0x0b, 0x30, 0x1d, 0x29, 0xe5, 0x5f, 0x54, - 0x30, 0x64, 0x30, 0x70, 0x21, 0xe5, 0x2a, 0x70, 0x15, 0xe5, 0x34, - 0xc3, 0x94, 0x03, 0x40, 0x09, 0xe5, 0x30, 0x60, 0x05, 0x75, 0x2a, - 0x05, 0x80, 0x07, 0x75, 0x2a, 0x0c, 0x80, 0x02, 0x15, 0x2a, 0xd2, - 0x6c, 0xd2, 0x6d, 0x80, 0x0f, 0xe5, 0x5f, 0x30, 0xe6, 0x06, 0xc2, - 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, 0x47, - 0x64, 0x03, 0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, - 0x80, 0x18, 0xe5, 0x2a, 0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, 0x4c, - 0xe5, 0x2a, 0x70, 0x05, 0x75, 0x2a, 0x07, 0x80, 0x02, 0x15, 0x2a, - 0xd2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, - 0x20, 0xe3, 0x0b, 0xe5, 0x3a, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x3a, - 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x0a, - 0x13, 0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, - 0x08, 0xe5, 0x3a, 0x70, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0x20, 0x69, - 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, 0x07, - 0xe5, 0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, - 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x75, 0x2e, 0x40, 0x20, 0x69, - 0x04, 0xa2, 0x68, 0x80, 0x45, 0x30, 0x68, 0x06, 0xe5, 0x46, 0xa2, - 0xe2, 0x80, 0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, 0x20, 0xe0, 0x04, - 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x2f, 0xb4, 0x19, 0x04, - 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x80, - 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, - 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, - 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, 0x92, - 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x45, 0x30, 0x6a, 0x06, - 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, - 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x2f, - 0xb4, 0x19, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, - 0x24, 0xff, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe1, 0x04, 0x7f, 0x01, + 0x02, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xb4, 0x5a, 0x03, 0xc2, 0x4f, + 0x22, 0xd2, 0x4f, 0x22, 0xe5, 0x30, 0xd3, 0x94, 0x01, 0x50, 0x03, + 0x02, 0x14, 0xc1, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x02, 0xf0, 0xa3, + 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xe5, 0x30, 0xd3, 0x94, 0x01, 0x50, + 0x03, 0x02, 0x14, 0xc1, 0x90, 0x01, 0x0c, 0xe0, 0x54, 0xfd, 0xf0, + 0xa3, 0xe0, 0x54, 0xfb, 0xf0, 0x22, 0xe5, 0x30, 0xd3, 0x94, 0x01, + 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x14, 0xc1, 0x90, 0x70, + 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, + 0xe0, 0xb4, 0x08, 0x06, 0x75, 0x4e, 0x01, 0x75, 0x4f, 0x84, 0x90, + 0x70, 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x02, 0x12, 0x90, 0x70, + 0x11, 0xe0, 0x64, 0x08, 0x60, 0x04, 0xe0, 0xb4, 0x20, 0x06, 0x75, + 0x4e, 0x03, 0x75, 0x4f, 0x20, 0xe4, 0xf5, 0x3f, 0x22, 0x90, 0x70, + 0x11, 0xe0, 0x24, 0xff, 0x92, 0x47, 0x22, 0xe5, 0x30, 0xd3, 0x94, + 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x29, 0x90, + 0x04, 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, + 0x10, 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, + 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, + 0xef, 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x02, 0x14, + 0xbb, 0xe5, 0x30, 0xd3, 0x94, 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, + 0x03, 0x02, 0x13, 0x29, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x1d, 0xe5, + 0x47, 0x64, 0x08, 0x60, 0x17, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x11, + 0xe5, 0x47, 0x64, 0x0a, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x0b, 0x60, + 0x05, 0xe5, 0x47, 0xb4, 0x0c, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, + 0x0f, 0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, + 0x03, 0x03, 0xe4, 0xf5, 0x46, 0xe5, 0x47, 0xb4, 0x0a, 0x08, 0xe5, + 0x3a, 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, + 0x12, 0x02, 0x0a, 0xd2, 0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, + 0xff, 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, 0x11, 0xe0, + 0x55, 0x3f, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0, + 0x90, 0x70, 0x19, 0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x0a, + 0x30, 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, 0x18, 0xe0, 0xf5, + 0x3f, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, + 0xef, 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x3f, + 0x80, 0x04, 0xe5, 0x3f, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, + 0x22, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x1a, 0x75, 0x32, + 0x03, 0x75, 0x33, 0x1f, 0xe4, 0xf5, 0x31, 0xad, 0x57, 0xaf, 0x56, + 0x12, 0x02, 0x0a, 0x02, 0x14, 0xbb, 0x90, 0x10, 0x00, 0xe0, 0xf5, + 0x57, 0xe4, 0xf5, 0x58, 0xf5, 0x59, 0x90, 0x10, 0x03, 0xe0, 0xb4, + 0x28, 0x05, 0x75, 0x58, 0x01, 0x80, 0x3c, 0x90, 0x10, 0x03, 0xe0, + 0xb4, 0x30, 0x05, 0x75, 0x58, 0x02, 0x80, 0x30, 0x90, 0x10, 0x03, + 0xe0, 0xb4, 0x33, 0x05, 0x75, 0x58, 0x04, 0x80, 0x24, 0x90, 0x10, + 0x03, 0xe0, 0xb4, 0x35, 0x0c, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x72, + 0x05, 0x75, 0x58, 0x08, 0x80, 0x11, 0x90, 0x10, 0x03, 0xe0, 0xb4, + 0x35, 0x0a, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x93, 0x03, 0x75, 0x58, + 0x10, 0xe5, 0x58, 0x30, 0xe1, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, + 0x01, 0xf0, 0xfd, 0x90, 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, + 0x04, 0xf0, 0xed, 0x54, 0xfe, 0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, + 0x4e, 0xf5, 0x4f, 0x75, 0x3a, 0xff, 0xf5, 0x30, 0x90, 0x05, 0xa4, + 0x74, 0x11, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0xa3, 0x74, 0x03, 0xf0, + 0xd2, 0x4f, 0x90, 0x01, 0x0d, 0xe0, 0x44, 0x40, 0xf0, 0x75, 0x3c, + 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x90, 0x70, 0x36, + 0x74, 0x37, 0xf0, 0xa3, 0x74, 0x32, 0xf0, 0x90, 0x04, 0x01, 0xe0, + 0x44, 0x01, 0xf0, 0xc2, 0x1a, 0xc2, 0x17, 0x02, 0x14, 0xbb, 0xe5, + 0x30, 0xd3, 0x94, 0x01, 0x40, 0x0b, 0xe5, 0x55, 0x60, 0x07, 0x7d, + 0x03, 0xaf, 0x56, 0x02, 0x02, 0x0a, 0x90, 0x70, 0x10, 0xe0, 0x24, + 0xff, 0x92, 0x93, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x02, + 0x14, 0xbb, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, + 0x10, 0x2f, 0x74, 0x40, 0xf0, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x7f, + 0xf5, 0x57, 0xe0, 0x54, 0x80, 0x90, 0x70, 0x32, 0xf0, 0x90, 0x70, + 0x10, 0xe0, 0xff, 0xe5, 0x57, 0xd3, 0x9f, 0x40, 0x43, 0x90, 0x70, + 0x33, 0xe5, 0x57, 0xf0, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x90, 0x70, + 0x33, 0xe0, 0xc3, 0x9f, 0xd3, 0x94, 0x04, 0x40, 0x73, 0xe0, 0x24, + 0xfc, 0xf0, 0xe0, 0xff, 0x90, 0x70, 0x32, 0xe0, 0x4f, 0x90, 0x05, + 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60, 0x04, 0x7f, 0x17, 0x80, + 0x02, 0x7f, 0x11, 0x90, 0x05, 0x01, 0xef, 0xf0, 0xa3, 0x74, 0x01, + 0xf0, 0x74, 0x03, 0xf0, 0xff, 0x12, 0x02, 0x94, 0x80, 0xc3, 0x90, + 0x70, 0x33, 0xe5, 0x57, 0xf0, 0x90, 0x70, 0x33, 0xe0, 0xff, 0x90, + 0x70, 0x10, 0xe0, 0xc3, 0x9f, 0xd3, 0x94, 0x04, 0x40, 0x30, 0x90, + 0x70, 0x33, 0xe0, 0x24, 0x04, 0xf0, 0xe0, 0xff, 0x90, 0x70, 0x32, + 0xe0, 0x4f, 0x90, 0x05, 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60, + 0x04, 0x7f, 0x17, 0x80, 0x02, 0x7f, 0x11, 0x90, 0x05, 0x01, 0xef, + 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0xff, 0x12, 0x02, + 0x94, 0x80, 0xc0, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x90, 0x70, 0x32, + 0xe0, 0x4f, 0x90, 0x05, 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60, + 0x04, 0x7f, 0x17, 0x80, 0x02, 0x7f, 0x11, 0x90, 0x05, 0x01, 0xef, + 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0xff, 0x12, 0x02, + 0x94, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, 0x10, + 0x2f, 0x74, 0x7f, 0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x0a, + 0x02, 0x14, 0xbb, 0xe5, 0x30, 0xd3, 0x94, 0x01, 0x40, 0x0d, 0xe5, + 0x55, 0x60, 0x09, 0x7d, 0x03, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x80, + 0x72, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, + 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x80, 0x5f, 0x90, 0x70, + 0x11, 0xe0, 0x24, 0xff, 0x92, 0x17, 0x90, 0x70, 0x10, 0xe0, 0xf5, + 0x5d, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x90, 0x04, 0x14, + 0x74, 0x80, 0xf0, 0x30, 0x17, 0x13, 0x90, 0x10, 0x00, 0xe0, 0x90, + 0x10, 0x2c, 0xf0, 0x90, 0x10, 0x2f, 0xe0, 0x54, 0xf0, 0xf5, 0x57, + 0x45, 0x5d, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, + 0x60, 0x2a, 0x90, 0x70, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x02, + 0x2c, 0x74, 0xff, 0xf0, 0x22, 0xe4, 0xf5, 0x30, 0xd2, 0x4f, 0x90, + 0x70, 0x10, 0xe0, 0xf4, 0x60, 0x03, 0xe0, 0xf5, 0x30, 0xad, 0x57, + 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, + 0x22, 0x22, 0xe5, 0x33, 0x45, 0x32, 0x60, 0x0a, 0xe5, 0x33, 0x15, + 0x33, 0x70, 0x0a, 0x15, 0x32, 0x80, 0x06, 0x75, 0x32, 0x03, 0x75, + 0x33, 0x1f, 0xe5, 0x33, 0x45, 0x32, 0x60, 0x03, 0x02, 0x15, 0x70, + 0x20, 0x1a, 0x03, 0x02, 0x15, 0x70, 0x74, 0xa0, 0x25, 0x31, 0xf5, + 0x82, 0xe4, 0x34, 0x4c, 0xf5, 0x83, 0xe0, 0x60, 0x7a, 0x7f, 0x7e, + 0x12, 0x15, 0xde, 0xef, 0x54, 0xfe, 0x44, 0x02, 0xfd, 0x7f, 0x7e, + 0x12, 0x15, 0xc4, 0xe5, 0x31, 0x7f, 0x00, 0x25, 0xe0, 0xfe, 0xef, + 0x24, 0x00, 0xf5, 0x82, 0x74, 0x4d, 0x3e, 0xaf, 0x82, 0x90, 0x4c, + 0xa8, 0xf0, 0xa3, 0xef, 0xf0, 0xe4, 0xf5, 0x56, 0xf5, 0x57, 0x7f, + 0x7f, 0x12, 0x15, 0xde, 0x90, 0x4c, 0xa8, 0xe0, 0xfa, 0xa3, 0xe0, + 0x25, 0x57, 0xf5, 0x82, 0xea, 0x35, 0x56, 0xf5, 0x83, 0xef, 0xf0, + 0x05, 0x57, 0xe5, 0x57, 0x70, 0x02, 0x05, 0x56, 0xc3, 0x94, 0x80, + 0xe5, 0x56, 0x94, 0x01, 0x40, 0xd8, 0x7f, 0x7e, 0x12, 0x15, 0xde, + 0xef, 0x44, 0x03, 0xfd, 0x7f, 0x7e, 0x12, 0x15, 0xc4, 0x74, 0xa0, + 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x4c, 0xf5, 0x83, 0xe4, 0xf0, + 0x05, 0x31, 0xe5, 0x31, 0xb4, 0x08, 0x03, 0xe4, 0xf5, 0x31, 0xe5, + 0x53, 0x70, 0x1a, 0x30, 0x60, 0x09, 0xb2, 0x4d, 0x30, 0x4d, 0x04, + 0x05, 0x46, 0xc2, 0x04, 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, + 0x4f, 0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0x22, 0x22, 0x30, 0x14, + 0x30, 0x90, 0x70, 0x19, 0xe0, 0x55, 0x3f, 0xff, 0x90, 0x70, 0x18, + 0xe0, 0x4f, 0xf5, 0x3f, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, + 0x19, 0xe0, 0xfe, 0xef, 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, + 0x04, 0xaf, 0x3f, 0x80, 0x04, 0xe5, 0x3f, 0xf4, 0xff, 0x90, 0x02, + 0x28, 0xef, 0xf0, 0xc2, 0x14, 0x22, 0x90, 0x10, 0x1c, 0xed, 0xf0, + 0xa3, 0xef, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x10, 0x1c, 0xe0, + 0xf5, 0x58, 0x90, 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x22, 0x90, + 0x10, 0x1d, 0xef, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x90, 0x10, 0x1c, + 0xe0, 0xf5, 0x58, 0x90, 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0xaf, + 0x58, 0x22, 0xc2, 0x4b, 0xc2, 0x4c, 0xe5, 0x44, 0x12, 0x01, 0xe4, + 0x16, 0x19, 0x00, 0x16, 0xa7, 0x04, 0x16, 0xa3, 0x08, 0x16, 0x83, + 0x10, 0x16, 0x2d, 0x20, 0x16, 0x4d, 0x60, 0x16, 0x5e, 0xa0, 0x00, + 0x00, 0x16, 0xa9, 0x85, 0x48, 0x43, 0x85, 0x4a, 0x42, 0x85, 0x4c, + 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, 0x03, 0x02, 0x16, 0xa9, 0x80, + 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, + 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, + 0xe5, 0x47, 0x64, 0x06, 0x70, 0x61, 0x53, 0x43, 0x0f, 0x80, 0x5c, + 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, 0x47, + 0x64, 0x06, 0x70, 0x4d, 0x80, 0x1b, 0xe5, 0x49, 0xc4, 0x54, 0x0f, + 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4d, + 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x30, + 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, 0xf5, 0x43, 0x80, 0x26, 0xe5, + 0x47, 0x64, 0x04, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, + 0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x06, 0x10, 0xe5, + 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, 0x43, 0x80, 0x06, 0xd2, 0x4b, + 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x27, 0xe5, 0x42, 0xc4, 0x54, + 0xf0, 0xff, 0xe5, 0x43, 0x54, 0x0f, 0x4f, 0xf5, 0x5f, 0xd2, 0x60, + 0x22, 0xd2, 0x15, 0xe5, 0x47, 0x24, 0xf5, 0x60, 0x0b, 0x24, 0xcb, + 0x60, 0x07, 0x24, 0x40, 0x70, 0x06, 0xc2, 0x15, 0x22, 0x12, 0x1a, + 0x3a, 0x12, 0x16, 0xde, 0xc2, 0x15, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, + 0xaf, 0x22, 0xc2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0x54, 0x0e, 0x60, + 0x04, 0xd2, 0x18, 0x80, 0x08, 0xe5, 0x4e, 0x45, 0x4f, 0x24, 0xff, + 0x92, 0x18, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, + 0x19, 0x74, 0x1e, 0xf0, 0xe5, 0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, + 0x27, 0x70, 0x13, 0x30, 0x18, 0x05, 0xe5, 0x5f, 0x20, 0xe5, 0x0b, + 0x30, 0x19, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, + 0xe5, 0x27, 0x70, 0x05, 0x75, 0x27, 0x0c, 0x80, 0x02, 0x15, 0x27, + 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, 0xe5, 0x5f, 0x30, 0xe6, 0x06, + 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, + 0x47, 0x64, 0x03, 0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, + 0x6d, 0x80, 0x18, 0xe5, 0x27, 0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, + 0x4c, 0xe5, 0x27, 0x70, 0x05, 0x75, 0x27, 0x07, 0x80, 0x02, 0x15, + 0x27, 0xd2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, + 0x44, 0x20, 0xe3, 0x0b, 0xe5, 0x3a, 0x64, 0x02, 0x60, 0x05, 0xe5, + 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, + 0x0a, 0x13, 0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, + 0x80, 0x08, 0xe5, 0x3a, 0x70, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0x20, + 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, + 0x07, 0xe5, 0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, + 0xe5, 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x75, 0x2e, 0x40, 0x20, + 0x69, 0x04, 0xa2, 0x68, 0x80, 0x26, 0x30, 0x68, 0x06, 0xe5, 0x46, + 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, - 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, 0x80, 0x26, - 0xe5, 0x47, 0x64, 0x0a, 0x70, 0x22, 0x30, 0x6c, 0x06, 0xe5, 0x46, - 0xa2, 0xe3, 0x80, 0x17, 0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xe5, 0x46, - 0xa2, 0xe3, 0x80, 0x53, 0xe5, 0x46, 0x20, 0xe4, 0x03, 0x30, 0xe5, - 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x80, 0x45, 0x30, 0x6c, 0x06, 0xe5, - 0x46, 0xa2, 0xe2, 0x80, 0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, 0x20, - 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x2f, 0xb4, - 0x19, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, - 0xff, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, - 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, - 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, - 0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, - 0x90, 0x10, 0x03, 0xe0, 0xc3, 0x94, 0x30, 0x40, 0x14, 0xa2, 0x71, - 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, 0x54, - 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x90, 0x10, 0x2f, 0xe5, - 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x39, 0x90, 0x02, 0x29, - 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, - 0x0c, 0x24, 0xfe, 0x60, 0x0c, 0x24, 0x03, 0x70, 0x13, 0xc2, 0x38, - 0x80, 0x0f, 0xd2, 0x38, 0x80, 0x0b, 0xe5, 0x46, 0x30, 0xe2, 0x03, - 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x38, 0x30, 0x47, 0x05, 0xaf, 0x27, - 0x02, 0x19, 0x0f, 0xe5, 0x27, 0xf4, 0xff, 0x02, 0x19, 0x0f, 0xe5, - 0x47, 0x64, 0x07, 0x60, 0x0f, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x09, - 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, 0x18, 0x8e, 0x90, 0x02, - 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x22, 0x14, - 0x60, 0x25, 0x14, 0x60, 0x2d, 0x24, 0xfc, 0x60, 0x49, 0x24, 0xf9, - 0x60, 0x14, 0x24, 0x0e, 0x70, 0x50, 0xe5, 0x46, 0x13, 0x13, 0x54, - 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x24, 0xff, 0x80, 0x3a, - 0xd2, 0x39, 0xc2, 0x38, 0x80, 0x3e, 0xe5, 0x46, 0x30, 0xe2, 0x03, - 0xd3, 0x80, 0x1d, 0xc3, 0x80, 0x1a, 0xe5, 0x46, 0x30, 0xe2, 0x0d, - 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, - 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, - 0x38, 0xc2, 0x39, 0x80, 0x13, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, - 0x80, 0x01, 0xc3, 0x92, 0x39, 0xc2, 0x38, 0x80, 0x04, 0xc2, 0x38, - 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, - 0xf4, 0xff, 0x02, 0x19, 0x0f, 0xe5, 0x47, 0x64, 0x0c, 0x60, 0x06, - 0xe5, 0x47, 0x64, 0x0b, 0x70, 0x7a, 0x90, 0x02, 0x29, 0xe0, 0x54, - 0xfd, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x20, 0x14, 0x60, 0x21, 0x14, - 0x60, 0x2b, 0x24, 0xfc, 0x60, 0x45, 0x24, 0xf9, 0x60, 0x12, 0x24, - 0x0e, 0x70, 0x4a, 0xe5, 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, - 0x03, 0x84, 0xe5, 0xf0, 0x80, 0x29, 0xd2, 0x39, 0x80, 0x3a, 0xe5, - 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, - 0x2d, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, - 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, - 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x39, 0x80, 0x0f, 0xe5, 0x46, - 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, 0x02, - 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, - 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0xe5, 0x47, 0xb4, - 0x0b, 0x10, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xeb, 0xf0, 0xe5, 0x27, - 0x54, 0xeb, 0x45, 0x45, 0xf5, 0x27, 0x22, 0xe4, 0x90, 0x02, 0x29, - 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, - 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, - 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, 0x37, 0xc2, 0xaf, - 0xe5, 0x51, 0x14, 0x60, 0x4a, 0x14, 0x60, 0x6b, 0x24, 0x02, 0x60, - 0x03, 0x02, 0x1a, 0xd5, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x20, 0x1a, - 0x1c, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x20, 0xe1, - 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, 0x1c, 0xa3, 0xe0, 0xb4, - 0x02, 0x17, 0xa3, 0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, 0x12, 0x19, - 0x40, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01, - 0x02, 0x1a, 0xd5, 0xe5, 0x50, 0x70, 0x06, 0x75, 0x37, 0x03, 0x02, - 0x1a, 0xd5, 0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, 0x15, 0x7f, - 0x20, 0x12, 0x19, 0x40, 0x20, 0x1a, 0x07, 0x90, 0x02, 0x08, 0xe0, - 0x54, 0xfb, 0xf0, 0x75, 0x51, 0x02, 0x02, 0x1a, 0xd5, 0xe5, 0x50, - 0x70, 0x03, 0x02, 0x1a, 0xd0, 0x20, 0x1a, 0x15, 0x90, 0x02, 0x08, - 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x1a, 0xcc, 0x90, 0x04, 0x37, 0xe0, - 0x64, 0x22, 0x60, 0x03, 0x02, 0x1a, 0xcc, 0x90, 0x12, 0x04, 0x74, - 0x0a, 0xf0, 0xe5, 0x58, 0x30, 0xe3, 0x15, 0xe4, 0x90, 0x05, 0x00, + 0x92, 0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x26, + 0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, + 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, + 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, + 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, + 0x04, 0xa2, 0x6c, 0x80, 0x26, 0xe5, 0x47, 0x64, 0x0a, 0x70, 0x22, + 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x17, 0xe5, 0x3a, + 0xb4, 0x01, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x34, 0xe5, 0x46, + 0x20, 0xe4, 0x03, 0x30, 0xe5, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x80, + 0x26, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, + 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, + 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, + 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x71, 0x92, 0x70, 0x90, + 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, 0x10, 0x03, 0xe0, + 0xc3, 0x94, 0x30, 0x40, 0x19, 0xe0, 0x64, 0x32, 0x60, 0x14, 0xa2, + 0x71, 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, + 0x54, 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x30, 0x17, 0x0d, + 0x53, 0x2e, 0xf0, 0xe5, 0x2e, 0x45, 0x5d, 0x90, 0x10, 0x2f, 0xf0, + 0x80, 0x06, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, 0x64, + 0x06, 0x70, 0x47, 0x90, 0x02, 0x28, 0xe0, 0x30, 0x47, 0x03, 0xff, + 0x80, 0x02, 0xf4, 0xff, 0x8f, 0x3f, 0x90, 0x02, 0x29, 0xe0, 0x54, + 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, 0x0c, 0x24, + 0xfe, 0x60, 0x0c, 0x24, 0x03, 0x70, 0x13, 0xc2, 0xf8, 0x80, 0x0f, + 0xd2, 0xf8, 0x80, 0x0b, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, + 0x01, 0xc3, 0x92, 0xf8, 0x30, 0x47, 0x05, 0xaf, 0x3f, 0x02, 0x1a, + 0x34, 0xe5, 0x3f, 0xf4, 0xff, 0x02, 0x1a, 0x34, 0xe5, 0x47, 0x64, + 0x07, 0x60, 0x0f, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, + 0x64, 0x09, 0x60, 0x03, 0x02, 0x19, 0xa2, 0x90, 0x02, 0x28, 0xe0, + 0x30, 0x47, 0x03, 0xff, 0x80, 0x02, 0xf4, 0xff, 0x8f, 0x3f, 0x90, + 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x22, + 0x14, 0x60, 0x25, 0x14, 0x60, 0x2d, 0x24, 0xfc, 0x60, 0x49, 0x24, + 0xf9, 0x60, 0x14, 0x24, 0x0e, 0x70, 0x50, 0xe5, 0x46, 0x13, 0x13, + 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x24, 0xff, 0x80, + 0x3a, 0xd2, 0xf9, 0xc2, 0xf8, 0x80, 0x3e, 0xe5, 0x46, 0x30, 0xe2, + 0x03, 0xd3, 0x80, 0x1d, 0xc3, 0x80, 0x1a, 0xe5, 0x46, 0x30, 0xe2, + 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, + 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, 0xff, + 0x92, 0xf8, 0xc2, 0xf9, 0x80, 0x13, 0xe5, 0x46, 0x30, 0xe2, 0x03, + 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xf9, 0xc2, 0xf8, 0x80, 0x04, 0xc2, + 0xf8, 0xc2, 0xf9, 0x30, 0x47, 0x04, 0xaf, 0x3f, 0x80, 0x04, 0xe5, + 0x3f, 0xf4, 0xff, 0x02, 0x1a, 0x34, 0xe5, 0x47, 0x64, 0x0c, 0x60, + 0x09, 0xe5, 0x47, 0x64, 0x0b, 0x60, 0x03, 0x02, 0x1a, 0x39, 0x90, + 0x02, 0x28, 0xe0, 0x30, 0x47, 0x03, 0xff, 0x80, 0x02, 0xf4, 0xff, + 0x8f, 0x3f, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x3a, + 0x14, 0x60, 0x20, 0x14, 0x60, 0x21, 0x14, 0x60, 0x2b, 0x24, 0xfc, + 0x60, 0x45, 0x24, 0xf9, 0x60, 0x12, 0x24, 0x0e, 0x70, 0x4a, 0xe5, + 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, + 0x80, 0x29, 0xd2, 0xf9, 0x80, 0x3a, 0xe5, 0x46, 0x30, 0xe2, 0x03, + 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xf9, 0x80, 0x2d, 0xe5, 0x46, 0x30, + 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, + 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, + 0xff, 0x92, 0xf9, 0x80, 0x0f, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, + 0x80, 0x01, 0xc3, 0x92, 0xf9, 0x80, 0x02, 0xc2, 0xf9, 0x30, 0x47, + 0x04, 0xaf, 0x3f, 0x80, 0x04, 0xe5, 0x3f, 0xf4, 0xff, 0x90, 0x02, + 0x28, 0xef, 0xf0, 0x22, 0xe5, 0x47, 0xb4, 0x0b, 0x10, 0x90, 0x02, + 0x29, 0xe0, 0x54, 0xeb, 0xf0, 0xe5, 0x3f, 0x54, 0xeb, 0x45, 0x45, + 0xf5, 0x3f, 0x22, 0xe4, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, + 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, 0x28, + 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, + 0x58, 0x22, 0xe4, 0xf5, 0x25, 0xc2, 0xaf, 0xe5, 0x51, 0x14, 0x60, + 0x4a, 0x14, 0x60, 0x6b, 0x24, 0x02, 0x60, 0x03, 0x02, 0x1b, 0xd0, + 0xd2, 0x59, 0x75, 0x55, 0x01, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfe, + 0xf0, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, + 0x1c, 0xa3, 0xe0, 0xb4, 0x02, 0x17, 0xa3, 0xe0, 0xb4, 0x02, 0x12, + 0x7f, 0x20, 0x12, 0x1a, 0x65, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, + 0xf0, 0x75, 0x51, 0x01, 0x02, 0x1b, 0xd0, 0xe5, 0x50, 0x60, 0x03, + 0x02, 0x1b, 0xd0, 0x75, 0x25, 0x03, 0x02, 0x1b, 0xd0, 0x90, 0x12, + 0x00, 0xe0, 0x54, 0x03, 0x70, 0x12, 0x7f, 0x20, 0x12, 0x1a, 0x65, + 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfb, 0xf0, 0x75, 0x51, 0x02, 0x02, + 0x1b, 0xd0, 0xe5, 0x50, 0x60, 0x03, 0x02, 0x1b, 0xd0, 0x02, 0x1b, + 0xcb, 0x90, 0x02, 0x08, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x1b, 0xc7, + 0x90, 0x04, 0x37, 0xe0, 0x64, 0x22, 0x60, 0x03, 0x02, 0x1b, 0xc7, + 0x90, 0x12, 0x04, 0x74, 0x0a, 0xf0, 0xe5, 0x58, 0x30, 0xe3, 0x1c, + 0x90, 0x00, 0x02, 0xe0, 0x30, 0xe0, 0x15, 0xe4, 0x90, 0x05, 0x00, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, - 0xf0, 0x7f, 0x01, 0x12, 0x03, 0x30, 0x90, 0x13, 0x28, 0xe0, 0x90, + 0xf0, 0x7f, 0x01, 0x12, 0x02, 0x94, 0x90, 0x13, 0x28, 0xe0, 0x90, 0x70, 0x1a, 0xf0, 0x90, 0x13, 0x29, 0xe0, 0x90, 0x70, 0x1b, 0xf0, 0x90, 0x13, 0x2b, 0xe0, 0x90, 0x70, 0x22, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xf0, 0xf0, 0x90, 0x13, 0x2b, 0xe0, 0x54, 0xcc, 0xf0, 0xe5, 0x58, 0x30, 0xe3, 0x17, 0xe5, - 0x34, 0x70, 0x13, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x05, + 0x30, 0x70, 0x13, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x05, 0xe0, 0x54, 0xf3, 0x80, 0x11, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x14, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x08, 0xe0, 0x54, 0xf2, - 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x20, 0x1a, - 0x07, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x10, 0xf0, 0xe5, 0x34, 0xd3, - 0x94, 0x01, 0x40, 0x09, 0xe5, 0x30, 0x70, 0x05, 0x75, 0x8c, 0x40, - 0x80, 0x03, 0x75, 0x8c, 0x80, 0x90, 0x04, 0x01, 0xe0, 0x54, 0xfd, - 0xf0, 0x20, 0x1a, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x04, 0xf0, - 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01, 0x0d, 0xe0, 0xf5, 0x31, - 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x2c, 0x90, 0x01, 0x0d, 0xe0, - 0x44, 0x01, 0xf0, 0xe5, 0x58, 0x20, 0xe3, 0x0c, 0xe5, 0x34, 0xb4, - 0x03, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfd, 0xf0, 0x20, 0x02, - 0x11, 0x20, 0x03, 0x0e, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfb, 0xf0, - 0x90, 0x01, 0x0c, 0xe0, 0x54, 0xfd, 0xf0, 0x75, 0x37, 0x01, 0x75, - 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, - 0x75, 0x37, 0x03, 0xf5, 0x51, 0xe5, 0x37, 0x60, 0x18, 0xc2, 0x01, - 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0x20, 0x1a, 0x0e, 0xad, 0x37, 0xaf, - 0x40, 0x12, 0x1b, 0xfa, 0xe5, 0x37, 0xb4, 0x03, 0x02, 0xd2, 0x03, - 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x30, 0x01, 0x0e, 0xe4, 0xf5, 0x51, - 0xc2, 0x59, 0xc2, 0x01, 0x7d, 0x02, 0xaf, 0x40, 0x12, 0x1b, 0xfa, - 0xe5, 0x52, 0x14, 0x60, 0x56, 0x14, 0x60, 0x33, 0x24, 0x02, 0x60, - 0x03, 0x02, 0x1b, 0xf7, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x1f, - 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, - 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x32, 0x12, - 0x03, 0x30, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfe, 0xf0, 0x75, 0x52, - 0x02, 0x75, 0x55, 0x03, 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01, - 0x0d, 0xe5, 0x31, 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfb, 0xf0, - 0x7f, 0x20, 0x12, 0x19, 0x45, 0x75, 0x52, 0x01, 0x75, 0x55, 0x03, - 0x02, 0x1b, 0xf7, 0xe5, 0x54, 0x60, 0x03, 0x02, 0x1b, 0xf7, 0x90, - 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0x20, 0x1a, 0x04, 0xe0, 0x54, + 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x90, 0x04, + 0x01, 0xe0, 0x44, 0x10, 0xf0, 0x75, 0x8c, 0x80, 0xe0, 0x54, 0xfd, + 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x58, 0x30, + 0xe0, 0x06, 0x90, 0x01, 0x0d, 0xe0, 0xf5, 0x2f, 0xe5, 0x30, 0xd3, + 0x94, 0x01, 0x40, 0x17, 0x20, 0x02, 0x14, 0x20, 0x03, 0x11, 0x30, + 0x4f, 0x0e, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0x01, + 0x0c, 0xe0, 0x54, 0xfd, 0xf0, 0x75, 0x25, 0x01, 0x75, 0x55, 0x02, + 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, 0x75, 0x25, + 0x03, 0xf5, 0x51, 0xe5, 0x25, 0x60, 0x15, 0xc2, 0x01, 0xe4, 0xf5, + 0x51, 0xc2, 0x59, 0xad, 0x25, 0xaf, 0x40, 0x12, 0x1c, 0xe5, 0xe5, + 0x25, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, + 0x30, 0x01, 0x0e, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0xc2, 0x01, 0x7d, + 0x02, 0xaf, 0x40, 0x12, 0x1c, 0xe5, 0xe5, 0x52, 0x14, 0x60, 0x48, + 0x14, 0x60, 0x25, 0x24, 0x02, 0x60, 0x03, 0x02, 0x1c, 0xe2, 0xe5, + 0x30, 0xd3, 0x94, 0x01, 0x40, 0x11, 0x90, 0x01, 0x0c, 0xe0, 0x44, + 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x0a, 0x12, 0x02, + 0x94, 0x75, 0x52, 0x02, 0x75, 0x55, 0x03, 0xe5, 0x58, 0x30, 0xe0, + 0x06, 0x90, 0x01, 0x0d, 0xe5, 0x2f, 0xf0, 0x90, 0x12, 0x04, 0xe0, + 0x54, 0xfb, 0xf0, 0x7f, 0x20, 0x12, 0x1a, 0x6a, 0x75, 0x52, 0x01, + 0x75, 0x55, 0x03, 0x02, 0x1c, 0xe2, 0xe5, 0x54, 0x60, 0x03, 0x02, + 0x1c, 0xe2, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0xe0, 0x54, 0xef, 0xf0, 0xe4, 0xf5, 0x8c, 0xe5, 0x58, 0x54, 0x18, 0x60, 0x1e, 0x90, 0x70, 0x1a, 0xe0, 0x90, 0x13, 0x28, 0xf0, 0x90, 0x70, 0x1b, 0xe0, 0x90, 0x13, 0x29, 0xf0, 0xa3, 0x74, 0x05, 0xf0, 0x90, 0x70, 0x22, 0xe0, 0x90, 0x13, 0x2b, 0xf0, 0x80, 0x11, 0x90, 0x13, 0x28, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, 0x03, 0xf0, 0xe5, 0x58, - 0x30, 0xe3, 0x16, 0x90, 0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74, - 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, - 0x12, 0x03, 0x30, 0x20, 0x1a, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x44, - 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x0c, 0xf0, 0xe4, 0xf5, - 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, 0x02, 0x7d, 0x01, 0xaf, - 0x41, 0x12, 0x1b, 0xfa, 0x30, 0x03, 0x02, 0xc2, 0x03, 0xd2, 0xaf, - 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5, - 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74, - 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0, - 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, - 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, 0x22, 0x30, 0x1a, - 0x77, 0x90, 0x04, 0x37, 0xe0, 0x20, 0xe5, 0x6c, 0x90, 0x04, 0x28, - 0xe0, 0xf5, 0x38, 0xa3, 0xe0, 0xf5, 0x37, 0xf5, 0x39, 0xe4, 0xf5, - 0x25, 0xe5, 0x39, 0x75, 0xf0, 0x80, 0xa4, 0x24, 0x00, 0xff, 0xe5, - 0xf0, 0x34, 0x80, 0xfe, 0xe5, 0x37, 0x65, 0x39, 0x70, 0x05, 0xfc, - 0x7d, 0x28, 0x80, 0x04, 0x7c, 0x00, 0x7d, 0x00, 0xef, 0x2d, 0xff, - 0xee, 0x3c, 0xfe, 0x12, 0x1c, 0xa9, 0x50, 0x07, 0x90, 0x01, 0x14, - 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x39, 0x65, 0x38, 0x60, 0x10, 0xe4, - 0x25, 0x39, 0xff, 0xe4, 0x34, 0x80, 0x8f, 0x82, 0xf5, 0x83, 0xe0, - 0xf5, 0x39, 0x80, 0xbb, 0x90, 0x04, 0x10, 0x74, 0x01, 0xf0, 0x90, - 0x04, 0x28, 0xe5, 0x38, 0xf0, 0xa3, 0xe5, 0x37, 0xf0, 0x90, 0x04, - 0x11, 0x74, 0x01, 0xf0, 0x80, 0x8d, 0xc2, 0x06, 0xd2, 0x1b, 0x22, - 0xe5, 0x25, 0xc3, 0x94, 0x06, 0x50, 0x19, 0x8f, 0x82, 0x8e, 0x83, - 0xe0, 0xb4, 0xff, 0x07, 0x05, 0x25, 0xe4, 0xf5, 0x24, 0x80, 0x2e, - 0xe4, 0xf5, 0x25, 0x8f, 0x82, 0x8e, 0x83, 0xf0, 0x80, 0x24, 0xe5, - 0x24, 0x75, 0xf0, 0x06, 0x84, 0x74, 0x08, 0x25, 0xf0, 0xf5, 0x82, - 0xe4, 0x34, 0x10, 0xf5, 0x83, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, - 0xe0, 0x6d, 0x70, 0x06, 0x05, 0x25, 0x05, 0x24, 0x80, 0x03, 0xe4, - 0xf5, 0x25, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0xef, 0x54, 0x7f, 0x60, - 0x07, 0xe5, 0x25, 0xc3, 0x94, 0x2a, 0x40, 0xab, 0xe5, 0x25, 0xb4, - 0x2a, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x22, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0xe3, 0x1d, 0x90, 0x00, 0x02, 0xe0, 0x30, 0xe0, 0x16, 0x90, + 0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, + 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, 0x12, 0x02, 0x94, 0x90, + 0x02, 0x08, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, + 0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, + 0x02, 0x7d, 0x01, 0xaf, 0x41, 0x12, 0x1c, 0xe5, 0x30, 0x03, 0x02, + 0xc2, 0x03, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, + 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, + 0xb4, 0xff, 0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, + 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, + 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, + 0x22, 0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x43, 0xc2, 0xaf, + 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29, + 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0, 0x90, 0x10, + 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x25, 0x90, 0x10, 0x1e, + 0xe0, 0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, + 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, 0x90, 0x10, + 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3012,5 +3012,5 @@ static const uint8_t rt2860[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x53, 0x88 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x5b, 0xd2 }; Modified: head/sys/contrib/dev/ral/rt2860.fw.uu ============================================================================== --- head/sys/contrib/dev/ral/rt2860.fw.uu Wed Feb 11 02:43:58 2015 (r278550) +++ head/sys/contrib/dev/ral/rt2860.fw.uu Wed Feb 11 05:25:23 2015 (r278551) @@ -15,27 +15,24 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. begin 644 rt2860.fw -M`@-;`@*F(B+___\"`2S______P(`'O______`@#=P.#`\,"#P(+`T'70&,*O -M,$4#$A`)D`06X##C`W0(\)`$%.`@YP,"`,MT@/"0#U1!(0 -M)8`&D'`0X/5%Y/VO-A("@M($D'`3Y/"0#U1!(0 +M)8`&D'`0X/5%Y/VO)!(""M($D'`3Y/"0X"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@D'`J\,(% -MTJ\B$@+(,$4#$A`#,`$&(`D#$A`<,`(&(`H#$A`?,`,&(`L#$A`?,`0&(`P# -M$A`B(!,)(!$&Y2M%+&`#TX`!PY*I$@,<@+_"0])%Y/4@]2'U4_5&]2OU+,)" -M]5'U4O55D`08=(#PD`0:=`CPPAK"&,(;(LCOR.;Z".9*8`S([\@(YA88<`$6 -MPR+M)/_][#3_R._(]@C&[<;3(M"#T(+XY)-P$G0!DW`-HZ.3^'0!D_6"B(/D -M0!`!T@/#2KR)UB0+D]8SUBO6(];CUZ'60&-*,=:@%(N]@`Q^` -M^B+_P"9T`\#@P(+`@W4F"B+`)G0#P.#`@L"#=288(C!%`Q(0%>4@<`,@$`,P -M$0-#AP$BSN_.[F`(?_\2`O@>@/4BR._(YF`#%L,B[13VTR+([\CF8`86YB3_ -MLR+#(GA_Y/;8_76!7P(!Q704+O6"Y#1P]8,B[Y`#>Y.0`P!S"AC_________ +M$A`/PHW2K]#0T(+0@]#PT.`R$@)0,$4#$A`#,`$&(`D#$A`<,`(&(`H#$A`? +M,`,&(`L#$A`?,`0&(`P#$A`B(!,)(!$&Y2M%+&`#TX`!PY*I$@*`@+_"0])% +MY/4@]2'U4_5&]2OU+,)"]5'U4O55D`08=(#PD`0:=`CP(M"#T(+XY)-P$G0! +MDW`-HZ.3^'0!D_6"B(/D0!`!T@/#2KR)UB0+D]8SUBO6(];CU +MZ'60&-*,=:@%(C!%`Q(0%>4@<`,@$`,P$0-#AP$BSN_.[F`(?_\2`L4>@/4B +M>'_D]MC]=8%?`@%Z=!0N]8+D-'#U@R+OD`+#DY`#`',*&.]@`Q^`^B+_____ M____________________________________________________________ +M____P"9T`\#@P(+`@W4F"B+`)G0#P.#`@L"#=288(O__________________ M____________________________________________________________ M____________________________________________________________ M____________________________________________________________ @@ -106,83 +103,86 @@ M_______________________________________ M____________________________________________________________ M____________________________________________________________ M____________________________________________________________ -M_____P(0*`(0.P(0/`(3O`(3O0(4<@(4<\,B__\"&4H"&O0"%6P"%*#U/`(3 -MM>55M`(/Y5@PX`:0`0UT"/!]`8`"?0*O5A("@@(3M2`"`S`#"GT"KU82`H(" -M$[7E--.4`4`,D`$,X$0"\*/@1`3PA59!T@(BD'`1X/1P`P(3N^#U,"+E--.4 -M`4`'Y55@`P(3NY!P$.!4?_^_"@V0!D"&`$X+0@!G5.`W5/(.3U)R*005'9`=@'>5'9`A@%^5'9`E@$>5'9`I@"^5'9`M@!>5' -MM`P(D'`1X%0/]3KE1[0)".4ZM`,#Y/5&Y4>T"@CE.K0!`^3U1N3]KU82`H+2 -M!"*0"0#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T_Y`"*._P(N4TTY0! -M0`?E56`#`A-)D'`0X/Z0WXYO57_:]6$@*"`A.UY333E`%`!^558`," -M$TF0#][?6"CH/@]5?]KU82`H("$[60$`#@]5?D]5CU69`0`^"T -M*`5U6`&`/)`0`^"T,`5U6`*`,)`0`^"T,P5U6`2`))`0`^"T-0R0$`+@M'(% -M=5@(@!&0$`/@M#4*D!`"X+23`W58$.58,.$9D`4(X$0!\/V0!07@5/OP1`3P -M[53^D`4(\.3U3O5/=3K_PAK"&,(;]320!:1T$?"C=/_PHW0#\.3U,,(9D`$- -MX$1`\'4\_ZU7KU82`H+DD'`R\(!WY333E`%`"^558`=]`Z]6`@*"D'`0X"3_ -MDI/D_:]6$@*"@%3E--.4`4`-Y55@"7T#KU82`H*`0)!P$.`D_Y)*T@6M5Z]6 -M$@*"@"WD]33U,)!P$.#T8`/@]32M5Z]6$@*"@!72&04OY2^T&@/D]2_2!*U7 -MKU82`H*0!!1T@/`B(N4TPY0#0!?E5;0"$N4P8`XP8`MT_25&]4;2!.3U4^53 -M8`,"%'$P8"&R33!-'.4TPY0#0!'E5;0"#.4P8`AT`R5&]4:``@5&P@3E3T5. -M8`CE3Q5/<`(53C`:27\R?;A\"Q("-5`&D`00=$#P?S5],A(#/U`)D!`$X%3W -M\-(&Y373E"U`,#`;+<(;HAB2&B`:))`$">!4W?"0$`3@1`CPPF'2`R+D]36B -M&)(:,!H'D`0)X$0B\"(B,!0PD'`9X%4G_Y!P&.!/]2>0`BG@_Y!P&>#^[UZ0 -M`BGP,$<$KR>`!.4G]/^0`BCO\,(4(L)+PDSE1!("7!3)`!57!!53"!4S$!3= -M(!3]8!4.H```%5F%2$.%2D*%3%[E1V0&8`,"%5F`&^5(Q%0/]4/E2L14#_5" -MY4S$5`_U7N5'9`9P85-##X!Y4=D!G!-@!OE2<14#_5#Y4O$ -M5`_U0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`%Y4>T!09#7@1U0@GE -M1[0&$.5#5`]$,/5#@`;22X`"TDSD]2KE0L14\/_E0U0/3_5?TF`BTA7E1R3U -M8`LDRV`')$!P!L(5(A(9%1(5CL(5PJ_"!-*O(L*OD`04X%0.8`32'(`(Y4Y% -M3R3_DAS2KY`$%."BY)(==![PY5]4#_4MY2IP$S`5?(.4+,!TIY5]4,&0P -M<"'E*G`5Y33#E`-`">4P8`5U*@6`!W4J#(`"%2K2;-)M@`_E7S#F!L)LTFV` -M!-)LPFWE1V0#<"$P2P;";-)M@!CE*G`#,$P1PDSE*G`%=2H'@`(5*M)LTFWE -M1[0)%.5$(.,+Y3ID`F`%Y3JT`P3";-)MY4>T"A/E.K0!!L)LTFV`".4Z<`32 -M;,)M(&D'Y5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)L=2Y`(&D$HFB`13!H -M!N5&HN*`/#`9'.5>(.`$?P&``G\`Y2^T&01^`8`"?@#N;R3_@!WE7B#@!'\! -M@`)_`.5&5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H!%,&H&Y4:BXH`\,!D< -MY5X@X01_`8`"?P#E+[09!'X!@`)^`.YO)/^`'>5>(.$$?P&``G\`Y494\/Z^ -M\`1^`8`"?@#N;R3_DG62="!M!*)L@";E1V0*<"(P;`;E1J+C@!?E.K0!!N5& -MHN.`4^5&(.0#,.4#TX`!PX!%,&P&Y4:BXH`\,!D5>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2 -M<)`0`."0$"SPD!`#X,.4,$`4HG&2=Z)PDG;E+A,35#_U+L)WTG:0$"_E+O#E -M1V0&<#F0`BG@5/[PY4/$5`\48`PD_F`,)`-P$\(X@`_2.(`+Y48PX@/3@`'# -MDC@P1P6O)P(9#^4G]/\"&0_E1V0'8`_E1V0(8`GE1V0)8`,"&(Z0`BG@5/SP -MY3H48"(48"448"TD_&!))/E@%"0.<%#E1A,35#]U\`.$Y?`D_X`ZTCG".(`^ -MY48PX@/3@!W#@!KE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(XPCF`$^5& -M,.(#TX`!PY(YPCB`!,(XPCDP1P2O)X`$Y2?T_P(9#^5'9`Q@!N5'9`MP>I`" -M*>!4_?#E.A1@(!1@(11@*R3\8$4D^6`2)`YP2N5&$Q-4/W7P`X3E\(`ITCF` -M.N5&,.(#TX`!PY(Y@"WE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(Y@`_E -M1C#B`].``<.2.8`"PCDP1P2O)X`$Y2?T_Y`"*._P(N5'M`L0D`(IX%3K\.4G -M5.M%1?4G(N20`BGP,$<$KT6`!.5%]/^0`BCO\"*/4-)9(H]4TE@BY/4WPJ_E -M411@2A1@:R0"8`,"&M726755`2`:')`"".!4_O#@(.$CD`0TX+0"'*/@M`(7 -MH^"T`A)_(!(90)`0!.!4\_!U40$"&M7E4'`&=3<#`AK5D!(`X%0#"0!4^_"`%.4\])`3*F`(X%3R13SP@`3@5/KP(!H'D`0!X$00 -M\.4TTY0!0`GE,'`%=8Q`@`-UC("0!`'@5/WP(!H'D!($X$0$\.58,.`&D`$- -MX/4QY333E`%`+)`!#>!$`?#E6"#C#.4TM`,'D!($X%3]\"`"$2`##I`!#>!4 -M^_"0`0S@5/WP=30!#?@(.5LD`0HX/4XH^#U-_4YY/4EY3EU\("D -M)`#_Y?`T@/[E-V4Y<`7\?2B`!'P`?0#O+?_N//X2'*E0!Y`!%.!$`O#E.64X -M8!#D)3G_Y#2`CX+U@^#U.8"[D`00=`'PD`0HY3CPH^4W\)`$$70!\("-P@;2 -M&R+E)<.4!E`9CX*.@^"T_P<%)>3U)(`NY/4ECX*.@_"`).4D=?`&A'0()?#U -M@N0T$/6#X/V/@HZ#X&UP!@4E!22``^3U)0^_``$.[U1_8`?E)<.4*D"KY26T -M*@/3@`'#(@`````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` +M____________________________________________________________ +M____________________________________________________________ +M____________________________________________________________ +M_____P(0*`(0,@(0,P(4P@(4PP(5CP(5D,,B__\"&F\"&^P"%KP"%?#U/`(4N^55M`(/Y5@PX`:0`0UT"/!]`8`"?0*O5A(""@(4NR`" +M`S`#"GT"KU82`@H"%+OE,-.4`4`,D`$,X$0"\*/@1`3PA59!T@(BD'`1X+1: +M`\)/(M)/(N4PTY0!4`,"%,&0`0S@1`+PH^!$!/`BY3#3E`%0`P(4P9`!#.!4 +M_?"CX%3[\"+E,-.4`4`'Y55@`P(4P9!P$.!4?_^_"@V0!D"&`$X+0@!G5.`W5/(.3U/R*005'9`=@'>5'9`A@%^5'9`E@$>5' +M9`I@"^5'9`M@!>5'M`P(D'`1X%0/]3KE1[0)".4ZM`,#Y/5&Y4>T"@CE.K0! +M`^3U1N3]KU82`@K2!"*0"0#_D'`9X/[O7I`"*?`P1P2O/X`$Y3_T +M_Y`"*._P(I!P$.`D_Y(:=3(#=3,?Y/4QK5>O5A(""@(4NY`0`.#U5^3U6/59 +MD!`#X+0H!758`8`\D!`#X+0P!758`H`PD!`#X+0S!758!(`DD!`#X+0U#)`0 +M`N"T<@5U6`B`$9`0`^"T-0J0$`+@M),#=5@0Y5@PX1F0!0C@1`'P_9`%!>!4 +M^_!$!/#M5/Z0!0CPY/5.]4]U.O_U,)`%I'01\*-T__"C=`/PTD^0`0W@1$#P +M=3S_K5>O5A(""I!P-G0W\*-T,O"0!`'@1`'PPAK"%P(4N^4PTY0!0`OE56`' +M?0.O5@(""I!P$.`D_Y*3Y/VO5A(""@(4NY`0`."0$"SPD!`O=$#PD'`1X%1_ +M]5?@5("0<#+PD'`0X/_E5].?0$.0<#/E5_"0``G\1D`4![_"C=`'P=`/P_Q("E(##D'`S +MY5?PD'`SX/^0_PHW0!\'0#\/\2`I2`P)!P$.#_D'`RX$^0!0#PY5A4#V`$?Q>` +M`G\1D`4![_"C=`'P=`/P_Q("E)`0`."0$"SPD!`O='_PY/VO5A(""@(4N^4P +MTY0!0`WE56`)?0.O5A(""H!RD'`0X"3_DDK2!:U7KU82`@J`7Y!P$>`D_Y(7 +MD'`0X/5=K5>O5A(""I`$%'2`\#`7$Y`0`."0$"SPD!`OX%3P]5=%7?#DD'`3 +M\.56]&`JD'`EX$0!\)`"+'3_\"+D]3#23Y!P$.#T8`/@]3"M5Z]6$@(*D`04 +M=(#P(B+E,T4R8`KE,Q4S<`H5,H`&=3(#=3,?Y3-%,F`#`A5P(!H#`A5P=*`E +M,?6"Y#1,]8/@8'I_?A(5WN]4_D0"_7]^$A7$Y3%_`"7@_N\D`/6"=$T^KX*0 +M3*CPH^_PY/56]5=_?Q(5WI!,J.#ZH^`E5_6"ZC56]8/O\`57Y5=P`@56PY2` +MY5:4`4#8?WX2%=[O1`/]?WX2%<1TH"4Q]8+D-$SU@^3P!3'E,;0(`^3U,>53 +M#^[UZ0`BGP,$<$KS^`!.4_]/^0`BCO\,(4(I`0'.WPH^_P +MHW0*\)`0'.#U6)`0'N`@X?,BD!`=[_"C=`OPD!`X"#A\Z]8(L)+ +MPDSE1!(!Y!89`!:G!!:C"!:#$!8M(!9-8!9>H```%JF%2$.%2D*%3%[E1V0& +M8`,"%JF`&^5(Q%0/]4/E2L14#_5"Y4S$5`_U7N5'9`9P85-##X!Y4=D!G!-@!OE2<14#_5#Y4O$5`_U0N5-Q%0/]5[E1V0&<##E0U0/1!#U +M0X`FY4=D!&`%Y4>T!09#7@1U0@GE1[0&$.5#5`]$,/5#@`;22X`"TDSD]2?E +M0L14\/_E0U0/3_5?TF`BTA7E1R3U8`LDRV`')$!P!L(5(A(:.A(6WL(5PJ_" +M!-*O(L*OD`04X%0.8`32&(`(Y4Y%3R3_DAC2KY`$%."BY)(9=![PY5]4#_4M +MY2=P$S`8!>5?(.4+,!D9Y5]4,/^_,!'E)W`%=2<,@`(5)])LTFV`#^5?,.8& +MPFS2;8`$TFS";>5'9`-P(3!+!L)LTFV`&.4G<`,P3!'"3.4G<`5U)P>``A4G +MTFS2;>5'M`D4Y40@XPOE.F0"8`7E.K0#!,)LTFWE1[0*$^4ZM`$&PFS2;8`( +MY3IP!-)LPFT@:0?E7B#@`K)H(&L'Y5X@X0*R:B!M!^5>(.("LFQU+D`@:02B +M:(`F,&@&Y4:BXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^25>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_ +MDG62="!M!*)L@";E1V0*<"(P;`;E1J+C@!?E.K0!!N5&HN.`-.5&(.0#,.4# +MTX`!PX`F,&P&Y4:BXH`=Y5X@X@1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^2 +M<9)PD!``X)`0+/"0$`/@PY0P0!G@9#)@%*)QDG>B<))VY2X3$U0_]2["=])V +M,!<-4R[PY2Y%79`0+_"`!I`0+^4N\.5'9`9P1Y`"*.`P1P/_@`+T_X\_D`(I +MX%3^\.5#Q%0/%&`,)/Y@#"0#5' +M9`M@`P(:.9`"*.`P1P/_@`+T_X\_D`(IX%3]\.4Z%&`@%&`A%&`K)/Q@123Y +M8!(D#G!*Y483$U0_=?`#A.7P@"G2^8`ZY48PX@/3@`'#DOF`+>5&,.(-5#C# +ME#!0!GX`?P&`!'X`?P#N3R3_DOF`#^5&,.(#TX`!PY+Y@`+"^3!'!*\_@`3E +M/_3_D`(H[_`BY4>T"Q"0`BG@5.OPY3]4ZT5%]3\BY)`"*?`P1P2O18`$Y47T +M_Y`"*._P(H]0TEDBCU326"+D]27"K^51%&!*%&!K)`)@`P(;T-)9=54!D`(( +MX%3^\.`@X2.0!#3@M`(CX+0"$G\@$AIED!`$X%3S\'51`0(;T.50 +M8`,"&]!U)0,"&]"0$@#@5`-P$G\@$AIED`((X%3[\'51`@(;T.508`,"&]`" +M&\N0`@C@,.,#`AO'D`0WX&0B8`,"&\>0$@1T"O#E6##C')```N`PX!7DD`4` +M\*-T"/"C=`'P=`/P?P$2`I20$RC@D'`:\)`3*>"0!4^_"`%.4\ +M])`3*F`(X%3R13SP@`3@5/KPD`0!X$00\'6,@.!4_?"0$@3@1`3PY5@PX`:0 +M`0W@]2_E,-.4`4`7(`(4(`,1,$\.D`$-X%3[\)`!#.!4_?!U)0%U50+D]5&` +M">50<`5U)0/U4>4E8!7"`>3U4<)9K26O0!(4EM`,"T@/2KR+"KS`!#N3U +M4<)9P@%]`J]`$ASEY5(48$@48"4D`F`#`ASBY3#3E`%`$9`!#.!$`O"CX$0$ +M\'\*$@*4=5("=54#Y5@PX`:0`0WE+_"0$@3@5/OP?R`2&FIU4@%U50,"'.+E +M5&`#`ASBD`0!X$0.\.!4[_#D]8SE6%088!Z0X"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@ +MD'`J\,(%TJ\B(@`````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` @@ -196,7 +196,7 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 06:57:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A83A625; Wed, 11 Feb 2015 06:57:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA4AAD; Wed, 11 Feb 2015 06:57:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B6vM0u002300; Wed, 11 Feb 2015 06:57:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B6vL2P002293; Wed, 11 Feb 2015 06:57:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110657.t1B6vL2P002293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 06:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278554 - in stable/10: share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 06:57:22 -0000 Author: ngie Date: Wed Feb 11 06:57:20 2015 New Revision: 278554 URL: https://svnweb.freebsd.org/changeset/base/278554 Log: MFC r277663: r277663: Add MK_EE knob to control installing edit, ee, etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_EE - copied unchanged from r277663, head/tools/build/options/WITHOUT_EE Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 06:57:20 2015 (r278554) @@ -272,6 +272,7 @@ __DEFAULT_YES_OPTIONS = \ DICT \ DYNAMICROOT \ ED_CRYPTO \ + EE \ EXAMPLES \ FLOPPY \ FMTREE \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:57:20 2015 (r278554) @@ -1252,6 +1252,23 @@ OLD_FILES+=usr/share/dict/web2a OLD_FILES+=usr/share/dict/words .endif +.if ${MK_EE} == no +OLD_FILES+=usr/bin/edit +OLD_FILES+=usr/bin/ee +OLD_FILES+=usr/bin/ree +OLD_FILES+=usr/share/man/man1/edit.1.gz +OLD_FILES+=usr/share/man/man1/ee.1.gz +OLD_FILES+=usr/share/man/man1/ree.1.gz +OLD_FILES+=usr/share/nls/C/ee.cat +OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat +OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat +.endif + #.if ${MK_EXAMPLES} == no # to be filled in #.endif Copied: stable/10/tools/build/options/WITHOUT_EE (from r277663, head/tools/build/options/WITHOUT_EE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_EE Wed Feb 11 06:57:20 2015 (r278554, copy of r277663, head/tools/build/options/WITHOUT_EE) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/usr.bin/Makefile Wed Feb 11 06:57:20 2015 (r278554) @@ -38,7 +38,6 @@ SUBDIR= alias \ dirname \ dpv \ du \ - ee \ elf2aout \ elfdump \ enigma \ @@ -232,6 +231,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_EE} != "no" +SUBDIR+= ee +.endif + .if ${MK_GPL_DTC} != "yes" SUBDIR+= dtc .endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:08:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0375180E; Wed, 11 Feb 2015 07:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E093D19D; Wed, 11 Feb 2015 07:08:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B78Z6m007325; Wed, 11 Feb 2015 07:08:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B78X35007316; Wed, 11 Feb 2015 07:08:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110708.t1B78X35007316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278555 - in stable/10: etc/rc.d sbin share/man/man4 share/mk sys/modules tools/build/mk tools/build/options usr.bin usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:08:36 -0000 Author: ngie Date: Wed Feb 11 07:08:32 2015 New Revision: 278555 URL: https://svnweb.freebsd.org/changeset/base/278555 Log: MFC r277675,r277726,r278070: r277675: Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel modules, etc Sponsored by: EMC / Isilon Storage Division r277726: Build sbin/iscontrol again if MK_ISCSI != no Pointyhat to: me r278070: Remove duplicate MK_ISCSI block and sort the conditional blocks so this error won't crop up again in the future Reported by: gjb Added: stable/10/tools/build/options/WITHOUT_ISCSI - copied unchanged from r277675, head/tools/build/options/WITHOUT_ISCSI Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -63,8 +63,6 @@ FILES= DAEMON \ ipropd_slave \ ipsec \ ${_ipxrouted} \ - iscsictl \ - iscsid \ ${_kadmind} \ ${_kdc} \ keyserv \ @@ -188,6 +186,11 @@ FILES+= bsnmpd _ipxrouted= ipxrouted .endif +.if ${MK_ISCSI} != "no" +FILES+= iscsictl +FILES+= iscsid +.endif + .if ${MK_JAIL} != "no" FILES+= jail .endif Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -35,7 +35,6 @@ SUBDIR=adjkerntz \ hastd \ ifconfig \ init \ - iscontrol \ kldconfig \ kldload \ kldstat \ @@ -82,6 +81,11 @@ SUBDIR+= atm SUBDIR+= devd .endif +.if ${MK_INET6} != "no" +SUBDIR+= ping6 +SUBDIR+= rtsol +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif @@ -91,6 +95,10 @@ SUBDIR+= ipfw SUBDIR+= natd .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscontrol +.endif + .if ${MK_NAND} != "no" SUBDIR+= nandfs SUBDIR+= newfs_nandfs @@ -101,11 +109,6 @@ SUBDIR+= pfctl SUBDIR+= pflogd .endif -.if ${MK_INET6} != "no" -SUBDIR+= ping6 -SUBDIR+= rtsol -.endif - .if ${MK_QUOTAS} != "no" SUBDIR+= quotacheck .endif Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/share/man/man4/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -208,8 +208,6 @@ MAN= aac.4 \ ipw.4 \ ipwfw.4 \ isci.4 \ - iscsi.4 \ - iscsi_initiator.4 \ isp.4 \ ispfw.4 \ iwi.4 \ @@ -861,6 +859,12 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_ISCSI} != "no" +MAN+= iscsi.4 +MAN+= iscsi_initiator.4 + +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:08:32 2015 (r278555) @@ -297,6 +297,7 @@ __DEFAULT_YES_OPTIONS = \ IPFILTER \ IPFW \ IPX \ + ISCSI \ JAIL \ KDUMP \ KERBEROS \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -166,8 +166,6 @@ SUBDIR= \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ - iscsi \ - iscsi_initiator \ isp \ ${_ispfw} \ ${_iwi} \ @@ -435,6 +433,11 @@ _ipdivert= ipdivert _ipfw= ipfw .endif +.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) +SUBDIR+= iscsi +SUBDIR+= iscsi_initiator +.endif + .if ${MK_NAND} != "no" || defined(ALL_MODULES) _nandfs= nandfs _nandsim= nandsim Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:08:32 2015 (r278555) @@ -2167,6 +2167,20 @@ OLD_FILES+=usr/share/man/man3/ipx_ntoa.3 OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz .endif +.if ${MK_ISCSI} == no +OLD_FILES+=etc/rc.d/iscsictl +OLD_FILES+=etc/rc.d/iscsid +OLD_FILES+=sbin/iscontrol +OLD_FILES+=usr/bin/iscsictl +OLD_FILES+=usr/sbin/iscsid +OLD_FILES+=usr/share/man/man4/iscsi.4.gz +OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz +OLD_FILES+=usr/share/man/man5/iscsi.conf.5.gz +OLD_FILES+=usr/share/man/man8/iscontrol.8.gz +OLD_FILES+=usr/share/man/man8/iscsictl.8.gz +OLD_FILES+=usr/share/man/man8/iscsid.8.gz +.endif + .if ${MK_JAIL} == no OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail Copied: stable/10/tools/build/options/WITHOUT_ISCSI (from r277675, head/tools/build/options/WITHOUT_ISCSI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_ISCSI Wed Feb 11 07:08:32 2015 (r278555, copy of r277675, head/tools/build/options/WITHOUT_ISCSI) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr iscid 8 +and related utilities. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/usr.bin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -66,7 +66,6 @@ SUBDIR= alias \ id \ ipcrm \ ipcs \ - iscsictl \ join \ jot \ ${_kdump} \ @@ -253,6 +252,10 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsictl +.endif + .if ${MK_KDUMP} != "no" SUBDIR+= kdump SUBDIR+= truss Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/usr.sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -39,7 +39,6 @@ SUBDIR= adduser \ ifmcstat \ inetd \ iostat \ - iscsid \ kldxref \ mailwrapper \ makefs \ @@ -183,6 +182,10 @@ SUBDIR+= ipfwpcap SUBDIR+= IPXrouted .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsid +.endif + .if ${MK_JAIL} != "no" SUBDIR+= jail SUBDIR+= jexec From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:12:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98BA1958; Wed, 11 Feb 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A9F8243; Wed, 11 Feb 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7C2XV011304; Wed, 11 Feb 2015 07:12:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7C0ao011285; Wed, 11 Feb 2015 07:12:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110712.t1B7C0ao011285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278556 - in stable/10: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:12:02 -0000 Author: ngie Date: Wed Feb 11 07:12:00 2015 New Revision: 278556 URL: https://svnweb.freebsd.org/changeset/base/278556 Log: MFC r277725: r277725: Add MK_HAST knob for building and installing hastd(8), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_HAST - copied unchanged from r277725, head/tools/build/options/WITHOUT_HAST Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/examples/Makefile stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -46,7 +46,6 @@ FILES= DAEMON \ geli2 \ gptboot \ gssd \ - hastd \ ${_hcsecd} \ hostid \ hostid_save \ @@ -186,6 +185,10 @@ FILES+= bsnmpd _ipxrouted= ipxrouted .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/sbin/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -31,8 +31,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ kldconfig \ @@ -81,6 +79,11 @@ SUBDIR+= atm SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_INET6} != "no" SUBDIR+= ping6 SUBDIR+= rtsol Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/share/examples/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -64,11 +63,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -202,6 +196,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:12:00 2015 (r278556) @@ -288,6 +288,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ GPL_DTC \ GROFF \ + HAST \ HTML \ ICONV \ INET \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:12:00 2015 (r278556) @@ -1987,6 +1987,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h Copied: stable/10/tools/build/options/WITHOUT_HAST (from r277725, head/tools/build/options/WITHOUT_HAST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_HAST Wed Feb 11 07:12:00 2015 (r278556, copy of r277725, head/tools/build/options/WITHOUT_HAST) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:21:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B011AAE0; Wed, 11 Feb 2015 07:21:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90CB6335; Wed, 11 Feb 2015 07:21:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7LJNI014082; Wed, 11 Feb 2015 07:21:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7LHQj014072; Wed, 11 Feb 2015 07:21:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110721.t1B7LHQj014072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278557 - in stable/10: lib share/examples share/man/man4 share/mk sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:21:19 -0000 Author: ngie Date: Wed Feb 11 07:21:16 2015 New Revision: 278557 URL: https://svnweb.freebsd.org/changeset/base/278557 Log: MFC r277727: r277727: Add MK_BHYVE knob for building and installing bhyve(4), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BHYVE - copied unchanged from r277727, head/tools/build/options/WITHOUT_BHYVE Modified: stable/10/lib/Makefile stable/10/share/examples/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile.amd64 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/lib/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -225,8 +225,10 @@ _librtld_db= librtld_db .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" _libvmmapi= libvmmapi .endif +.endif .if ${MACHINE_CPUARCH} == "ia64" _libefi= libefi Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/examples/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -7,7 +7,6 @@ LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ - bhyve \ bootforth \ csh \ diskless \ @@ -41,7 +40,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ FreeBSD_version/Makefile \ FreeBSD_version/README \ IPv6/USAGE \ - bhyve/vmrun.sh \ bootforth/README \ bootforth/boot.4th \ bootforth/frames.4th \ @@ -205,6 +203,13 @@ XFILES+= hast/ucarp.sh \ hast/vip-up.sh .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +LDIRS+= bhyve +XFILES+= bhyve/vmrun.sh +.endif +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/man/man4/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -836,7 +836,6 @@ MLINKS+=lindev.4 full.4 .endif .if ${MACHINE_CPUARCH} == "amd64" -_bhyve.4= bhyve.4 _if_ntb.4= if_ntb.4 _ntb.4= ntb.4 _ntb_hw.4= ntb_hw.4 @@ -849,6 +848,10 @@ MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 + +.if ${MK_BHYVE} != "no" +_bhyve.4= bhyve.4 +.endif .endif .if ${MACHINE_CPUARCH} == "mips" Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:21:16 2015 (r278557) @@ -254,6 +254,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + BHYVE \ BINUTILS \ BLUETOOTH \ BMAKE \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -774,7 +774,9 @@ _twa= twa _vesa= vesa _viawd= viawd _virtio= virtio +.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) _vmm= vmm +.endif _vxge= vxge _x86bios= x86bios _wbwd= wbwd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:21:16 2015 (r278557) @@ -144,6 +144,16 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_BHYVE} == no +OLD_FILES+=usr/sbin/bhyve +OLD_FILES+=usr/sbin/bhyvectl +OLD_FILES+=usr/sbin/bhyveload +OLD_FILES+=usr/share/examples/bhyve/vmrun.sh +OLD_FILES+=usr/share/man/man8/bhyve.8.gz +OLD_FILES+=usr/share/man/man8/bhyveload.8.gz +OLD_DIRS+=usr/share/examples/bhyve +.endif + .if ${MK_BLUETOOTH} == no OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts Copied: stable/10/tools/build/options/WITHOUT_BHYVE (from r277727, head/tools/build/options/WITHOUT_BHYVE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BHYVE Wed Feb 11 07:21:16 2015 (r278557, copy of r277727, head/tools/build/options/WITHOUT_BHYVE) @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. Modified: stable/10/usr.sbin/Makefile.amd64 ============================================================================== --- stable/10/usr.sbin/Makefile.amd64 Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/usr.sbin/Makefile.amd64 Wed Feb 11 07:21:16 2015 (r278557) @@ -10,9 +10,11 @@ SUBDIR+= acpi SUBDIR+= apm .endif SUBDIR+= asf +.if ${MK_BHYVE} != "no" SUBDIR+= bhyve SUBDIR+= bhyvectl SUBDIR+= bhyveload +.endif SUBDIR+= boot0cfg .if ${MK_TOOLCHAIN} != "no" SUBDIR+= btxld From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:26:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CADD0C54 for ; Wed, 11 Feb 2015 07:26:55 +0000 (UTC) Received: from mail-yh0-f48.google.com (mail-yh0-f48.google.com [209.85.213.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E5CB362 for ; Wed, 11 Feb 2015 07:26:55 +0000 (UTC) Received: by mail-yh0-f48.google.com with SMTP id t59so648783yho.7 for ; Tue, 10 Feb 2015 23:26:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ofmANMu2bYiHvpfvcT2C9oF7Yji8vwW5f+rupiwHfV8=; b=L95XuzJyBcDGbOoVmCiKkA2MDN7ywVO/vckP5lra7WqbnhApBmoklz9F2oRflecE1f e7NklClUHb1XGE1wI2GKW6nguNPu2eS789TH8S+Cn5uxHzvFOMFRTYbllhM47FCU1Kxe VdcTWOrWX3A3KzOFCZCu5vgbx06c3Lip+7AtSodMSdsJ0OX+f3vAqQSWgY6+xqwT22u3 23aTYgLTp+Ws5L2OVjhjyTvv8wV63cLHIC/I1P7nDEemfv9Qj3KIsVa6+EwUSJp7/QTW HlIE6QSFig2r+HjWejUna5FAoyKoPjwaaLRj+Q49WsNKlu11H8vM7MST4ZlaqfGzkDjA 3HSQ== X-Gm-Message-State: ALoCoQkwOkIlJXIac5CtaMIHpE3h+ZZJqXA1lYof24Y9164nWt0jPu4KAk3/Q4lAok48d3Ovx2lK MIME-Version: 1.0 X-Received: by 10.170.191.211 with SMTP id i202mr836247yke.32.1423638077436; Tue, 10 Feb 2015 23:01:17 -0800 (PST) Received: by 10.170.56.134 with HTTP; Tue, 10 Feb 2015 23:01:17 -0800 (PST) In-Reply-To: <201502110058.t1B0wGYZ032751@svn.freebsd.org> References: <201502110058.t1B0wGYZ032751@svn.freebsd.org> Date: Wed, 11 Feb 2015 08:01:17 +0100 Message-ID: Subject: Re: svn commit: r278545 - head/sys/kern From: Oliver Pinter To: Rui Paulo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:26:56 -0000 On Wed, Feb 11, 2015 at 1:58 AM, Rui Paulo wrote: > Author: rpaulo > Date: Wed Feb 11 00:58:15 2015 > New Revision: 278545 > URL: https://svnweb.freebsd.org/changeset/base/278545 > > Log: > Restore the data array in coredump(), but use a different style to > calculate the length. > > Requested by: kib > > Modified: > head/sys/kern/kern_sig.c > > Modified: head/sys/kern/kern_sig.c > ============================================================================== > --- head/sys/kern/kern_sig.c Tue Feb 10 23:48:06 2015 (r278544) > +++ head/sys/kern/kern_sig.c Wed Feb 11 00:58:15 2015 (r278545) > @@ -3261,9 +3261,11 @@ coredump(struct thread *td) > void *rl_cookie; > off_t limit; > int compress; > - char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */ > + char *data = NULL; > char *fullpath, *freepath = NULL; > size_t len; > + static const char comm_name[] = "comm="; > + static const char core_name[] = "core="; > > #ifdef COMPRESS_USER_CORES > compress = compress_user_cores; > @@ -3357,25 +3359,31 @@ close: > */ > if (coredump_devctl == 0) > goto out; > + len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 + > + sizeof(' ') + sizeof(core_name) - 1; > + data = malloc(len, M_TEMP, M_WAITOK); > + if (data == NULL) > + goto out; This check is pointless, as you can see in man 9 malloc: M_WAITOK Indicates that it is OK to wait for resources. If the request cannot be immediately fulfilled, the current process is put to sleep to wait for resources to be released by other processes. The malloc(), realloc(), and reallocf() functions cannot return NULL if M_WAITOK is specified. > if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > goto out; > if (!coredump_sanitise_path(fullpath)) > goto out; > - snprintf(data, sizeof(data), "comm=%s ", fullpath); > + snprintf(data, len, "%s%s ", comm_name, fullpath); > free(freepath, M_TEMP); > freepath = NULL; > if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) > goto out; > if (!coredump_sanitise_path(fullpath)) > goto out; > - strlcat(data, "core=", sizeof(data)); > - len = strlcat(data, fullpath, sizeof(data)); > + strlcat(data, core_name, len); > + strlcat(data, fullpath, len); > devctl_notify("kernel", "signal", "coredump", data); > out: > #ifdef AUDIT > audit_proc_coredump(td, name, error); > #endif > free(freepath, M_TEMP); > + free(data, M_TEMP); > free(name, M_TEMP); > return (error); > } > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:30:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 004D2D94; Wed, 11 Feb 2015 07:30:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDC33379; Wed, 11 Feb 2015 07:30:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7UNJO019641; Wed, 11 Feb 2015 07:30:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7ULvQ019447; Wed, 11 Feb 2015 07:30:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110730.t1B7ULvQ019447@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278558 - in stable/10: etc etc/rc.d share/man/man5 share/mk sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:30:24 -0000 Author: ngie Date: Wed Feb 11 07:30:20 2015 New Revision: 278558 URL: https://svnweb.freebsd.org/changeset/base/278558 Log: MFC r277728: r277728: Add MK_AUTOFS knob for building and installing autofs(4), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_AUTOFS - copied unchanged from r277728, head/tools/build/options/WITHOUT_AUTOFS Modified: stable/10/etc/Makefile stable/10/etc/rc.d/Makefile stable/10/share/man/man5/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/etc/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -14,8 +14,7 @@ SUBDIR+=sendmail SUBDIR+=tests .endif -BIN1= auto_master \ - crontab \ +BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -90,6 +89,10 @@ BIN1+= amd.map BIN1+= apmd.conf .endif +.if ${MK_AUTOFS} != "no" +BIN1+= auto_master +.endif + .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif @@ -229,7 +232,9 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif +.if ${MK_AUTOFS} != "no" ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install +.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -17,9 +17,6 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ - automount \ - automountd \ - autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ @@ -170,6 +167,12 @@ FILES+= apm FILES+= apmd .endif +.if ${MK_AUTOFS} != "no" +FILES+= automount +FILES+= automountd +FILES+= autounmountd +.endif + .if ${MK_BLUETOOTH} != "no" _bluetooth= bluetooth _bthidd= bthidd Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/share/man/man5/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -7,7 +7,6 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ - autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ @@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_AUTOFS} != "no" +MAN+= autofs.5 +.endif + .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:30:20 2015 (r278558) @@ -254,6 +254,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + AUTOFS \ BHYVE \ BINUTILS \ BLUETOOTH \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -44,7 +44,7 @@ SUBDIR= \ ata \ ath \ ath_pci \ - autofs \ + ${_autofs} \ ${_auxio} \ ${_bce} \ bfe \ @@ -404,6 +404,10 @@ _cxgb= cxgb _cxgbe= cxgbe .endif +.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) +_autofs= autofs +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:30:20 2015 (r278558) @@ -144,6 +144,26 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_AUTOFS} == no +OLD_FILES+=etc/autofs/include_ldap +OLD_FILES+=etc/autofs/special_hosts +OLD_FILES+=etc/autofs/special_media +OLD_FILES+=etc/autofs/special_null +OLD_FILES+=etc/auto_master +OLD_FILES+=etc/rc.d/automount +OLD_FILES+=etc/rc.d/automountd +OLD_FILES+=etc/rc.d/autounmountd +OLD_FILES+=usr/sbin/automount +OLD_FILES+=usr/sbin/automountd +OLD_FILES+=usr/sbin/autounmountd +OLD_FILES+=usr/share/man/man5/autofs.5.gz +OLD_FILES+=usr/share/man/man5/auto_master.5.gz +OLD_FILES+=usr/share/man/man8/automount.8.gz +OLD_FILES+=usr/share/man/man8/automountd.8.gz +OLD_FILES+=usr/share/man/man8/autounmountd.8.gz +OLD_DIRS+=etc/autofs +.endif + .if ${MK_BHYVE} == no OLD_FILES+=usr/sbin/bhyve OLD_FILES+=usr/sbin/bhyvectl Copied: stable/10/tools/build/options/WITHOUT_AUTOFS (from r277728, head/tools/build/options/WITHOUT_AUTOFS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_AUTOFS Wed Feb 11 07:30:20 2015 (r278558, copy of r277728, head/tools/build/options/WITHOUT_AUTOFS) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/usr.sbin/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -5,7 +5,6 @@ SUBDIR= adduser \ arp \ - autofs \ binmiscctl \ bootparamd \ bsdconfig \ @@ -125,6 +124,10 @@ SUBDIR+= praudit SUBDIR+= authpf .endif +.if ${MK_AUTOFS} != "no" +SUBDIR+= autofs +.endif + .if ${MK_BLUETOOTH} != "no" SUBDIR+= bluetooth .endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:38:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFA7BC9; Wed, 11 Feb 2015 07:38:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A8CD644; Wed, 11 Feb 2015 07:38:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7c8Ab021591; Wed, 11 Feb 2015 07:38:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7c8OL021590; Wed, 11 Feb 2015 07:38:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110738.t1B7c8OL021590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278559 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:38:08 -0000 Author: ngie Date: Wed Feb 11 07:38:07 2015 New Revision: 278559 URL: https://svnweb.freebsd.org/changeset/base/278559 Log: MFC r264515: r264515 (by imp): Document WITHOUT_GPL_DTC too. Added: stable/10/tools/build/options/WITHOUT_GPL_DTC - copied unchanged from r264515, head/tools/build/options/WITHOUT_GPL_DTC Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/tools/build/options/WITHOUT_GPL_DTC (from r264515, head/tools/build/options/WITHOUT_GPL_DTC) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_GPL_DTC Wed Feb 11 07:38:07 2015 (r278559, copy of r264515, head/tools/build/options/WITHOUT_GPL_DTC) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build the BSD licensed version of the device tree compiler, instead of the +GPL'd one from elinux.org. From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:44:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F48124F; Wed, 11 Feb 2015 07:44:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B10F75A; Wed, 11 Feb 2015 07:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7irrq025906; Wed, 11 Feb 2015 07:44:53 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7irov025905; Wed, 11 Feb 2015 07:44:53 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201502110744.t1B7irov025905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 11 Feb 2015 07:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278560 - head/contrib/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:44:54 -0000 Author: jmg Date: Wed Feb 11 07:44:53 2015 New Revision: 278560 URL: https://svnweb.freebsd.org/changeset/base/278560 Log: add an assert in case the sizeof int ever becomes bigger.. Then we will have issues, at least we'll know where one of them are.. Submitted by: Erich Dollansky Modified: head/contrib/top/utils.c Modified: head/contrib/top/utils.c ============================================================================== --- head/contrib/top/utils.c Wed Feb 11 07:38:07 2015 (r278559) +++ head/contrib/top/utils.c Wed Feb 11 07:44:53 2015 (r278560) @@ -58,6 +58,7 @@ char *str; * ever convert will be 2^32-1, which is 10 * digits. */ +_Static_assert(sizeof(int) <= 4, "buffer too small for this sized int"); char *itoa(val) From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:49:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF1FE4A0; Wed, 11 Feb 2015 07:49:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB107781; Wed, 11 Feb 2015 07:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7n1T0026631; Wed, 11 Feb 2015 07:49:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7n1DV026630; Wed, 11 Feb 2015 07:49:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110749.t1B7n1DV026630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278561 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:49:02 -0000 Author: ngie Date: Wed Feb 11 07:49:00 2015 New Revision: 278561 URL: https://svnweb.freebsd.org/changeset/base/278561 Log: Document caveat with specifying WITHOUT_VI at build/install time when building older releases of FreeBSD Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Feb 11 07:44:53 2015 (r278560) +++ head/UPDATING Wed Feb 11 07:49:00 2015 (r278561) @@ -292,6 +292,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 The lindev device has been removed since /dev/full has been made a standard device. __FreeBSD_version has been bumped. +20140424: + The knob WITHOUT_VI was added to the base system, which controls + building ex(1), vi(1), etc. Older releases of FreeBSD required ex(1) + in order to reorder files share/termcap and didn't build ex(1) as a + build tool, so building/installing with WITH_VI is highly advised for + build hosts for older releases. + + This issue has been fixed in stable/9 and stable/10 in r277022 and + r276991, respectively. + 20140418: The YES_HESIOD knob has been removed. It has been obsolete for a decade. Please move to using WITH_HESIOD instead or your builds From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 07:53:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8213B628; Wed, 11 Feb 2015 07:53:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62ABB83C; Wed, 11 Feb 2015 07:53:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7r3w7030574; Wed, 11 Feb 2015 07:53:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7r3t5030573; Wed, 11 Feb 2015 07:53:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110753.t1B7r3t5030573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278562 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:53:03 -0000 Author: ngie Date: Wed Feb 11 07:53:02 2015 New Revision: 278562 URL: https://svnweb.freebsd.org/changeset/base/278562 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Wed Feb 11 07:49:00 2015 (r278561) +++ stable/10/share/man/man5/src.conf.5 Wed Feb 11 07:53:02 2015 (r278562) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd September 25, 2014 +.Dd February 10, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -124,6 +124,18 @@ Set to not build audit support into syst .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . +.It Va WITHOUT_AUTOFS +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTOFS 278558 2015-02-11 07:30:20Z ngie +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. +.It Va WITHOUT_BHYVE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BHYVE 278557 2015-02-11 07:21:16Z ngie +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste Set to not install binutils (as, c++-filt, gconv, @@ -341,6 +353,12 @@ dynamically. Set to build .Xr ed 1 without support for encryption/decryption. +.It Va WITHOUT_EE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EE 278554 2015-02-11 06:57:20Z ngie +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to @@ -448,10 +466,10 @@ Set to not build GPIB bus support. Set to not build .Xr gpioctl 8 as part of the base system. -.It Va WITH_GPL_DTC -.\" from FreeBSD: stable/10/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim -Set to build the GPL'd version of the device tree compiler from elinux.org, -instead of the BSD licensed one. +.It Va WITHOUT_GPL_DTC +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPL_DTC 278559 2015-02-11 07:38:07Z ngie +Set to build the BSD licensed version of the device tree compiler, instead of the +GPL'd one from elinux.org. .It Va WITHOUT_GROFF .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build @@ -463,6 +481,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HAST 278556 2015-02-11 07:12:00Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: stable/10/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. @@ -470,13 +493,13 @@ Set to build Hesiod support. .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HYPERV 272128 2014-09-25 20:34:13Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HYPERV 272322 2014-09-30 17:54:57Z delphij Set to not build or install HyperV utilities. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_HYPERV -.\" from FreeBSD: stable/10/tools/build/options/WITH_HYPERV 272128 2014-09-25 20:34:13Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITH_HYPERV 272322 2014-09-30 17:54:57Z delphij Set to build and install HyperV utilities. .Pp It is a default setting on @@ -548,6 +571,11 @@ When set, it also enforces the following .It Va WITHOUT_IPX_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without IPX support. +.It Va WITHOUT_ISCSI +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ISCSI 278555 2015-02-11 07:08:32Z ngie +Set to not build +.Xr iscid 8 +and related utilities. .It Va WITHOUT_JAIL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:07:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63BD9A3A; Wed, 11 Feb 2015 08:07:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECA797F; Wed, 11 Feb 2015 08:07:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B87XH6035870; Wed, 11 Feb 2015 08:07:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B87XIH035869; Wed, 11 Feb 2015 08:07:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502110807.t1B87XIH035869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Feb 2015 08:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278563 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:07:33 -0000 Author: bapt Date: Wed Feb 11 08:07:32 2015 New Revision: 278563 URL: https://svnweb.freebsd.org/changeset/base/278563 Log: MFC: r278172 Plug resources leak CID: 1125813 CID: 1125807 CID: 1125808 Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 07:53:02 2015 (r278562) +++ stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:07:32 2015 (r278563) @@ -375,8 +375,11 @@ load_fingerprints(const char *path, int return (NULL); STAILQ_INIT(fingerprints); - if ((d = opendir(path)) == NULL) + if ((d = opendir(path)) == NULL) { + free(fingerprints); + return (NULL); + } while ((ent = readdir(d))) { if (strcmp(ent->d_name, ".") == 0 || @@ -806,8 +809,11 @@ cleanup: close(fd_sig); unlink(tmpsig); } - close(fd_pkg); - unlink(tmppkg); + + if (fd_pkg != -1) { + close(fd_pkg); + unlink(tmppkg); + } return (ret); } @@ -851,7 +857,7 @@ bootstrap_pkg_local(const char *pkgpath, if (config_string(SIGNATURE_TYPE, &signature_type) != 0) { warnx("Error looking up SIGNATURE_TYPE"); - return (-1); + goto cleanup; } if (signature_type != NULL && strcasecmp(signature_type, "FINGERPRINTS") == 0) { From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:20:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7FE9CBE; Wed, 11 Feb 2015 08:20:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C34F4A7F; Wed, 11 Feb 2015 08:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B8K8Zm040981; Wed, 11 Feb 2015 08:20:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8K8iU040980; Wed, 11 Feb 2015 08:20:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502110820.t1B8K8iU040980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Feb 2015 08:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278564 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:20:09 -0000 Author: bapt Date: Wed Feb 11 08:20:07 2015 New Revision: 278564 URL: https://svnweb.freebsd.org/changeset/base/278564 Log: MFC: r278173 Test the return of fetchParseURL(3) CID: 1125811 Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:07:32 2015 (r278563) +++ stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:20:07 2015 (r278564) @@ -202,7 +202,11 @@ fetch_to_fd(const char *url, char *path) retry = max_retry; - u = fetchParseURL(url); + if ((u = fetchParseURL(url)) == NULL) { + warn("fetchParseURL('%s')", url); + return (-1); + } + while (remote == NULL) { if (retry == max_retry) { if (strcmp(u->scheme, "file") != 0 && From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:26:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAD6F144; Wed, 11 Feb 2015 08:26:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D64DFBA7; Wed, 11 Feb 2015 08:26:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B8QbPZ045475; Wed, 11 Feb 2015 08:26:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8Qbka045474; Wed, 11 Feb 2015 08:26:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502110826.t1B8Qbka045474@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Feb 2015 08:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278565 - in head: . share/info X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:26:38 -0000 Author: bapt Date: Wed Feb 11 08:26:36 2015 New Revision: 278565 URL: https://svnweb.freebsd.org/changeset/base/278565 Log: Remove remnant from texinfo Deleted: head/share/info/ Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Feb 11 08:20:07 2015 (r278564) +++ head/Makefile.inc1 Wed Feb 11 08:26:36 2015 (r278565) @@ -50,10 +50,6 @@ .include .include -# We must do share/info early so that installation of info `dir' -# entries works correctly. Do it first since it is less likely to -# grow dependencies on include and lib than vice versa. -# # We must do lib/ and libexec/ before bin/, because if installworld # installs a new /bin/sh, the 'make' command will *immediately* # use that new version. And the new (dynamically-linked) /bin/sh @@ -63,7 +59,7 @@ SRCDIR?= ${.CURDIR} .if defined(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} .else -SUBDIR= share/info lib libexec +SUBDIR= lib libexec SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:32:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5D754A5; Wed, 11 Feb 2015 08:32:07 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2495BC6E; Wed, 11 Feb 2015 08:32:06 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1B8W0RH073482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Feb 2015 10:32:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1B8W0RH073482 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1B8W0VK073481; Wed, 11 Feb 2015 10:32:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 11 Feb 2015 10:32:00 +0200 From: Konstantin Belousov To: Rui Paulo Subject: Re: svn commit: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen Message-ID: <20150211083200.GO42409@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, trasz@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:32:07 -0000 On Wed, Feb 11, 2015 at 12:43:39AM +0000, Rui Paulo wrote: > On Feb 09, 2015, at 01:01 PM, Konstantin Belousov wrote: > > Author: kib > Date: Mon Feb 9 21:00:56 2015 > New Revision: 278473 > URL: https://svnweb.freebsd.org/changeset/base/278473 > > Log: > Add x2APIC support. Enable it by default if CPU is capable. The > hw.x2apic_enable tunable allows disabling it from the loader prompt. > š > This breaks VMware Fusion when the host CPU has x2APIC support. šIn > my case, mpt(4) was unable to receive interrupts and USB was similarly > broken. šIt's possible that this is a VMware bug, but you might want to > avoid turning this on when running under the VMware hypervisor. Neel pointed this out to me when the patch was reviewed. He told me that x2APIC does not work in Fusion 5.x, while it seems to be fixed in 7.x. https://communities.vmware.com/message/2173695?tstart=0 Upon further discussion with Neel and Peter, it was suggested that we enable enable x2APIC unconditionally, which seems what is done for Linux benchmarks. Is vmware 5.x is used while there is already at least version 7.x ? I have no idea about vmware product nomenclature and lifecycle. From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:33:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 735B05EB; Wed, 11 Feb 2015 08:33:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CF39C79; Wed, 11 Feb 2015 08:33:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B8XOur050136; Wed, 11 Feb 2015 08:33:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8XNpZ050127; Wed, 11 Feb 2015 08:33:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110833.t1B8XNpZ050127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 08:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278568 - in stable/9: share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:33:24 -0000 Author: ngie Date: Wed Feb 11 08:33:22 2015 New Revision: 278568 URL: https://svnweb.freebsd.org/changeset/base/278568 Log: MFstable/10 r278554: r278554: MFC r277663: r277663: Add MK_EE knob to control installing edit, ee, etc Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_EE - copied unchanged from r278554, stable/10/tools/build/options/WITHOUT_EE Modified: stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/share/mk/bsd.own.mk Wed Feb 11 08:33:22 2015 (r278568) @@ -358,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ CXX \ DICT \ DYNAMICROOT \ + EE \ EXAMPLES \ FLOPPY \ FORTH \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:33:22 2015 (r278568) @@ -1458,6 +1458,23 @@ OLD_FILES+=usr/share/dict/web2a OLD_FILES+=usr/share/dict/words .endif +.if ${MK_EE} == no +OLD_FILES+=usr/bin/edit +OLD_FILES+=usr/bin/ee +OLD_FILES+=usr/bin/ree +OLD_FILES+=usr/share/man/man1/edit.1.gz +OLD_FILES+=usr/share/man/man1/ee.1.gz +OLD_FILES+=usr/share/man/man1/ree.1.gz +OLD_FILES+=usr/share/nls/C/ee.cat +OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat +OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat +.endif + #.if ${MK_EXAMPLES} == no # to be filled in #.endif Copied: stable/9/tools/build/options/WITHOUT_EE (from r278554, stable/10/tools/build/options/WITHOUT_EE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_EE Wed Feb 11 08:33:22 2015 (r278568, copy of r278554, stable/10/tools/build/options/WITHOUT_EE) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/usr.bin/Makefile Wed Feb 11 08:33:22 2015 (r278568) @@ -37,7 +37,6 @@ SUBDIR= alias \ cut \ dirname \ du \ - ee \ elf2aout \ elfdump \ enigma \ @@ -236,6 +235,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_EE} != "no" +SUBDIR+= ee +.endif + .if ${MK_HESIOD} != "no" SUBDIR+= hesinfo .endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 08:52:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39CAEA78; Wed, 11 Feb 2015 08:52:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23380E65; Wed, 11 Feb 2015 08:52:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B8qWiD059469; Wed, 11 Feb 2015 08:52:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8qUfk059454; Wed, 11 Feb 2015 08:52:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110852.t1B8qUfk059454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 08:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278569 - in stable/10: . lib lib/libpam/modules share/mk tools/build/options usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:52:32 -0000 Author: ngie Date: Wed Feb 11 08:52:29 2015 New Revision: 278569 URL: https://svnweb.freebsd.org/changeset/base/278569 Log: MFC r278182: r278182: Conditionalize building radius support into libpam, ppp, etc via MK_RADIUS_SUPPORT Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT - copied unchanged from r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT Modified: stable/10/Makefile.inc1 stable/10/lib/Makefile stable/10/lib/libpam/modules/modules.inc stable/10/share/mk/bsd.own.mk stable/10/usr.sbin/ppp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/Makefile.inc1 Wed Feb 11 08:52:29 2015 (r278569) @@ -1537,7 +1537,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus \ + ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ @@ -1567,6 +1567,10 @@ _lib_atf= lib/atf _lib_libthr= lib/libthr .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_lib_libradius= lib/libradius +.endif + .if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/lib/Makefile Wed Feb 11 08:52:29 2015 (r278569) @@ -75,7 +75,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libpmc} \ ${_libproc} \ libprocstat \ - libradius \ + ${_libradius} \ librpcsvc \ librt \ ${_librtld_db} \ @@ -131,7 +131,7 @@ SUBDIR_DEPEND_liblibrpcsec_gss= libgssap SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd -SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} +SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd @@ -258,6 +258,10 @@ _libmp= libmp _libpmc= libpmc .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_libradius= libradius +.endif + .if ${MK_SENDMAIL} != "no" _libmilter= libmilter _libsm= libsm Modified: stable/10/lib/libpam/modules/modules.inc ============================================================================== --- stable/10/lib/libpam/modules/modules.inc Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/lib/libpam/modules/modules.inc Wed Feb 11 08:52:29 2015 (r278569) @@ -21,7 +21,9 @@ MODULES += pam_opie MODULES += pam_opieaccess MODULES += pam_passwdqc MODULES += pam_permit +.if ${MK_RADIUS_SUPPORT} != "no" MODULES += pam_radius +.endif MODULES += pam_rhosts MODULES += pam_rootok MODULES += pam_securetty Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 08:52:29 2015 (r278569) @@ -341,6 +341,7 @@ __DEFAULT_YES_OPTIONS = \ PPP \ PROFILE \ QUOTAS \ + RADIUS_SUPPORT \ RCMDS \ RCS \ RESCUE \ Copied: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT (from r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT Wed Feb 11 08:52:29 2015 (r278569, copy of r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . Modified: stable/10/usr.sbin/ppp/Makefile ============================================================================== --- stable/10/usr.sbin/ppp/Makefile Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/usr.sbin/ppp/Makefile Wed Feb 11 08:52:29 2015 (r278569) @@ -31,6 +31,9 @@ PPP_NO_NETGRAPH= .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif +.if ${MK_RADIUS_SUPPORT} == "no" +PPP_NO_RADIUS= +.endif .if defined(PPP_NO_SUID) BINMODE=554 From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:00:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB66BECB; Wed, 11 Feb 2015 09:00:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B6EEDD; Wed, 11 Feb 2015 09:00:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B90Nak061182; Wed, 11 Feb 2015 09:00:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B90N0Y061180; Wed, 11 Feb 2015 09:00:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110900.t1B90N0Y061180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278570 - in stable/10: etc/rc.d tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:00:24 -0000 Author: ngie Date: Wed Feb 11 09:00:22 2015 New Revision: 278570 URL: https://svnweb.freebsd.org/changeset/base/278570 Log: MFC r277741: r277741: Respect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 08:52:29 2015 (r278569) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:00:22 2015 (r278570) @@ -55,8 +55,6 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ - ipropd_master \ - ipropd_slave \ ipsec \ ${_ipxrouted} \ ${_kadmind} \ @@ -202,6 +200,8 @@ FILES+= jail .endif .if ${MK_KERBEROS} != "no" +FILES+= ipropd_master +FILES+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:52:29 2015 (r278569) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:00:22 2015 (r278570) @@ -2236,6 +2236,8 @@ OLD_FILES+=usr/share/man/man8/jls.8.gz .endif .if ${MK_KERBEROS} == no +OLD_FILES+=etc/rc.d/ipropd_master +OLD_FILES+=etc/rc.d/ipropd_slave OLD_FILES+=usr/bin/compile_et OLD_FILES+=usr/bin/hxtool OLD_FILES+=usr/bin/kadmin From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:02:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5293EA5; Wed, 11 Feb 2015 09:02:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 332DBF7C; Wed, 11 Feb 2015 09:02:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B92ONc064461; Wed, 11 Feb 2015 09:02:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B92MKa064448; Wed, 11 Feb 2015 09:02:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502110902.t1B92MKa064448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 09:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278571 - in stable/10/sys: fs/tmpfs vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:02:24 -0000 Author: kib Date: Wed Feb 11 09:02:21 2015 New Revision: 278571 URL: https://svnweb.freebsd.org/changeset/base/278571 Log: MFC r277828: Update mtime for tmpfs files modified through memory mapping. MFC r277969: Update both ctime and mtime for writes to tmpfs files. MFC r277972: Remove single-use boolean. MFC r278151: Remove duplicated assignment. Modified: stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vfsops.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c stable/10/sys/vm/vm_fault.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs.h Wed Feb 11 09:02:21 2015 (r278571) @@ -398,6 +398,7 @@ int tmpfs_alloc_vp(struct mount *, struc void tmpfs_free_vp(struct vnode *); int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, struct componentname *, char *); +void tmpfs_check_mtime(struct vnode *); void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_destroy(struct tmpfs_mount *, struct tmpfs_node *); Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Wed Feb 11 09:02:21 2015 (r278571) @@ -1417,6 +1417,31 @@ retry: return (0); } +void +tmpfs_check_mtime(struct vnode *vp) +{ + struct tmpfs_node *node; + struct vm_object *obj; + + ASSERT_VOP_ELOCKED(vp, "check_mtime"); + if (vp->v_type != VREG) + return; + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + /* unlocked read */ + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + VM_OBJECT_WLOCK(obj); + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + obj->flags &= ~OBJ_TMPFS_DIRTY; + node = VP_TO_TMPFS_NODE(vp); + node->tn_status |= TMPFS_NODE_MODIFIED | + TMPFS_NODE_CHANGED; + } + VM_OBJECT_WUNLOCK(obj); + } +} + /* * Change flags of the given vnode. * Caller should execute tmpfs_update on vp after a successful execution. Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Wed Feb 11 09:02:21 2015 (r278571) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -417,11 +418,45 @@ tmpfs_statfs(struct mount *mp, struct st static int tmpfs_sync(struct mount *mp, int waitfor) { + struct vnode *vp, *mvp; + struct vm_object *obj; if (waitfor == MNT_SUSPEND) { MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; MNT_IUNLOCK(mp); + } else if (waitfor == MNT_LAZY) { + /* + * Handle lazy updates of mtime from writes to mmaped + * regions. Use MNT_VNODE_FOREACH_ALL instead of + * MNT_VNODE_FOREACH_ACTIVE, since unmap of the + * tmpfs-backed vnode does not call vinactive(), due + * to vm object type is OBJT_SWAP. + */ + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type != VREG) { + VI_UNLOCK(vp); + continue; + } + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + + /* + * Unlocked read, avoid taking vnode lock if + * not needed. Lost update will be handled on + * the next call. + */ + if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { + VI_UNLOCK(vp); + continue; + } + if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, + curthread) != 0) + continue; + tmpfs_check_mtime(vp); + vput(vp); + } } return (0); } Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 11 09:02:21 2015 (r278571) @@ -453,7 +453,6 @@ tmpfs_write(struct vop_write_args *v) struct tmpfs_node *node; off_t oldsize; int error, ioflag; - boolean_t extended; vp = v->a_vp; uio = v->a_uio; @@ -473,8 +472,7 @@ tmpfs_write(struct vop_write_args *v) return (EFBIG); if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); - extended = uio->uio_offset + uio->uio_resid > node->tn_size; - if (extended) { + if (uio->uio_offset + uio->uio_resid > node->tn_size) { error = tmpfs_reg_resize(vp, uio->uio_offset + uio->uio_resid, FALSE); if (error != 0) @@ -483,7 +481,7 @@ tmpfs_write(struct vop_write_args *v) error = uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio); node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | - (extended ? TMPFS_NODE_CHANGED : 0); + TMPFS_NODE_CHANGED; if (node->tn_mode & (S_ISUID | S_ISGID)) { if (priv_check_cred(v->a_cred, PRIV_VFS_RETAINSUGID, 0)) node->tn_mode &= ~(S_ISUID | S_ISGID); @@ -505,6 +503,7 @@ tmpfs_fsync(struct vop_fsync_args *v) MPASS(VOP_ISLOCKED(vp)); + tmpfs_check_mtime(vp); tmpfs_update(vp); return 0; @@ -1222,16 +1221,16 @@ tmpfs_readlink(struct vop_readlink_args static int tmpfs_inactive(struct vop_inactive_args *v) { - struct vnode *vp = v->a_vp; - + struct vnode *vp; struct tmpfs_node *node; + vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); - if (node->tn_links == 0) vrecycle(vp); - - return 0; + else + tmpfs_check_mtime(vp); + return (0); } int Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_fault.c Wed Feb 11 09:02:21 2015 (r278571) @@ -358,11 +358,13 @@ RetryFault:; (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && /* avoid calling vm_object_set_writeable_dirty() */ ((prot & VM_PROT_WRITE) == 0 || - fs.first_object->type != OBJT_VNODE || + (fs.first_object->type != OBJT_VNODE && + (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { VM_OBJECT_RLOCK(fs.first_object); if ((prot & VM_PROT_WRITE) != 0 && - fs.first_object->type == OBJT_VNODE && + (fs.first_object->type == OBJT_VNODE || + (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) goto fast_failed; m = vm_page_lookup(fs.first_object, fs.first_pindex); Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_object.c Wed Feb 11 09:02:21 2015 (r278571) @@ -2200,8 +2200,13 @@ vm_object_set_writeable_dirty(vm_object_ { VM_OBJECT_ASSERT_WLOCKED(object); - if (object->type != OBJT_VNODE) + if (object->type != OBJT_VNODE) { + if ((object->flags & OBJ_TMPFS_NODE) != 0) { + KASSERT(object->type == OBJT_SWAP, ("non-swap tmpfs")); + vm_object_set_flag(object, OBJ_TMPFS_DIRTY); + } return; + } object->generation++; if ((object->flags & OBJ_MIGHTBEDIRTY) != 0) return; Modified: stable/10/sys/vm/vm_object.h ============================================================================== --- stable/10/sys/vm/vm_object.h Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_object.h Wed Feb 11 09:02:21 2015 (r278571) @@ -187,6 +187,7 @@ struct vm_object { #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ +#define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ #define OBJ_COLORED 0x1000 /* pg_color is defined */ #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:10:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B651E3DB; Wed, 11 Feb 2015 09:10:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F251FD5; Wed, 11 Feb 2015 09:10:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9AX2d065764; Wed, 11 Feb 2015 09:10:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9AXKA065763; Wed, 11 Feb 2015 09:10:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110910.t1B9AXKA065763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278572 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:10:33 -0000 Author: ngie Date: Wed Feb 11 09:10:32 2015 New Revision: 278572 URL: https://svnweb.freebsd.org/changeset/base/278572 Log: Regen src.conf(5) Modified: stable/9/share/man/man5/src.conf.5 Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Wed Feb 11 09:02:21 2015 (r278571) +++ stable/9/share/man/man5/src.conf.5 Wed Feb 11 09:10:32 2015 (r278572) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/9/tools/build/options/makeman 263058 2014-03-11 23:04:32Z gjb .\" $FreeBSD$ -.Dd March 11, 2014 +.Dd February 11, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -390,6 +390,12 @@ Set this if you do not want to link and .Pa /sbin dynamically. +.It Va WITHOUT_EE +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_EE 278568 2015-02-11 08:33:22Z ngie +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:12:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E7925BF; Wed, 11 Feb 2015 09:12:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5A5D8; Wed, 11 Feb 2015 09:12:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9CAHL069479; Wed, 11 Feb 2015 09:12:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9CAi4069478; Wed, 11 Feb 2015 09:12:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502110912.t1B9CAi4069478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 09:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278573 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:12:11 -0000 Author: kib Date: Wed Feb 11 09:12:10 2015 New Revision: 278573 URL: https://svnweb.freebsd.org/changeset/base/278573 Log: MFC r278209: Add ddb command 'show clocksource'. Modified: stable/10/sys/kern/kern_clocksource.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Wed Feb 11 09:10:32 2015 (r278572) +++ stable/10/sys/kern/kern_clocksource.c Wed Feb 11 09:12:10 2015 (r278573) @@ -967,3 +967,42 @@ sysctl_kern_eventtimer_periodic(SYSCTL_H SYSCTL_PROC(_kern_eventtimer, OID_AUTO, periodic, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_kern_eventtimer_periodic, "I", "Enable event timer periodic mode"); + +#include "opt_ddb.h" + +#ifdef DDB +#include + +DB_SHOW_COMMAND(clocksource, db_show_clocksource) +{ + struct pcpu_state *st; + int c; + + CPU_FOREACH(c) { + st = DPCPU_ID_PTR(c, timerstate); + db_printf( + "CPU %2d: action %d handle %d ipi %d idle %d\n" + " now %#jx nevent %#jx (%jd)\n" + " ntick %#jx (%jd) nhard %#jx (%jd)\n" + " nstat %#jx (%jd) nprof %#jx (%jd)\n" + " ncall %#jx (%jd) ncallopt %#jx (%jd)\n", + c, st->action, st->handle, st->ipi, st->idle, + (uintmax_t)st->now, + (uintmax_t)st->nextevent, + (uintmax_t)(st->nextevent - st->now) / tick_sbt, + (uintmax_t)st->nexttick, + (uintmax_t)(st->nexttick - st->now) / tick_sbt, + (uintmax_t)st->nexthard, + (uintmax_t)(st->nexthard - st->now) / tick_sbt, + (uintmax_t)st->nextstat, + (uintmax_t)(st->nextstat - st->now) / tick_sbt, + (uintmax_t)st->nextprof, + (uintmax_t)(st->nextprof - st->now) / tick_sbt, + (uintmax_t)st->nextcall, + (uintmax_t)(st->nextcall - st->now) / tick_sbt, + (uintmax_t)st->nextcallopt, + (uintmax_t)(st->nextcallopt - st->now) / tick_sbt); + } +} + +#endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:16:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BF92794; Wed, 11 Feb 2015 09:16:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85DE611A; Wed, 11 Feb 2015 09:16:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9GIum070150; Wed, 11 Feb 2015 09:16:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9GIvk070148; Wed, 11 Feb 2015 09:16:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110916.t1B9GIvk070148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278574 - in stable/10: etc/rc.d tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:16:18 -0000 Author: ngie Date: Wed Feb 11 09:16:17 2015 New Revision: 278574 URL: https://svnweb.freebsd.org/changeset/base/278574 Log: MFC r277736: r277736: Honor MK_ACCT with etc/rc.d/accounting Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 09:12:10 2015 (r278573) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:17 2015 (r278574) @@ -152,6 +152,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + .if ${MK_ACPI} != "no" FILES+= power_profile .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:12:10 2015 (r278573) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:16:17 2015 (r278574) @@ -6,6 +6,7 @@ # .if ${MK_ACCT} == no +OLD_FILES+=etc/rc.d/accounting OLD_FILES+=etc/periodic/daily/310.accounting OLD_FILES+=usr/sbin/accton OLD_FILES+=usr/sbin/sa From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:16:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 096E58C7; Wed, 11 Feb 2015 09:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E89C7122; Wed, 11 Feb 2015 09:16:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9GpsA070265; Wed, 11 Feb 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9GpYd070264; Wed, 11 Feb 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110916.t1B9GpYd070264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278575 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:16:52 -0000 Author: ngie Date: Wed Feb 11 09:16:51 2015 New Revision: 278575 URL: https://svnweb.freebsd.org/changeset/base/278575 Log: Remove etc/rc.d/accounting from FILES Modified: stable/10/etc/rc.d/Makefile Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:17 2015 (r278574) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) @@ -8,7 +8,6 @@ FILES= DAEMON \ NETWORKING \ SERVERS \ abi \ - accounting \ addswap \ adjkerntz \ archdep \ From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 09:21:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7742DBE7; Wed, 11 Feb 2015 09:21:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C9E1E0; Wed, 11 Feb 2015 09:21:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9LcqZ074602; Wed, 11 Feb 2015 09:21:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9LbmZ074599; Wed, 11 Feb 2015 09:21:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110921.t1B9LbmZ074599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278576 - in stable/9: etc/pam.d etc/rc.d tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:21:38 -0000 Author: ngie Date: Wed Feb 11 09:21:36 2015 New Revision: 278576 URL: https://svnweb.freebsd.org/changeset/base/278576 Log: MFC r275098,r277736,r277737: r277736: Honor MK_ACCT with etc/rc.d/accounting Sponsored by: EMC / Isilon Storage Division r277737: Honor MK_ACCT with etc/pam.d/atrun Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/pam.d/Makefile stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/pam.d/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/pam.d/Makefile ============================================================================== --- stable/9/etc/pam.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/etc/pam.d/Makefile Wed Feb 11 09:21:36 2015 (r278576) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + NO_OBJ= FILES= README \ - atrun \ cron \ ftpd \ imap \ @@ -16,6 +17,10 @@ FILES= README \ telnetd \ xdm +.if ${MK_AT} != "no" +FILES+= atrun +.endif + FILESDIR= /etc/pam.d FILESMODE= 644 FILESMODE_README= 444 Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/etc/rc.d/Makefile Wed Feb 11 09:21:36 2015 (r278576) @@ -8,7 +8,6 @@ FILES= DAEMON \ NETWORKING \ SERVERS \ abi \ - accounting \ addswap \ adjkerntz \ archdep \ @@ -149,6 +148,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + .if ${MK_AMD} != "no" FILES+= amd .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:21:36 2015 (r278576) @@ -6,6 +6,7 @@ # .if ${MK_ACCT} == no +OLD_FILES+=etc/rc.d/accounting OLD_FILES+=etc/periodic/daily/310.accounting OLD_FILES+=usr/sbin/accton OLD_FILES+=usr/sbin/sa @@ -61,6 +62,7 @@ OLD_FILES+=usr/share/man/man8/amd64/apmc .endif .if ${MK_AT} == no +OLD_FILES+=etc/pam.d/atrun OLD_FILES+=usr/bin/at OLD_FILES+=usr/bin/atq OLD_FILES+=usr/bin/atrm From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 10:37:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5C9410C; Wed, 11 Feb 2015 10:37:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0ADCB59; Wed, 11 Feb 2015 10:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BAbuFF008696; Wed, 11 Feb 2015 10:37:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BAbuCk008694; Wed, 11 Feb 2015 10:37:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201502111037.t1BAbuCk008694@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 11 Feb 2015 10:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278577 - in head/sys: arm/xscale/ixp425 dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 10:37:57 -0000 Author: andrew Date: Wed Feb 11 10:37:55 2015 New Revision: 278577 URL: https://svnweb.freebsd.org/changeset/base/278577 Log: The cpu_id macro was renamed in r278529, catch up with this new name. Modified: head/sys/arm/xscale/ixp425/if_npe.c head/sys/dev/hwpmc/hwpmc_armv7.c Modified: head/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- head/sys/arm/xscale/ixp425/if_npe.c Wed Feb 11 09:21:36 2015 (r278576) +++ head/sys/arm/xscale/ixp425/if_npe.c Wed Feb 11 10:37:55 2015 (r278577) @@ -285,7 +285,7 @@ unit2npeid(int unit) }; /* XXX check feature register instead */ return (unit < 3 ? npeidmap[ - (cpu_id() & CPU_ID_CPU_MASK) == CPU_ID_IXP435][unit] : -1); + (cpu_ident() & CPU_ID_CPU_MASK) == CPU_ID_IXP435][unit] : -1); } static int Modified: head/sys/dev/hwpmc/hwpmc_armv7.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_armv7.c Wed Feb 11 09:21:36 2015 (r278576) +++ head/sys/dev/hwpmc/hwpmc_armv7.c Wed Feb 11 10:37:55 2015 (r278577) @@ -555,7 +555,7 @@ armv7_pcpu_init(struct pmc_mdep *md, int armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC, M_WAITOK|M_ZERO); - cpuid = cpu_id(); + cpuid = cpu_ident(); pac->cortex_ver = (cpuid >> CPU_ID_CORTEX_VER_SHIFT) & \ CPU_ID_CORTEX_VER_MASK; From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 10:40:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C072E6; Wed, 11 Feb 2015 10:40:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AE43BC5; Wed, 11 Feb 2015 10:40:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BAeo2f011470; Wed, 11 Feb 2015 10:40:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BAeobY011469; Wed, 11 Feb 2015 10:40:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201502111040.t1BAeobY011469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 11 Feb 2015 10:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278578 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 10:40:51 -0000 Author: andrew Date: Wed Feb 11 10:40:49 2015 New Revision: 278578 URL: https://svnweb.freebsd.org/changeset/base/278578 Log: Remove the non-EABI code from the DDB stack unwinder, we only support the ARM EABI now. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Wed Feb 11 10:37:55 2015 (r278577) +++ head/sys/arm/arm/db_trace.c Wed Feb 11 10:40:49 2015 (r278578) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __ARM_EABI__ /* * Definitions for the instruction interpreter. * @@ -453,131 +452,6 @@ db_stack_trace_cmd(struct unwind_state * } } } -#endif - -/* - * APCS stack frames are awkward beasts, so I don't think even trying to use - * a structure to represent them is a good idea. - * - * Here's the diagram from the APCS. Increasing address is _up_ the page. - * - * save code pointer [fp] <- fp points to here - * return link value [fp, #-4] - * return sp value [fp, #-8] - * return fp value [fp, #-12] - * [saved v7 value] - * [saved v6 value] - * [saved v5 value] - * [saved v4 value] - * [saved v3 value] - * [saved v2 value] - * [saved v1 value] - * [saved a4 value] - * [saved a3 value] - * [saved a2 value] - * [saved a1 value] - * - * The save code pointer points twelve bytes beyond the start of the - * code sequence (usually a single STM) that created the stack frame. - * We have to disassemble it if we want to know which of the optional - * fields are actually present. - */ - -#ifndef __ARM_EABI__ /* The frame format is differend in AAPCS */ -static void -db_stack_trace_cmd(db_expr_t addr, db_expr_t count, boolean_t kernel_only) -{ - u_int32_t *frame, *lastframe; - c_db_sym_t sym; - const char *name; - db_expr_t value; - db_expr_t offset; - int scp_offset; - - frame = (u_int32_t *)addr; - lastframe = NULL; - scp_offset = -(get_pc_str_offset() >> 2); - - while (count-- && frame != NULL && !db_pager_quit) { - db_addr_t scp; - u_int32_t savecode; - int r; - u_int32_t *rp; - const char *sep; - - /* - * In theory, the SCP isn't guaranteed to be in the function - * that generated the stack frame. We hope for the best. - */ - scp = frame[FR_SCP]; - - sym = db_search_symbol(scp, DB_STGY_ANY, &offset); - if (sym == C_DB_SYM_NULL) { - value = 0; - name = "(null)"; - } else - db_symbol_values(sym, &name, &value); - db_printf("%s() at ", name); - db_printsym(scp, DB_STGY_PROC); - db_printf("\n"); -#ifdef __PROG26 - db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV] & R15_PC); - db_printsym(frame[FR_RLV] & R15_PC, DB_STGY_PROC); - db_printf(")\n"); -#else - db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV]); - db_printsym(frame[FR_RLV], DB_STGY_PROC); - db_printf(")\n"); -#endif - db_printf("\trsp=0x%08x rfp=0x%08x", frame[FR_RSP], frame[FR_RFP]); - - savecode = ((u_int32_t *)scp)[scp_offset]; - if ((savecode & 0x0e100000) == 0x08000000) { - /* Looks like an STM */ - rp = frame - 4; - sep = "\n\t"; - for (r = 10; r >= 0; r--) { - if (savecode & (1 << r)) { - db_printf("%sr%d=0x%08x", - sep, r, *rp--); - sep = (frame - rp) % 4 == 2 ? - "\n\t" : " "; - } - } - } - - db_printf("\n"); - - /* - * Switch to next frame up - */ - if (frame[FR_RFP] == 0) - break; /* Top of stack */ - - lastframe = frame; - frame = (u_int32_t *)(frame[FR_RFP]); - - if (INKERNEL((int)frame)) { - /* staying in kernel */ - if (frame <= lastframe) { - db_printf("Bad frame pointer: %p\n", frame); - break; - } - } else if (INKERNEL((int)lastframe)) { - /* switch from user to kernel */ - if (kernel_only) - break; /* kernel stack only */ - } else { - /* in user */ - if (frame <= lastframe) { - db_printf("Bad user frame pointer: %p\n", - frame); - break; - } - } - } -} -#endif /* XXX stubs */ void @@ -600,24 +474,18 @@ db_md_set_watchpoint(db_expr_t addr, db_ int db_trace_thread(struct thread *thr, int count) { -#ifdef __ARM_EABI__ struct unwind_state state; -#endif struct pcb *ctx; if (thr != curthread) { ctx = kdb_thr_ctx(thr); -#ifdef __ARM_EABI__ state.registers[FP] = ctx->pcb_regs.sf_r11; state.registers[SP] = ctx->pcb_regs.sf_sp; state.registers[LR] = ctx->pcb_regs.sf_lr; state.registers[PC] = ctx->pcb_regs.sf_pc; db_stack_trace_cmd(&state); -#else - db_stack_trace_cmd(ctx->pcb_regs.sf_r11, -1, TRUE); -#endif } else db_trace_self(); return (0); @@ -626,7 +494,6 @@ db_trace_thread(struct thread *thr, int void db_trace_self(void) { -#ifdef __ARM_EABI__ struct unwind_state state; uint32_t sp; @@ -639,10 +506,4 @@ db_trace_self(void) state.registers[PC] = (uint32_t)db_trace_self; db_stack_trace_cmd(&state); -#else - db_addr_t addr; - - addr = (db_addr_t)__builtin_frame_address(0); - db_stack_trace_cmd(addr, -1, FALSE); -#endif } From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 12:08:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D3E1586; Wed, 11 Feb 2015 12:08:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382896C8; Wed, 11 Feb 2015 12:08:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BC8fKS052056; Wed, 11 Feb 2015 12:08:41 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BC8fIm052055; Wed, 11 Feb 2015 12:08:41 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201502111208.t1BC8fIm052055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 11 Feb 2015 12:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278579 - head/sys/boot/arm/ixp425/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 12:08:41 -0000 Author: gnn Date: Wed Feb 11 12:08:40 2015 New Revision: 278579 URL: https://svnweb.freebsd.org/changeset/base/278579 Log: Summary: Update CPU identification call to recent version. Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c ============================================================================== --- head/sys/boot/arm/ixp425/boot2/ixp425_board.c Wed Feb 11 10:40:49 2015 (r278578) +++ head/sys/boot/arm/ixp425/boot2/ixp425_board.c Wed Feb 11 12:08:40 2015 (r278579) @@ -74,7 +74,7 @@ board_init(void) { struct board_config **pbp; - cputype = cpu_id() & CPU_ID_CPU_MASK; + cputype = cpu_ident() & CPU_ID_CPU_MASK; SET_FOREACH(pbp, boards) /* XXX pass down redboot board type */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 14:59:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E1E74A9; Wed, 11 Feb 2015 14:59:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5925CBB7; Wed, 11 Feb 2015 14:59:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BExaKG042542; Wed, 11 Feb 2015 14:59:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BExZHk042540; Wed, 11 Feb 2015 14:59:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502111459.t1BExZHk042540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Feb 2015 14:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278580 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 14:59:36 -0000 Author: emaste Date: Wed Feb 11 14:59:35 2015 New Revision: 278580 URL: https://svnweb.freebsd.org/changeset/base/278580 Log: libdwarf: Add aarch64 relocation support Reviewed by: andrew, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1817 Modified: head/contrib/elftoolchain/libdwarf/libdwarf.h head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Modified: head/contrib/elftoolchain/libdwarf/libdwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Feb 11 12:08:40 2015 (r278579) +++ head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Feb 11 14:59:35 2015 (r278580) @@ -439,6 +439,7 @@ enum Dwarf_ISA { DW_ISA_SPARC, DW_ISA_X86, DW_ISA_X86_64, + DW_ISA_AARCH64, DW_ISA_MAX }; Modified: head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Wed Feb 11 12:08:40 2015 (r278579) +++ head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Wed Feb 11 14:59:35 2015 (r278580) @@ -35,6 +35,8 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, assert(dbg != NULL); switch (dbg->dbgp_isa) { + case DW_ISA_AARCH64: + return (is64 ? R_AARCH64_ABS64 : R_AARCH64_ABS32); case DW_ISA_X86: return (R_386_32); case DW_ISA_X86_64: @@ -62,6 +64,12 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, D switch (dbg->dbg_machine) { case EM_NONE: break; + case EM_AARCH64: + if (rel_type == R_AARCH64_ABS32) + return (4); + else if (rel_type == R_AARCH64_ABS64) + return (8); + break; case EM_ARM: if (rel_type == R_ARM_ABS32) return (4); From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 15:49:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F883FC9; Wed, 11 Feb 2015 15:49:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B32D13A; Wed, 11 Feb 2015 15:49:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BFnE4Z066518; Wed, 11 Feb 2015 15:49:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BFnEiC066517; Wed, 11 Feb 2015 15:49:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502111549.t1BFnEiC066517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 11 Feb 2015 15:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278582 - head/sys/boot/pc98/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 15:49:15 -0000 Author: jhb Date: Wed Feb 11 15:49:14 2015 New Revision: 278582 URL: https://svnweb.freebsd.org/changeset/base/278582 Log: MFi386: When building some of the boot loaders with clang, and DEBUG_FLAGS or CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Tested by: gjb Modified: head/sys/boot/pc98/boot2/Makefile Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Wed Feb 11 15:21:25 2015 (r278581) +++ head/sys/boot/pc98/boot2/Makefile Wed Feb 11 15:49:14 2015 (r278582) @@ -92,6 +92,7 @@ boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s + ${CC} ${ACFLAGS} -c boot2.s SRCS= boot2.c boot2.h From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 16:04:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF13D557; Wed, 11 Feb 2015 16:04:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B44DA374; Wed, 11 Feb 2015 16:04:21 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B9F3FB95B; Wed, 11 Feb 2015 11:04:20 -0500 (EST) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen Date: Wed, 11 Feb 2015 10:20:03 -0500 Message-ID: <6564436.fIAEJlraDt@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150211083200.GO42409@kib.kiev.ua> References: <20150211083200.GO42409@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 11 Feb 2015 11:04:20 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, trasz@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 16:04:22 -0000 On Wednesday, February 11, 2015 10:32:00 AM Konstantin Belousov wrote: > On Wed, Feb 11, 2015 at 12:43:39AM +0000, Rui Paulo wrote: > > On Feb 09, 2015, at 01:01 PM, Konstantin Belousov wrote: > > > > Author: kib > > Date: Mon Feb 9 21:00:56 2015 > > New Revision: 278473 > > URL: https://svnweb.freebsd.org/changeset/base/278473 > > > > Log: > > Add x2APIC support. Enable it by default if CPU is capable. The > > hw.x2apic_enable tunable allows disabling it from the loader prompt. > > > > This breaks VMware Fusion when the host CPU has x2APIC support. In > > my case, mpt(4) was unable to receive interrupts and USB was similarly > > broken. It's possible that this is a VMware bug, but you might want to > > avoid turning this on when running under the VMware hypervisor. > > Neel pointed this out to me when the patch was reviewed. > He told me that x2APIC does not work in Fusion 5.x, while it seems > to be fixed in 7.x. > https://communities.vmware.com/message/2173695?tstart=0 > > Upon further discussion with Neel and Peter, it was suggested that we > enable enable x2APIC unconditionally, which seems what is done for > Linux benchmarks. > > Is vmware 5.x is used while there is already at least version 7.x ? > I have no idea about vmware product nomenclature and lifecycle. I believe we can ask vmware what version it is when we notice we are running under it (which we already detect for TSC purposes). We could quirk for that case, or even just disable for VM_GUEST_VMWARE for now. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 16:10:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47D5DAEF; Wed, 11 Feb 2015 16:10:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A92E62B; Wed, 11 Feb 2015 16:10:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BGAX4C076189; Wed, 11 Feb 2015 16:10:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BGAW47076185; Wed, 11 Feb 2015 16:10:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502111610.t1BGAW47076185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 11 Feb 2015 16:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278584 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 16:10:33 -0000 Author: mav Date: Wed Feb 11 16:10:31 2015 New Revision: 278584 URL: https://svnweb.freebsd.org/changeset/base/278584 Log: Add support for General Statistics and Performance log page. CTL already collects most of statistics reported there, so why not. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_private.h head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Feb 11 16:07:28 2015 (r278583) +++ head/sys/cam/ctl/ctl.c Wed Feb 11 16:10:31 2015 (r278584) @@ -4483,6 +4483,8 @@ ctl_init_log_page_index(struct ctl_lun * lun->log_pages.index[1].page_len = k * 2; lun->log_pages.index[2].page_data = &lun->log_pages.lbp_page[0]; lun->log_pages.index[2].page_len = 12*CTL_NUM_LBP_PARAMS; + lun->log_pages.index[3].page_data = (uint8_t *)&lun->log_pages.stat_page; + lun->log_pages.index[3].page_len = sizeof(lun->log_pages.stat_page); return (CTL_RETVAL_COMPLETE); } @@ -4720,6 +4722,9 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft lun->serseq = CTL_LUN_SERSEQ_OFF; lun->ctl_softc = ctl_softc; +#ifdef CTL_TIME_IO + lun->last_busy = getsbinuptime(); +#endif TAILQ_INIT(&lun->ooa_queue); TAILQ_INIT(&lun->blocked_queue); STAILQ_INIT(&lun->error_list); @@ -7085,6 +7090,67 @@ ctl_lbp_log_sense_handler(struct ctl_scs } int +ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, + int pc) +{ + struct ctl_lun *lun; + struct stat_page *data; + uint64_t rn, wn, rb, wb; + struct bintime rt, wt; + int i; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + data = (struct stat_page *)page_index->page_data; + + scsi_ulto2b(SLP_SAP, data->sap.hdr.param_code); + data->sap.hdr.param_control = SLP_LBIN; + data->sap.hdr.param_len = sizeof(struct scsi_log_stat_and_perf) - + sizeof(struct scsi_log_param_header); + rn = wn = rb = wb = 0; + bintime_clear(&rt); + bintime_clear(&wt); + for (i = 0; i < CTL_MAX_PORTS; i++) { + rn += lun->stats.ports[i].operations[CTL_STATS_READ]; + wn += lun->stats.ports[i].operations[CTL_STATS_WRITE]; + rb += lun->stats.ports[i].bytes[CTL_STATS_READ]; + wb += lun->stats.ports[i].bytes[CTL_STATS_WRITE]; + bintime_add(&rt, &lun->stats.ports[i].time[CTL_STATS_READ]); + bintime_add(&wt, &lun->stats.ports[i].time[CTL_STATS_WRITE]); + } + scsi_u64to8b(rn, data->sap.read_num); + scsi_u64to8b(wn, data->sap.write_num); + if (lun->stats.blocksize > 0) { + scsi_u64to8b(wb / lun->stats.blocksize, + data->sap.recvieved_lba); + scsi_u64to8b(rb / lun->stats.blocksize, + data->sap.transmitted_lba); + } + scsi_u64to8b((uint64_t)rt.sec * 1000 + rt.frac / (UINT64_MAX / 1000), + data->sap.read_int); + scsi_u64to8b((uint64_t)wt.sec * 1000 + wt.frac / (UINT64_MAX / 1000), + data->sap.write_int); + scsi_u64to8b(0, data->sap.weighted_num); + scsi_u64to8b(0, data->sap.weighted_int); + scsi_ulto2b(SLP_IT, data->it.hdr.param_code); + data->it.hdr.param_control = SLP_LBIN; + data->it.hdr.param_len = sizeof(struct scsi_log_idle_time) - + sizeof(struct scsi_log_param_header); +#ifdef CTL_TIME_IO + scsi_u64to8b(lun->idle_time / SBT_1MS, data->it.idle_int); +#endif + scsi_ulto2b(SLP_TI, data->ti.hdr.param_code); + data->it.hdr.param_control = SLP_LBIN; + data->ti.hdr.param_len = sizeof(struct scsi_log_time_interval) - + sizeof(struct scsi_log_param_header); + scsi_ulto4b(3, data->ti.exponent); + scsi_ulto4b(1, data->ti.integer); + + page_index->page_len = sizeof(*data); + return (0); +} + +int ctl_log_sense(struct ctl_scsiio *ctsio) { struct ctl_lun *lun; @@ -11689,6 +11755,12 @@ ctl_scsiio_precheck(struct ctl_softc *so * Every I/O goes into the OOA queue for a * particular LUN, and stays there until completion. */ +#ifdef CTL_TIME_IO + if (TAILQ_EMPTY(&lun->ooa_queue)) { + lun->idle_time += getsbinuptime() - + lun->last_busy; + } +#endif TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); } @@ -13735,6 +13807,10 @@ ctl_process_done(union ctl_io *io) * Remove this from the OOA queue. */ TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); +#ifdef CTL_TIME_IO + if (TAILQ_EMPTY(&lun->ooa_queue)) + lun->last_busy = getsbinuptime(); +#endif /* * Run through the blocked queue on this LUN and see if anything Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Wed Feb 11 16:07:28 2015 (r278583) +++ head/sys/cam/ctl/ctl.h Wed Feb 11 16:10:31 2015 (r278584) @@ -181,6 +181,9 @@ int ctl_debugconf_sp_select_handler(stru int ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc); +int ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, + int pc); int ctl_config_move_done(union ctl_io *io); void ctl_datamove(union ctl_io *io); void ctl_done(union ctl_io *io); Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Wed Feb 11 16:07:28 2015 (r278583) +++ head/sys/cam/ctl/ctl_private.h Wed Feb 11 16:10:31 2015 (r278584) @@ -342,6 +342,8 @@ static const struct ctl_page_index log_p CTL_PAGE_FLAG_NONE, NULL, NULL}, {SLS_LOGICAL_BLOCK_PROVISIONING, 0, 0, NULL, CTL_PAGE_FLAG_NONE, ctl_lbp_log_sense_handler, NULL}, + {SLS_STAT_AND_PERF, 0, 0, NULL, + CTL_PAGE_FLAG_NONE, ctl_sap_log_sense_handler, NULL}, }; #define CTL_NUM_LOG_PAGES sizeof(log_page_index_template)/ \ @@ -351,6 +353,11 @@ struct ctl_log_pages { uint8_t pages_page[CTL_NUM_LOG_PAGES]; uint8_t subpages_page[CTL_NUM_LOG_PAGES * 2]; uint8_t lbp_page[12*CTL_NUM_LBP_PARAMS]; + struct stat_page { + struct scsi_log_stat_and_perf sap; + struct scsi_log_idle_time it; + struct scsi_log_time_interval ti; + } stat_page; struct ctl_page_index index[CTL_NUM_LOG_PAGES]; }; @@ -403,6 +410,10 @@ struct ctl_lun { struct ctl_lun_delay_info delay_info; int sync_interval; int sync_count; +#ifdef CTL_TIME_IO + sbintime_t idle_time; + sbintime_t last_busy; +#endif TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Wed Feb 11 16:07:28 2015 (r278583) +++ head/sys/cam/scsi/scsi_all.h Wed Feb 11 16:10:31 2015 (r278584) @@ -561,6 +561,7 @@ struct scsi_log_sense #define SLS_ERROR_LASTN_PAGE 0x07 #define SLS_LOGICAL_BLOCK_PROVISIONING 0x0c #define SLS_SELF_TEST_PAGE 0x10 +#define SLS_STAT_AND_PERF 0x19 #define SLS_IE_PAGE 0x2f #define SLS_PAGE_CTRL_MASK 0xC0 #define SLS_PAGE_CTRL_THRESHOLD 0x00 @@ -619,6 +620,45 @@ struct scsi_log_param_header { u_int8_t param_len; }; +struct scsi_log_stat_and_perf { + struct scsi_log_param_header hdr; +#define SLP_SAP 0x0001 + uint8_t read_num[8]; + uint8_t write_num[8]; + uint8_t recvieved_lba[8]; + uint8_t transmitted_lba[8]; + uint8_t read_int[8]; + uint8_t write_int[8]; + uint8_t weighted_num[8]; + uint8_t weighted_int[8]; +}; + +struct scsi_log_idle_time { + struct scsi_log_param_header hdr; +#define SLP_IT 0x0002 + uint8_t idle_int[8]; +}; + +struct scsi_log_time_interval { + struct scsi_log_param_header hdr; +#define SLP_TI 0x0003 + uint8_t exponent[4]; + uint8_t integer[4]; +}; + +struct scsi_log_fua_stat_and_perf { + struct scsi_log_param_header hdr; +#define SLP_FUA_SAP 0x0004 + uint8_t fua_read_num[8]; + uint8_t fua_write_num[8]; + uint8_t fuanv_read_num[8]; + uint8_t fuanv_write_num[8]; + uint8_t fua_read_int[8]; + uint8_t fua_write_int[8]; + uint8_t fuanv_read_int[8]; + uint8_t fuanv_write_int[8]; +}; + struct scsi_control_page { u_int8_t page_code; u_int8_t page_length; From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 16:45:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B18B68D; Wed, 11 Feb 2015 16:45:51 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6A67A48; Wed, 11 Feb 2015 16:45:50 +0000 (UTC) Received: by ierx19 with SMTP id x19so5342208ier.3; Wed, 11 Feb 2015 08:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=CuvBCI/glPLH9iCpKw+3WZ9EFrlbOluecMZKdVMtxjM=; b=Iv+qJXh5y34Fk0FaR+xp6O7Kde//3neDX1gUfY7Kp40qfEPzj+ouTgKvDhjnUq0zpw luYY7rRW2VQ/BFq577jERD/s4yjbzwC4hdDt2IzCSI+CpKDfxgIwUgKsg8UpgeZCBT+C orS6l1Fb6MTZiE7AnK2KR5k1sS0K0iDWyDhK6eCEo2N1CQiZ1HBBSe11OfgVkU/r9IAj KAconJz/kva1XkQJrt0or8Pb1CO6cHzyWSZ0iCxSHG4VmwXSUyl+Z9YdmuV8IkVgzVRA dlRlHQUOjwa9N2m6aWR8esHRqVcwatSGv5lVOkcsIt1ZdW0fuASlwXZx1VC4gmVehwz5 HLlA== X-Received: by 10.43.92.9 with SMTP id bo9mr4076078icc.54.1423673144112; Wed, 11 Feb 2015 08:45:44 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.98.228 with HTTP; Wed, 11 Feb 2015 08:45:13 -0800 (PST) In-Reply-To: <6564436.fIAEJlraDt@ralph.baldwin.cx> References: <20150211083200.GO42409@kib.kiev.ua> <6564436.fIAEJlraDt@ralph.baldwin.cx> From: Bryan Venteicher Date: Wed, 11 Feb 2015 10:45:13 -0600 X-Google-Sender-Auth: N0XN6cR8p9rErrOlUw67bChIQUA Message-ID: Subject: Re: svn commit: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , Rui Paulo , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 16:45:51 -0000 On Wed, Feb 11, 2015 at 9:20 AM, John Baldwin wrote: > On Wednesday, February 11, 2015 10:32:00 AM Konstantin Belousov wrote: > > On Wed, Feb 11, 2015 at 12:43:39AM +0000, Rui Paulo wrote: > > > On Feb 09, 2015, at 01:01 PM, Konstantin Belousov > wrote: > > > > > > Author: kib > > > Date: Mon Feb 9 21:00:56 2015 > > > New Revision: 278473 > > > URL: https://svnweb.freebsd.org/changeset/base/278473 > > > > > > Log: > > > Add x2APIC support. Enable it by default if CPU is capable. The > > > hw.x2apic_enable tunable allows disabling it from the loader prompt. > > > > > > This breaks VMware Fusion when the host CPU has x2APIC support. In > > > my case, mpt(4) was unable to receive interrupts and USB was similarly > > > broken. It's possible that this is a VMware bug, but you might want to > > > avoid turning this on when running under the VMware hypervisor. > > > > Neel pointed this out to me when the patch was reviewed. > > He told me that x2APIC does not work in Fusion 5.x, while it seems > > to be fixed in 7.x. > > https://communities.vmware.com/message/2173695?tstart=0 > > > > Upon further discussion with Neel and Peter, it was suggested that we > > enable enable x2APIC unconditionally, which seems what is done for > > Linux benchmarks. > > > > Is vmware 5.x is used while there is already at least version 7.x ? > > I have no idea about vmware product nomenclature and lifecycle. > > I believe we can ask vmware what version it is when we notice we are > running > under it (which we already detect for TSC purposes). We could quirk for > that > case, or even just disable for VM_GUEST_VMWARE for now. > > I'm not too familiar with this stuff, but is this Linux commit [1] relevant? If so, it might be something nice to wrap into my projects/paravirt branch (I've been extremely busy recently, but I hope to get the review comments addressed and merge it into HEAD soon). [1] - https://lkml.org/lkml/2013/1/17/552 -- > John Baldwin > > From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 16:54:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EC23BC8; Wed, 11 Feb 2015 16:54:49 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC796B50; Wed, 11 Feb 2015 16:54:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1BGsg0u020673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Feb 2015 18:54:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1BGsg0u020673 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1BGsgWU020672; Wed, 11 Feb 2015 18:54:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 11 Feb 2015 18:54:42 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen Message-ID: <20150211165442.GT42409@kib.kiev.ua> References: <20150211083200.GO42409@kib.kiev.ua> <6564436.fIAEJlraDt@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6564436.fIAEJlraDt@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, trasz@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 16:54:49 -0000 On Wed, Feb 11, 2015 at 10:20:03AM -0500, John Baldwin wrote: > On Wednesday, February 11, 2015 10:32:00 AM Konstantin Belousov wrote: > > On Wed, Feb 11, 2015 at 12:43:39AM +0000, Rui Paulo wrote: > > > On Feb 09, 2015, at 01:01 PM, Konstantin Belousov wrote: > > > > > > Author: kib > > > Date: Mon Feb 9 21:00:56 2015 > > > New Revision: 278473 > > > URL: https://svnweb.freebsd.org/changeset/base/278473 > > > > > > Log: > > > Add x2APIC support. Enable it by default if CPU is capable. The > > > hw.x2apic_enable tunable allows disabling it from the loader prompt. > > > > > > This breaks VMware Fusion when the host CPU has x2APIC support. In > > > my case, mpt(4) was unable to receive interrupts and USB was similarly > > > broken. It's possible that this is a VMware bug, but you might want to > > > avoid turning this on when running under the VMware hypervisor. > > > > Neel pointed this out to me when the patch was reviewed. > > He told me that x2APIC does not work in Fusion 5.x, while it seems > > to be fixed in 7.x. > > https://communities.vmware.com/message/2173695?tstart=0 > > > > Upon further discussion with Neel and Peter, it was suggested that we > > enable enable x2APIC unconditionally, which seems what is done for > > Linux benchmarks. > > > > Is vmware 5.x is used while there is already at least version 7.x ? > > I have no idea about vmware product nomenclature and lifecycle. > > I believe we can ask vmware what version it is when we notice we are running > under it (which we already detect for TSC purposes). We could quirk for that > case, or even just disable for VM_GUEST_VMWARE for now. > Ok, https://lkml.org/lkml/2013/1/17/552 Patch is below. Please, users of VMWare, test it. diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index f20b735..c3df686 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -130,6 +132,7 @@ madt_setup_local(void) { ACPI_TABLE_DMAR *dmartbl; vm_paddr_t dmartbl_physaddr; + u_int p[4]; madt = pmap_mapbios(madt_physaddr, madt_length); if ((cpu_feature2 & CPUID2_X2APIC) != 0) { @@ -146,6 +149,16 @@ madt_setup_local(void) } acpi_unmap_table(dmartbl); } + if (vm_guest == VM_GUEST_VMWARE) { + vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p); + if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 || + (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) { + x2apic_mode = 0; + if (bootverbose) + printf( + "x2APIC available but disabled inside VMWare without intr redirection\n"); + } + } TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); } diff --git a/sys/x86/include/vmware.h b/sys/x86/include/vmware.h index c72f48d..d3d7e2d 100644 --- a/sys/x86/include/vmware.h +++ b/sys/x86/include/vmware.h @@ -31,8 +31,13 @@ #define VMW_HVMAGIC 0x564d5868 #define VMW_HVPORT 0x5658 + #define VMW_HVCMD_GETVERSION 10 #define VMW_HVCMD_GETHZ 45 +#define VMW_HVCMD_GETVCPU_INFO 68 + +#define VMW_VCPUINFO_LEGACY_X2APIC (1 << 3) +#define VMW_VCPUINFO_VCPU_RESERVED (1 << 31) static __inline void vmware_hvcall(u_int cmd, u_int *p) From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 17:00:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E72C5E49; Wed, 11 Feb 2015 17:00:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D278BBD8; Wed, 11 Feb 2015 17:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BH0XvA099665; Wed, 11 Feb 2015 17:00:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BH0XPL099664; Wed, 11 Feb 2015 17:00:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502111700.t1BH0XPL099664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 11 Feb 2015 17:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278585 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:00:34 -0000 Author: trasz Date: Wed Feb 11 17:00:32 2015 New Revision: 278585 URL: https://svnweb.freebsd.org/changeset/base/278585 Log: Fix formatting. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Wed Feb 11 16:10:31 2015 (r278584) +++ head/usr.sbin/ctld/ctl.conf.5 Wed Feb 11 17:00:32 2015 (r278585) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2015 +.Dd February 11, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -228,7 +228,7 @@ An IPv4 or IPv6 address and port to list .\".It Ic listen-iser Ar address .\"An IPv4 or IPv6 address and port to listen on for incoming connections .\"using iSER (iSCSI over RDMA) protocol. -.It Ic redirect Aq Ar address +.It Ic redirect Ar address IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to portal belonging to this @@ -326,7 +326,7 @@ If second argument is not specified, tar Assign specified CTL port (such as "isp0") to the target. On startup ctld configures LUN mapping and enables all assigned ports. Each port can be assigned to only one target. -.It Ic redirect Aq Ar address +.It Ic redirect Ar address IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to this target will get redirected using "Target moved temporarily" login response. From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 17:25:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA09658C; Wed, 11 Feb 2015 17:25:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C55E4E8B; Wed, 11 Feb 2015 17:25:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BHPNeT013008; Wed, 11 Feb 2015 17:25:23 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BHPNm1013007; Wed, 11 Feb 2015 17:25:23 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201502111725.t1BHPNm1013007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 11 Feb 2015 17:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278586 - head/contrib/binutils/ld/scripttempl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:25:24 -0000 Author: tijl Date: Wed Feb 11 17:25:23 2015 New Revision: 278586 URL: https://svnweb.freebsd.org/changeset/base/278586 Log: Fix ldscripts such that ld(1) collects the .fini_array section in the same order as the .init_array section. Finalisation routines need to be called in the opposite order as their corresponding initialisation routines but rtld(1) handles that by calling the function pointers in .fini_array in reverse order. Reviewed by: kib MFC after: 2 weeks Modified: head/contrib/binutils/ld/scripttempl/elf.sc Modified: head/contrib/binutils/ld/scripttempl/elf.sc ============================================================================== --- head/contrib/binutils/ld/scripttempl/elf.sc Wed Feb 11 17:00:32 2015 (r278585) +++ head/contrib/binutils/ld/scripttempl/elf.sc Wed Feb 11 17:25:23 2015 (r278586) @@ -402,8 +402,8 @@ cat < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41476E1; Wed, 11 Feb 2015 17:27:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1E3E9E; Wed, 11 Feb 2015 17:27:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BHRcju013298; Wed, 11 Feb 2015 17:27:38 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BHRcGX013297; Wed, 11 Feb 2015 17:27:38 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201502111727.t1BHRcGX013297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 11 Feb 2015 17:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278587 - head/sys/cddl/dev/fbt/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:27:38 -0000 Author: gnn Date: Wed Feb 11 17:27:37 2015 New Revision: 278587 URL: https://svnweb.freebsd.org/changeset/base/278587 Log: Clean up machine dependent code for DTrace on ARM. Submitted by: markj Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Wed Feb 11 17:25:23 2015 (r278586) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Wed Feb 11 17:27:37 2015 (r278587) @@ -33,114 +33,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -static MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); +#include "fbt.h" -#define FBT_PATCHVAL 0xe06a0cfe // illegal instruction +#define FBT_PATCHVAL 0xe06a0cfe /* illegal instruction */ -#define FBT_PUSHM 0xe92d0000 -#define FBT_POPM 0xe8bd0000 -#define FBT_JUMP 0xea000000 - -static d_open_t fbt_open; -static int fbt_unload(void); -static void fbt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); -static void fbt_provide_module(void *, modctl_t *); -static void fbt_destroy(void *, dtrace_id_t, void *); -static void fbt_enable(void *, dtrace_id_t, void *); -static void fbt_disable(void *, dtrace_id_t, void *); -static void fbt_load(void *); -static void fbt_suspend(void *, dtrace_id_t, void *); -static void fbt_resume(void *, dtrace_id_t, void *); +#define FBT_PUSHM 0xe92d0000 +#define FBT_POPM 0xe8bd0000 +#define FBT_JUMP 0xea000000 #define FBT_ENTRY "entry" #define FBT_RETURN "return" -#define FBT_ADDR2NDX(addr) ((((uintptr_t)(addr)) >> 4) & fbt_probetab_mask) -#define FBT_PROBETAB_SIZE 0x8000 /* 32k entries -- 128K total */ -static struct cdevsw fbt_cdevsw = { - .d_version = D_VERSION, - .d_open = fbt_open, - .d_name = "fbt", -}; - -static dtrace_pattr_t fbt_attr = { -{ DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, -{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, -{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, -{ DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, -{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, -}; - -static dtrace_pops_t fbt_pops = { - NULL, - fbt_provide_module, - fbt_enable, - fbt_disable, - fbt_suspend, - fbt_resume, - fbt_getargdesc, - NULL, - NULL, - fbt_destroy -}; - -typedef struct fbt_probe { - struct fbt_probe *fbtp_hashnext; - uint32_t *fbtp_patchpoint; - int8_t fbtp_rval; - uint32_t fbtp_patchval; - uint32_t fbtp_savedval; - uintptr_t fbtp_roffset; - dtrace_id_t fbtp_id; - const char *fbtp_name; - modctl_t *fbtp_ctl; - int fbtp_loadcnt; - int fbtp_primary; - int fbtp_invop_cnt; - int fbtp_symindx; - struct fbt_probe *fbtp_next; -} fbt_probe_t; - -static struct cdev *fbt_cdev; -static dtrace_provider_id_t fbt_id; -static fbt_probe_t **fbt_probetab; -static int fbt_probetab_size; -static int fbt_probetab_mask; -static int fbt_verbose = 0; - -static int +int fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) { struct trapframe *frame = (struct trapframe *)stack; @@ -152,9 +59,10 @@ fbt_invop(uintptr_t addr, uintptr_t *sta fbt->fbtp_invop_cnt++; cpu->cpu_dtrace_caller = addr; + /* TODO: Need 5th parameter from stack */ dtrace_probe(fbt->fbtp_id, frame->tf_r0, frame->tf_r1, frame->tf_r2, - frame->tf_r3, 0); // TODO: Need 5th parameter from stack + frame->tf_r3, 0); cpu->cpu_dtrace_caller = 0; @@ -165,15 +73,23 @@ fbt_invop(uintptr_t addr, uintptr_t *sta return (0); } -static int +void +fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val) +{ + + *fbt->fbtp_patchpoint = val; + cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); +} + +int fbt_provide_module_function(linker_file_t lf, int symindx, linker_symval_t *symval, void *opaque) { char *modname = opaque; const char *name = symval->name; fbt_probe_t *fbt, *retfbt; + uint32_t *instr, *limit; int popm; - u_int32_t *instr, *limit; if (strncmp(name, "dtrace_", 7) == 0 && strncmp(name, "dtrace_safe_", 12) != 0) { @@ -189,11 +105,12 @@ fbt_provide_module_function(linker_file_ if (name[0] == '_' && name[1] == '_') return (0); - instr = (u_int32_t *) symval->value; - limit = (u_int32_t *)(symval->value + symval->size); + instr = (uint32_t *)symval->value; + limit = (uint32_t *)(symval->value + symval->size); for (; instr < limit; instr++) - if ((*instr & 0xffff0000) == FBT_PUSHM && (*instr & 0x4000) != 0) + if ((*instr & 0xffff0000) == FBT_PUSHM && + (*instr & 0x4000) != 0) break; if (instr >= limit) @@ -218,25 +135,23 @@ fbt_provide_module_function(linker_file_ popm = FBT_POPM | ((*instr) & 0x3FFF) | 0x8000; - retfbt = NULL; -again: - for(; instr < limit; instr++) - { - if (*instr == popm) +again: + for (; instr < limit; instr++) { + if (*instr == popm) break; - else if ((*instr & 0xff000000) == FBT_JUMP) - { + else if ((*instr & 0xff000000) == FBT_JUMP) { + uint32_t *target, *start; int offset; - u_int32_t *target, *start; + offset = (*instr & 0xffffff); offset <<= 8; offset /= 64; target = instr + (2 + offset); - start = (u_int32_t *) symval->value; + start = (uint32_t *)symval->value; if (target >= limit || target < start) break; - instr++; //skip delay slot + instr++; /* skip delay slot */ } } @@ -263,7 +178,7 @@ again: fbt->fbtp_symindx = symindx; if ((*instr & 0xff000000) == FBT_JUMP) fbt->fbtp_rval = DTRACE_INVOP_B; - else + else fbt->fbtp_rval = DTRACE_INVOP_POPM; fbt->fbtp_savedval = *instr; fbt->fbtp_patchval = FBT_PATCHVAL; @@ -275,1029 +190,3 @@ again: instr++; goto again; } - -static void -fbt_provide_module(void *arg, modctl_t *lf) -{ - char modname[MAXPATHLEN]; - int i; - size_t len; - - strlcpy(modname, lf->filename, sizeof(modname)); - len = strlen(modname); - if (len > 3 && strcmp(modname + len - 3, ".ko") == 0) - modname[len - 3] = '\0'; - - /* - * Employees of dtrace and their families are ineligible. Void - * where prohibited. - */ - if (strcmp(modname, "dtrace") == 0) - return; - - /* - * The cyclic timer subsystem can be built as a module and DTrace - * depends on that, so it is ineligible too. - */ - if (strcmp(modname, "cyclic") == 0) - return; - - /* - * To register with DTrace, a module must list 'dtrace' as a - * dependency in order for the kernel linker to resolve - * symbols like dtrace_register(). All modules with such a - * dependency are ineligible for FBT tracing. - */ - for (i = 0; i < lf->ndeps; i++) - if (strncmp(lf->deps[i]->filename, "dtrace", 6) == 0) - return; - - if (lf->fbt_nentries) { - /* - * This module has some FBT entries allocated; we're afraid - * to screw with it. - */ - return; - } - - /* - * List the functions in the module and the symbol values. - */ - (void) linker_file_function_listall(lf, fbt_provide_module_function, modname); -} - -static void -fbt_destroy(void *arg, dtrace_id_t id, void *parg) -{ - fbt_probe_t *fbt = parg, *next, *hash, *last; - modctl_t *ctl; - int ndx; - - do { - ctl = fbt->fbtp_ctl; - - ctl->fbt_nentries--; - - /* - * Now we need to remove this probe from the fbt_probetab. - */ - ndx = FBT_ADDR2NDX(fbt->fbtp_patchpoint); - last = NULL; - hash = fbt_probetab[ndx]; - - while (hash != fbt) { - ASSERT(hash != NULL); - last = hash; - hash = hash->fbtp_hashnext; - } - - if (last != NULL) { - last->fbtp_hashnext = fbt->fbtp_hashnext; - } else { - fbt_probetab[ndx] = fbt->fbtp_hashnext; - } - - next = fbt->fbtp_next; - free(fbt, M_FBT); - - fbt = next; - } while (fbt != NULL); -} - -static void -fbt_enable(void *arg, dtrace_id_t id, void *parg) -{ - fbt_probe_t *fbt = parg; - modctl_t *ctl = fbt->fbtp_ctl; - - ctl->nenabled++; - - /* - * Now check that our modctl has the expected load count. If it - * doesn't, this module must have been unloaded and reloaded -- and - * we're not going to touch it. - */ - if (ctl->loadcnt != fbt->fbtp_loadcnt) { - if (fbt_verbose) { - printf("fbt is failing for probe %s " - "(module %s reloaded)", - fbt->fbtp_name, ctl->filename); - } - - return; - } - - for (; fbt != NULL; fbt = fbt->fbtp_next) { - *fbt->fbtp_patchpoint = fbt->fbtp_patchval; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); - } -} - -static void -fbt_disable(void *arg, dtrace_id_t id, void *parg) -{ - fbt_probe_t *fbt = parg; - modctl_t *ctl = fbt->fbtp_ctl; - - ASSERT(ctl->nenabled > 0); - ctl->nenabled--; - - if ((ctl->loadcnt != fbt->fbtp_loadcnt)) - return; - - for (; fbt != NULL; fbt = fbt->fbtp_next) { - *fbt->fbtp_patchpoint = fbt->fbtp_savedval; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); - } -} - -static void -fbt_suspend(void *arg, dtrace_id_t id, void *parg) -{ - fbt_probe_t *fbt = parg; - modctl_t *ctl = fbt->fbtp_ctl; - - ASSERT(ctl->nenabled > 0); - - if ((ctl->loadcnt != fbt->fbtp_loadcnt)) - return; - - for (; fbt != NULL; fbt = fbt->fbtp_next) { - *fbt->fbtp_patchpoint = fbt->fbtp_savedval; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); - } -} - -static void -fbt_resume(void *arg, dtrace_id_t id, void *parg) -{ - fbt_probe_t *fbt = parg; - modctl_t *ctl = fbt->fbtp_ctl; - - ASSERT(ctl->nenabled > 0); - - if ((ctl->loadcnt != fbt->fbtp_loadcnt)) - return; - - for (; fbt != NULL; fbt = fbt->fbtp_next) { - *fbt->fbtp_patchpoint = fbt->fbtp_patchval; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); - } -} - -static int -fbt_ctfoff_init(modctl_t *lf, linker_ctf_t *lc) -{ - const Elf_Sym *symp = lc->symtab;; - const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; - const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); - int i; - uint32_t *ctfoff; - uint32_t objtoff = hp->cth_objtoff; - uint32_t funcoff = hp->cth_funcoff; - ushort_t info; - ushort_t vlen; - - /* Sanity check. */ - if (hp->cth_magic != CTF_MAGIC) { - printf("Bad magic value in CTF data of '%s'\n",lf->pathname); - return (EINVAL); - } - - if (lc->symtab == NULL) { - printf("No symbol table in '%s'\n",lf->pathname); - return (EINVAL); - } - - if ((ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK)) == NULL) - return (ENOMEM); - - *lc->ctfoffp = ctfoff; - - for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { - if (symp->st_name == 0 || symp->st_shndx == SHN_UNDEF) { - *ctfoff = 0xffffffff; - continue; - } - - switch (ELF_ST_TYPE(symp->st_info)) { - case STT_OBJECT: - if (objtoff >= hp->cth_funcoff || - (symp->st_shndx == SHN_ABS && symp->st_value == 0)) { - *ctfoff = 0xffffffff; - break; - } - - *ctfoff = objtoff; - objtoff += sizeof (ushort_t); - break; - - case STT_FUNC: - if (funcoff >= hp->cth_typeoff) { - *ctfoff = 0xffffffff; - break; - } - - *ctfoff = funcoff; - - info = *((const ushort_t *)(ctfdata + funcoff)); - vlen = CTF_INFO_VLEN(info); - - /* - * If we encounter a zero pad at the end, just skip it. - * Otherwise skip over the function and its return type - * (+2) and the argument list (vlen). - */ - if (CTF_INFO_KIND(info) == CTF_K_UNKNOWN && vlen == 0) - funcoff += sizeof (ushort_t); /* skip pad */ - else - funcoff += sizeof (ushort_t) * (vlen + 2); - break; - - default: - *ctfoff = 0xffffffff; - break; - } - } - - return (0); -} - -static ssize_t -fbt_get_ctt_size(uint8_t version, const ctf_type_t *tp, ssize_t *sizep, - ssize_t *incrementp) -{ - ssize_t size, increment; - - if (version > CTF_VERSION_1 && - tp->ctt_size == CTF_LSIZE_SENT) { - size = CTF_TYPE_LSIZE(tp); - increment = sizeof (ctf_type_t); - } else { - size = tp->ctt_size; - increment = sizeof (ctf_stype_t); - } - - if (sizep) - *sizep = size; - if (incrementp) - *incrementp = increment; - - return (size); -} - -static int -fbt_typoff_init(linker_ctf_t *lc) -{ - const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; - const ctf_type_t *tbuf; - const ctf_type_t *tend; - const ctf_type_t *tp; - const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); - int ctf_typemax = 0; - uint32_t *xp; - ulong_t pop[CTF_K_MAX + 1] = { 0 }; - - - /* Sanity check. */ - if (hp->cth_magic != CTF_MAGIC) - return (EINVAL); - - tbuf = (const ctf_type_t *) (ctfdata + hp->cth_typeoff); - tend = (const ctf_type_t *) (ctfdata + hp->cth_stroff); - - int child = hp->cth_parname != 0; - - /* - * We make two passes through the entire type section. In this first - * pass, we count the number of each type and the total number of types. - */ - for (tp = tbuf; tp < tend; ctf_typemax++) { - ushort_t kind = CTF_INFO_KIND(tp->ctt_info); - ulong_t vlen = CTF_INFO_VLEN(tp->ctt_info); - ssize_t size, increment; - - size_t vbytes; - uint_t n; - - (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); - - switch (kind) { - case CTF_K_INTEGER: - case CTF_K_FLOAT: - vbytes = sizeof (uint_t); - break; - case CTF_K_ARRAY: - vbytes = sizeof (ctf_array_t); - break; - case CTF_K_FUNCTION: - vbytes = sizeof (ushort_t) * (vlen + (vlen & 1)); - break; - case CTF_K_STRUCT: - case CTF_K_UNION: - if (size < CTF_LSTRUCT_THRESH) { - ctf_member_t *mp = (ctf_member_t *) - ((uintptr_t)tp + increment); - - vbytes = sizeof (ctf_member_t) * vlen; - for (n = vlen; n != 0; n--, mp++) - child |= CTF_TYPE_ISCHILD(mp->ctm_type); - } else { - ctf_lmember_t *lmp = (ctf_lmember_t *) - ((uintptr_t)tp + increment); - - vbytes = sizeof (ctf_lmember_t) * vlen; - for (n = vlen; n != 0; n--, lmp++) - child |= - CTF_TYPE_ISCHILD(lmp->ctlm_type); - } - break; - case CTF_K_ENUM: - vbytes = sizeof (ctf_enum_t) * vlen; - break; - case CTF_K_FORWARD: - /* - * For forward declarations, ctt_type is the CTF_K_* - * kind for the tag, so bump that population count too. - * If ctt_type is unknown, treat the tag as a struct. - */ - if (tp->ctt_type == CTF_K_UNKNOWN || - tp->ctt_type >= CTF_K_MAX) - pop[CTF_K_STRUCT]++; - else - pop[tp->ctt_type]++; - /*FALLTHRU*/ - case CTF_K_UNKNOWN: - vbytes = 0; - break; - case CTF_K_POINTER: - case CTF_K_TYPEDEF: - case CTF_K_VOLATILE: - case CTF_K_CONST: - case CTF_K_RESTRICT: - child |= CTF_TYPE_ISCHILD(tp->ctt_type); - vbytes = 0; - break; - default: - printf("%s(%d): detected invalid CTF kind -- %u\n", __func__, __LINE__, kind); - return (EIO); - } - tp = (ctf_type_t *)((uintptr_t)tp + increment + vbytes); - pop[kind]++; - } - - /* account for a sentinel value below */ - ctf_typemax++; - *lc->typlenp = ctf_typemax; - - if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) - return (ENOMEM); - - *lc->typoffp = xp; - - /* type id 0 is used as a sentinel value */ - *xp++ = 0; - - /* - * In the second pass, fill in the type offset. - */ - for (tp = tbuf; tp < tend; xp++) { - ushort_t kind = CTF_INFO_KIND(tp->ctt_info); - ulong_t vlen = CTF_INFO_VLEN(tp->ctt_info); - ssize_t size, increment; - - size_t vbytes; - uint_t n; - - (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); - - switch (kind) { - case CTF_K_INTEGER: - case CTF_K_FLOAT: - vbytes = sizeof (uint_t); - break; - case CTF_K_ARRAY: - vbytes = sizeof (ctf_array_t); - break; - case CTF_K_FUNCTION: - vbytes = sizeof (ushort_t) * (vlen + (vlen & 1)); - break; - case CTF_K_STRUCT: - case CTF_K_UNION: - if (size < CTF_LSTRUCT_THRESH) { - ctf_member_t *mp = (ctf_member_t *) - ((uintptr_t)tp + increment); - - vbytes = sizeof (ctf_member_t) * vlen; - for (n = vlen; n != 0; n--, mp++) - child |= CTF_TYPE_ISCHILD(mp->ctm_type); - } else { - ctf_lmember_t *lmp = (ctf_lmember_t *) - ((uintptr_t)tp + increment); - - vbytes = sizeof (ctf_lmember_t) * vlen; - for (n = vlen; n != 0; n--, lmp++) - child |= - CTF_TYPE_ISCHILD(lmp->ctlm_type); - } - break; - case CTF_K_ENUM: - vbytes = sizeof (ctf_enum_t) * vlen; - break; - case CTF_K_FORWARD: - case CTF_K_UNKNOWN: - vbytes = 0; - break; - case CTF_K_POINTER: - case CTF_K_TYPEDEF: - case CTF_K_VOLATILE: - case CTF_K_CONST: - case CTF_K_RESTRICT: - vbytes = 0; - break; - default: - printf("%s(%d): detected invalid CTF kind -- %u\n", __func__, __LINE__, kind); - return (EIO); - } - *xp = (uint32_t)((uintptr_t) tp - (uintptr_t) ctfdata); - tp = (ctf_type_t *)((uintptr_t)tp + increment + vbytes); - } - - return (0); -} - -/* - * CTF Declaration Stack - * - * In order to implement ctf_type_name(), we must convert a type graph back - * into a C type declaration. Unfortunately, a type graph represents a storage - * class ordering of the type whereas a type declaration must obey the C rules - * for operator precedence, and the two orderings are frequently in conflict. - * For example, consider these CTF type graphs and their C declarations: - * - * CTF_K_POINTER -> CTF_K_FUNCTION -> CTF_K_INTEGER : int (*)() - * CTF_K_POINTER -> CTF_K_ARRAY -> CTF_K_INTEGER : int (*)[] - * - * In each case, parentheses are used to raise operator * to higher lexical - * precedence, so the string form of the C declaration cannot be constructed by - * walking the type graph links and forming the string from left to right. - * - * The functions in this file build a set of stacks from the type graph nodes - * corresponding to the C operator precedence levels in the appropriate order. - * The code in ctf_type_name() can then iterate over the levels and nodes in - * lexical precedence order and construct the final C declaration string. - */ -typedef struct ctf_list { - struct ctf_list *l_prev; /* previous pointer or tail pointer */ - struct ctf_list *l_next; /* next pointer or head pointer */ -} ctf_list_t; - -#define ctf_list_prev(elem) ((void *)(((ctf_list_t *)(elem))->l_prev)) -#define ctf_list_next(elem) ((void *)(((ctf_list_t *)(elem))->l_next)) - -typedef enum { - CTF_PREC_BASE, - CTF_PREC_POINTER, - CTF_PREC_ARRAY, - CTF_PREC_FUNCTION, - CTF_PREC_MAX -} ctf_decl_prec_t; - -typedef struct ctf_decl_node { - ctf_list_t cd_list; /* linked list pointers */ - ctf_id_t cd_type; /* type identifier */ - uint_t cd_kind; /* type kind */ - uint_t cd_n; /* type dimension if array */ -} ctf_decl_node_t; - -typedef struct ctf_decl { - ctf_list_t cd_nodes[CTF_PREC_MAX]; /* declaration node stacks */ - int cd_order[CTF_PREC_MAX]; /* storage order of decls */ - ctf_decl_prec_t cd_qualp; /* qualifier precision */ - ctf_decl_prec_t cd_ordp; /* ordered precision */ - char *cd_buf; /* buffer for output */ - char *cd_ptr; /* buffer location */ - char *cd_end; /* buffer limit */ - size_t cd_len; /* buffer space required */ - int cd_err; /* saved error value */ -} ctf_decl_t; - -/* - * Simple doubly-linked list append routine. This implementation assumes that - * each list element contains an embedded ctf_list_t as the first member. - * An additional ctf_list_t is used to store the head (l_next) and tail - * (l_prev) pointers. The current head and tail list elements have their - * previous and next pointers set to NULL, respectively. - */ -static void -ctf_list_append(ctf_list_t *lp, void *new) -{ - ctf_list_t *p = lp->l_prev; /* p = tail list element */ - ctf_list_t *q = new; /* q = new list element */ - - lp->l_prev = q; - q->l_prev = p; - q->l_next = NULL; - - if (p != NULL) - p->l_next = q; - else - lp->l_next = q; -} - -/* - * Prepend the specified existing element to the given ctf_list_t. The - * existing pointer should be pointing at a struct with embedded ctf_list_t. - */ -static void -ctf_list_prepend(ctf_list_t *lp, void *new) -{ - ctf_list_t *p = new; /* p = new list element */ - ctf_list_t *q = lp->l_next; /* q = head list element */ - - lp->l_next = p; - p->l_prev = NULL; - p->l_next = q; - - if (q != NULL) - q->l_prev = p; - else - lp->l_prev = p; -} - -static void -ctf_decl_init(ctf_decl_t *cd, char *buf, size_t len) -{ - int i; - - bzero(cd, sizeof (ctf_decl_t)); - - for (i = CTF_PREC_BASE; i < CTF_PREC_MAX; i++) - cd->cd_order[i] = CTF_PREC_BASE - 1; - - cd->cd_qualp = CTF_PREC_BASE; - cd->cd_ordp = CTF_PREC_BASE; - - cd->cd_buf = buf; - cd->cd_ptr = buf; - cd->cd_end = buf + len; -} - -static void -ctf_decl_fini(ctf_decl_t *cd) -{ - ctf_decl_node_t *cdp, *ndp; - int i; - - for (i = CTF_PREC_BASE; i < CTF_PREC_MAX; i++) { - for (cdp = ctf_list_next(&cd->cd_nodes[i]); - cdp != NULL; cdp = ndp) { - ndp = ctf_list_next(cdp); - free(cdp, M_FBT); - } - } -} - -static const ctf_type_t * -ctf_lookup_by_id(linker_ctf_t *lc, ctf_id_t type) -{ - const ctf_type_t *tp; - uint32_t offset; - uint32_t *typoff = *lc->typoffp; - - if (type >= *lc->typlenp) { - printf("%s(%d): type %d exceeds max %ld\n",__func__,__LINE__,(int) type,*lc->typlenp); - return(NULL); - } - - /* Check if the type isn't cross-referenced. */ - if ((offset = typoff[type]) == 0) { - printf("%s(%d): type %d isn't cross referenced\n",__func__,__LINE__, (int) type); - return(NULL); - } - - tp = (const ctf_type_t *)(lc->ctftab + offset + sizeof(ctf_header_t)); - - return (tp); -} - -static void -fbt_array_info(linker_ctf_t *lc, ctf_id_t type, ctf_arinfo_t *arp) -{ - const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; - const ctf_type_t *tp; - const ctf_array_t *ap; - ssize_t increment; - - bzero(arp, sizeof(*arp)); - - if ((tp = ctf_lookup_by_id(lc, type)) == NULL) - return; - - if (CTF_INFO_KIND(tp->ctt_info) != CTF_K_ARRAY) - return; - - (void) fbt_get_ctt_size(hp->cth_version, tp, NULL, &increment); - - ap = (const ctf_array_t *)((uintptr_t)tp + increment); - arp->ctr_contents = ap->cta_contents; - arp->ctr_index = ap->cta_index; - arp->ctr_nelems = ap->cta_nelems; -} - -static const char * -ctf_strptr(linker_ctf_t *lc, int name) -{ - const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab;; - const char *strp = ""; - - if (name < 0 || name >= hp->cth_strlen) - return (strp); - - strp = (const char *)(lc->ctftab + hp->cth_stroff + name + sizeof(ctf_header_t)); - - return (strp); -} - -static void -ctf_decl_push(ctf_decl_t *cd, linker_ctf_t *lc, ctf_id_t type) -{ - ctf_decl_node_t *cdp; - ctf_decl_prec_t prec; - uint_t kind, n = 1; - int is_qual = 0; - - const ctf_type_t *tp; - ctf_arinfo_t ar; - - if ((tp = ctf_lookup_by_id(lc, type)) == NULL) { - cd->cd_err = ENOENT; - return; - } - - switch (kind = CTF_INFO_KIND(tp->ctt_info)) { - case CTF_K_ARRAY: - fbt_array_info(lc, type, &ar); - ctf_decl_push(cd, lc, ar.ctr_contents); - n = ar.ctr_nelems; - prec = CTF_PREC_ARRAY; - break; - - case CTF_K_TYPEDEF: - if (ctf_strptr(lc, tp->ctt_name)[0] == '\0') { - ctf_decl_push(cd, lc, tp->ctt_type); - return; - } - prec = CTF_PREC_BASE; - break; - - case CTF_K_FUNCTION: - ctf_decl_push(cd, lc, tp->ctt_type); - prec = CTF_PREC_FUNCTION; - break; - - case CTF_K_POINTER: - ctf_decl_push(cd, lc, tp->ctt_type); - prec = CTF_PREC_POINTER; - break; - - case CTF_K_VOLATILE: - case CTF_K_CONST: - case CTF_K_RESTRICT: - ctf_decl_push(cd, lc, tp->ctt_type); - prec = cd->cd_qualp; - is_qual++; - break; - - default: - prec = CTF_PREC_BASE; - } - - if ((cdp = malloc(sizeof (ctf_decl_node_t), M_FBT, M_WAITOK)) == NULL) { - cd->cd_err = EAGAIN; - return; - } - - cdp->cd_type = type; - cdp->cd_kind = kind; - cdp->cd_n = n; - - if (ctf_list_next(&cd->cd_nodes[prec]) == NULL) - cd->cd_order[prec] = cd->cd_ordp++; - - /* - * Reset cd_qualp to the highest precedence level that we've seen so - * far that can be qualified (CTF_PREC_BASE or CTF_PREC_POINTER). - */ - if (prec > cd->cd_qualp && prec < CTF_PREC_ARRAY) - cd->cd_qualp = prec; - - /* - * C array declarators are ordered inside out so prepend them. Also by - * convention qualifiers of base types precede the type specifier (e.g. - * const int vs. int const) even though the two forms are equivalent. - */ - if (kind == CTF_K_ARRAY || (is_qual && prec == CTF_PREC_BASE)) - ctf_list_prepend(&cd->cd_nodes[prec], cdp); - else - ctf_list_append(&cd->cd_nodes[prec], cdp); -} - -static void -ctf_decl_sprintf(ctf_decl_t *cd, const char *format, ...) -{ - size_t len = (size_t)(cd->cd_end - cd->cd_ptr); - va_list ap; - size_t n; - - va_start(ap, format); - n = vsnprintf(cd->cd_ptr, len, format, ap); - va_end(ap); - - cd->cd_ptr += MIN(n, len); - cd->cd_len += n; -} - -static ssize_t -fbt_type_name(linker_ctf_t *lc, ctf_id_t type, char *buf, size_t len) -{ - ctf_decl_t cd; - ctf_decl_node_t *cdp; - ctf_decl_prec_t prec, lp, rp; - int ptr, arr; - uint_t k; - - if (lc == NULL && type == CTF_ERR) - return (-1); /* simplify caller code by permitting CTF_ERR */ - - ctf_decl_init(&cd, buf, len); - ctf_decl_push(&cd, lc, type); - - if (cd.cd_err != 0) { - ctf_decl_fini(&cd); - return (-1); - } - - /* - * If the type graph's order conflicts with lexical precedence order - * for pointers or arrays, then we need to surround the declarations at - * the corresponding lexical precedence with parentheses. This can - * result in either a parenthesized pointer (*) as in int (*)() or - * int (*)[], or in a parenthesized pointer and array as in int (*[])(). - */ - ptr = cd.cd_order[CTF_PREC_POINTER] > CTF_PREC_POINTER; - arr = cd.cd_order[CTF_PREC_ARRAY] > CTF_PREC_ARRAY; - - rp = arr ? CTF_PREC_ARRAY : ptr ? CTF_PREC_POINTER : -1; - lp = ptr ? CTF_PREC_POINTER : arr ? CTF_PREC_ARRAY : -1; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 17:46:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0648B8F; Wed, 11 Feb 2015 17:46:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5FAB107; Wed, 11 Feb 2015 17:46:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BHkZMg022492; Wed, 11 Feb 2015 17:46:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BHkZqt022491; Wed, 11 Feb 2015 17:46:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502111746.t1BHkZqt022491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 11 Feb 2015 17:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278589 - head/usr.sbin/flowctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:46:36 -0000 Author: pfg Date: Wed Feb 11 17:46:35 2015 New Revision: 278589 URL: https://svnweb.freebsd.org/changeset/base/278589 Log: flowctl: Replace alloca() with an array. Reviewed by: glebius Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c ============================================================================== --- head/usr.sbin/flowctl/flowctl.c Wed Feb 11 17:41:23 2015 (r278588) +++ head/usr.sbin/flowctl/flowctl.c Wed Feb 11 17:46:35 2015 (r278589) @@ -222,12 +222,10 @@ ctl_show(int argc, char **argv) static void do_show(int version, void (*func)(struct ngnf_show_header *)) { - struct ng_mesg *ng_mesg; + struct ng_mesg ng_mesg[SORCVBUF_SIZE]; struct ngnf_show_header req, *resp; int token, nread; - ng_mesg = alloca(SORCVBUF_SIZE); - req.version = version; req.hash_id = req.list_id = 0; From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 17:56:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 704213B2; Wed, 11 Feb 2015 17:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA48219; Wed, 11 Feb 2015 17:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BHuP1C027166; Wed, 11 Feb 2015 17:56:25 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BHuPmD027165; Wed, 11 Feb 2015 17:56:25 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201502111756.t1BHuPmD027165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 11 Feb 2015 17:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278590 - head/usr.bin/wc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:56:25 -0000 Author: marcel Date: Wed Feb 11 17:56:24 2015 New Revision: 278590 URL: https://svnweb.freebsd.org/changeset/base/278590 Log: Close the file list before opening the container that holds the totals, otherwise we end up emitting invalid JSON -- provided libxo does not prevent us from doing that. PR: 197499 Submitted by: allanjude@ Modified: head/usr.bin/wc/wc.c Modified: head/usr.bin/wc/wc.c ============================================================================== --- head/usr.bin/wc/wc.c Wed Feb 11 17:46:35 2015 (r278589) +++ head/usr.bin/wc/wc.c Wed Feb 11 17:56:24 2015 (r278590) @@ -140,12 +140,14 @@ main(int argc, char *argv[]) } while(*++argv); } + xo_close_list("file"); + if (total > 1) { xo_open_container("total"); show_cnt("total", tlinect, twordct, tcharct, tlongline); xo_close_container("total"); } - xo_close_list("file"); + xo_close_container("wc"); xo_finish(); exit(errors == 0 ? 0 : 1); From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 18:58:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6BDB573; Wed, 11 Feb 2015 18:58:28 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A245AABD; Wed, 11 Feb 2015 18:58:28 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJM0072NFCSO200@st11p02mm-asmtp002.mac.com>; Wed, 11 Feb 2015 18:58:09 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-11_04:2015-02-11,2015-02-11,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502110188 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJM00IVGFCTD570@st11p02mm-spool002.mac.com>; Wed, 11 Feb 2015 18:58:05 +0000 (GMT) To: Konstantin Belousov From: Rui Paulo Subject: =?utf-8?B?UmU6IHN2biBjb21taXQ6IHIyNzg0NzMgLSBpbiBoZWFkL3N5czogYW1kNjQv?= =?utf-8?B?YW1kNjQgYW1kNjQvaW5jbHVkZSBhbWQ2NC92bW0gY29udHJpYi9kZXYvYWNw?= =?utf-8?B?aWNhL2luY2x1ZGUgaTM4Ni9pMzg2IGkzODYvaW5jbHVkZSB4ODYvYWNwaWNh?= =?utf-8?B?IHg4Ni9pbmNsdWRlIHg4Ni94ODYgeDg2L3hlbg==?= Date: Wed, 11 Feb 2015 18:58:04 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: <104946c8-5e94-408e-9bef-1d7e388076d1@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, trasz@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 18:58:29 -0000 On Feb 11, 2015, at 08:55 AM, Konstantin Belousov wr= ote:=0AOk, https://lkml.org/lkml/2013/1/17/552=0A=0APatch is below. Please= , users of VMWare, test it.=0A=C2=A0=0AFixed the problem for me on VMware = Fusion 6.0.5.= From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 19:07:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CA028F8; Wed, 11 Feb 2015 19:07:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683EDC1B; Wed, 11 Feb 2015 19:07:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BJ76m6060791; Wed, 11 Feb 2015 19:07:06 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BJ761u060790; Wed, 11 Feb 2015 19:07:06 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502111907.t1BJ761u060790@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 11 Feb 2015 19:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278592 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 19:07:06 -0000 Author: rpaulo Date: Wed Feb 11 19:07:05 2015 New Revision: 278592 URL: https://svnweb.freebsd.org/changeset/base/278592 Log: Remove check against NULL after M_WAITOK. Submitted by: Oliver Pinter Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Feb 11 18:59:46 2015 (r278591) +++ head/sys/kern/kern_sig.c Wed Feb 11 19:07:05 2015 (r278592) @@ -3362,8 +3362,6 @@ close: len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 + sizeof(' ') + sizeof(core_name) - 1; data = malloc(len, M_TEMP, M_WAITOK); - if (data == NULL) - goto out; if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) goto out; if (!coredump_sanitise_path(fullpath)) From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 19:15:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22F91C78; Wed, 11 Feb 2015 19:15:01 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3F2AD03; Wed, 11 Feb 2015 19:15:00 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NJM00FDCG4LV540@st11p02mm-asmtp001.mac.com>; Wed, 11 Feb 2015 19:14:47 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-11_04:2015-02-11,2015-02-11,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1502110191 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NJM00IUIG4LD580@st11p02mm-spool002.mac.com>; Wed, 11 Feb 2015 19:14:45 +0000 (GMT) To: Mark Johnston From: Rui Paulo Subject: =?utf-8?B?UmU6IHN2biBjb21taXQ6IHIyNzgwMTIgLSBoZWFkL2NkZGwvY29udHJpYi9v?= =?utf-8?B?cGVuc29sYXJpcy9jbWQvZHRyYWNlL3Rlc3QvdHN0L2NvbW1vbi91c2R0?= Date: Wed, 11 Feb 2015 19:14:44 +0000 (GMT) X-Mailer: iCloud MailClient15A99 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: <79f3f80d-5bdb-448e-9dfb-215cdbfa838f@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 19:15:01 -0000 On Jan 31, 2015, at 03:12 PM, Mark Johnston wrote:=0A=0A= Author: markj=0ADate: Sat Jan 31 23:12:29 2015=0ANew Revision: 278012=0AUR= L: https://svnweb.freebsd.org/changeset/base/278012=0A=0ALog:=0AFix mktemp= (1) usage.=0A=0AMFC after: =C2=A01 week=0A=0AModified:=0Ahead/cddl/contrib= /opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh=0A=0AModif= ied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.cor= ruptenv.ksh=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=0A--- head/cddl/contrib/opensolaris/cmd/dtrace/te= st/tst/common/usdt/tst.corruptenv.ksh =C2=A0Sat Jan 31 23:11:57 2015 =C2=A0= =C2=A0(r278011)=0A+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/c= ommon/usdt/tst.corruptenv.ksh =C2=A0 =C2=A0 =C2=A0Sat Jan 31 23:12:29 2015= =C2=A0 =C2=A0(r278012)=0A@@ -48,7 +48,7 @@ fi=0A=0Adtrace=3D"$1"=0Astartd= ir=3D"$PWD"=0A-dir=3D$(mktemp -td drtiXXXXXX)=0A+dir=3D$(mktemp -d -t drti= XXXXXX)=0Aif (( $? !=3D 0 )); then=0A=C2=A0 =C2=A0print -u2 'Could not cre= ate safe temporary directory'=0A=C2=A0 =C2=A0exit 2=0A=C2=A0=0AI hit this = exact same problem in xz-utils when running the test suite. =C2=A0I think = this is a bug in our mktemp and perhaps it's time we move to a version of = mktemp that everyone else uses: mktemp.org.= From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 19:53:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA5C6815; Wed, 11 Feb 2015 19:53:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A581C15F; Wed, 11 Feb 2015 19:53:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BJrj9F086426; Wed, 11 Feb 2015 19:53:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BJrjXU086425; Wed, 11 Feb 2015 19:53:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502111953.t1BJrjXU086425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Feb 2015 19:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278593 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 19:53:45 -0000 Author: emaste Date: Wed Feb 11 19:53:44 2015 New Revision: 278593 URL: https://svnweb.freebsd.org/changeset/base/278593 Log: libdwarf: Add symbol value when processing .rela relocations Reviewed by: kib, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1826 Modified: head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Modified: head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Wed Feb 11 19:07:05 2015 (r278592) +++ head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Wed Feb 11 19:53:44 2015 (r278593) @@ -70,11 +70,15 @@ _dwarf_elf_apply_reloc(Dwarf_Debug dbg, offset = rela.r_offset; size = _dwarf_get_reloc_size(dbg, type); + if (size == 0) + continue; /* Unknown or non-absolute relocation. */ if (endian == ELFDATA2MSB) - _dwarf_write_msb(buf, &offset, rela.r_addend, size); + _dwarf_write_msb(buf, &offset, + sym.st_value + rela.r_addend, size); else - _dwarf_write_lsb(buf, &offset, rela.r_addend, size); + _dwarf_write_lsb(buf, &offset, + sym.st_value + rela.r_addend, size); } } From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 19:57:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FF89A60; Wed, 11 Feb 2015 19:57:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6BF18A; Wed, 11 Feb 2015 19:57:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BJvd6d086969; Wed, 11 Feb 2015 19:57:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BJvdPT086968; Wed, 11 Feb 2015 19:57:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502111957.t1BJvdPT086968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 11 Feb 2015 19:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278594 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 19:57:39 -0000 Author: mav Date: Wed Feb 11 19:57:38 2015 New Revision: 278594 URL: https://svnweb.freebsd.org/changeset/base/278594 Log: Add missing asprintf() status checks. MFC after: 2 weeks Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Wed Feb 11 19:53:44 2015 (r278593) +++ head/usr.sbin/ctld/ctld.c Wed Feb 11 19:57:38 2015 (r278594) @@ -1191,8 +1191,11 @@ port_new(struct conf *conf, struct targe { struct port *port; char *name; + int ret; - asprintf(&name, "%s-%s", pg->pg_name, target->t_name); + ret = asprintf(&name, "%s-%s", pg->pg_name, target->t_name); + if (ret <= 0) + log_err(1, "asprintf"); if (port_find(conf, name) != NULL) { log_warnx("duplicate port \"%s\"", name); free(name); @@ -1216,8 +1219,11 @@ port_new_pp(struct conf *conf, struct ta { struct port *port; char *name; + int ret; - asprintf(&name, "%s-%s", pp->pp_name, target->t_name); + ret = asprintf(&name, "%s-%s", pp->pp_name, target->t_name); + if (ret <= 0) + log_err(1, "asprintf"); if (port_find(conf, name) != NULL) { log_warnx("duplicate port \"%s\"", name); free(name); From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:03:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08284CB1; Wed, 11 Feb 2015 22:03:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7B7A376; Wed, 11 Feb 2015 22:03:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BM3NYq048604; Wed, 11 Feb 2015 22:03:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BM3NfU048603; Wed, 11 Feb 2015 22:03:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502112203.t1BM3NfU048603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 11 Feb 2015 22:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278598 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:03:24 -0000 Author: mav Date: Wed Feb 11 22:03:23 2015 New Revision: 278598 URL: https://svnweb.freebsd.org/changeset/base/278598 Log: Do not dereference NULL clearing UA that was not set in r277917. MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Feb 11 20:51:58 2015 (r278597) +++ head/sys/cam/ctl/ctl.c Wed Feb 11 22:03:23 2015 (r278598) @@ -11712,7 +11712,8 @@ ctl_clear_ua(struct ctl_softc *ctl_softc STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) { mtx_lock(&lun->lun_lock); pu = lun->pending_ua[initidx / CTL_MAX_INIT_PER_PORT]; - pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type; + if (pu != NULL) + pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type; mtx_unlock(&lun->lun_lock); } } From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:35:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78EE3318; Wed, 11 Feb 2015 22:35:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 616C38C6; Wed, 11 Feb 2015 22:35:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BMZabR063032; Wed, 11 Feb 2015 22:35:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMZWhh063017; Wed, 11 Feb 2015 22:35:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112235.t1BMZWhh063017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278599 - in stable/10/sys: arm/conf arm/samsung/exynos boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:35:36 -0000 Author: ian Date: Wed Feb 11 22:35:32 2015 New Revision: 278599 URL: https://svnweb.freebsd.org/changeset/base/278599 Log: MFC r266943, r266950, r267390: Add support for Exynos 5420 Octa - 8-core (big.LITTLE) ARM machine Enable SMP for both Exynos5 models we support. Added: stable/10/sys/arm/conf/ARNDALE-OCTA - copied unchanged from r266943, head/sys/arm/conf/ARNDALE-OCTA stable/10/sys/arm/conf/EXYNOS5.common - copied, changed from r266943, head/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/EXYNOS5250 - copied, changed from r266943, head/sys/arm/conf/EXYNOS5250 stable/10/sys/arm/conf/EXYNOS5420 - copied, changed from r266943, head/sys/arm/conf/EXYNOS5420 stable/10/sys/arm/samsung/exynos/std.exynos5250 - copied unchanged from r266943, head/sys/arm/samsung/exynos/std.exynos5250 stable/10/sys/arm/samsung/exynos/std.exynos5420 - copied unchanged from r266943, head/sys/arm/samsung/exynos/std.exynos5420 stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi Deleted: stable/10/sys/arm/samsung/exynos/std.exynos5 Modified: stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/CHROMEBOOK stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/arm/conf/ARNDALE Wed Feb 11 22:35:32 2015 (r278599) @@ -19,7 +19,7 @@ #NO_UNIVERSE -include "EXYNOS5250.common" +include "EXYNOS5250" ident ARNDALE #FDT Copied: stable/10/sys/arm/conf/ARNDALE-OCTA (from r266943, head/sys/arm/conf/ARNDALE-OCTA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/ARNDALE-OCTA Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/conf/ARNDALE-OCTA) @@ -0,0 +1,28 @@ +# Kernel configuration for Arndale Octa Board (Exynos 5420) +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +#NO_UNIVERSE + +include "EXYNOS5420" +ident ARNDALE-OCTA + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=exynos5420-arndale-octa.dts Modified: stable/10/sys/arm/conf/CHROMEBOOK ============================================================================== --- stable/10/sys/arm/conf/CHROMEBOOK Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/arm/conf/CHROMEBOOK Wed Feb 11 22:35:32 2015 (r278599) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include "EXYNOS5250.common" +include "EXYNOS5250" ident CHROMEBOOK hints "CHROMEBOOK.hints" Copied and modified: stable/10/sys/arm/conf/EXYNOS5.common (from r266943, head/sys/arm/conf/EXYNOS5.common) ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5.common Wed Feb 11 22:35:32 2015 (r278599) @@ -51,6 +51,8 @@ options PREEMPTION options FREEBSD_BOOT_LOADER options VFP # vfp/neon +options SMP + # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER Copied and modified: stable/10/sys/arm/conf/EXYNOS5250 (from r266943, head/sys/arm/conf/EXYNOS5250) ============================================================================== --- head/sys/arm/conf/EXYNOS5250 Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5250 Wed Feb 11 22:35:32 2015 (r278599) @@ -17,10 +17,9 @@ # # $FreeBSD$ +ident EXYNOS5250 include "EXYNOS5.common" include "../samsung/exynos/std.exynos5250" -options SMP - #FDT options FDT Copied and modified: stable/10/sys/arm/conf/EXYNOS5420 (from r266943, head/sys/arm/conf/EXYNOS5420) ============================================================================== --- head/sys/arm/conf/EXYNOS5420 Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5420 Wed Feb 11 22:35:32 2015 (r278599) @@ -17,6 +17,7 @@ # # $FreeBSD$ +ident EXYNOS5420 include "EXYNOS5.common" include "../samsung/exynos/std.exynos5420" Copied: stable/10/sys/arm/samsung/exynos/std.exynos5250 (from r266943, head/sys/arm/samsung/exynos/std.exynos5250) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/samsung/exynos/std.exynos5250) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 + +options PHYSADDR=0x40000000 + +makeoptions KERNPHYSADDR=0x40f00000 +options KERNPHYSADDR=0x40f00000 + +makeoptions KERNVIRTADDR=0xc0f00000 +options KERNVIRTADDR=0xc0f00000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../samsung/exynos/files.exynos5" Copied: stable/10/sys/arm/samsung/exynos/std.exynos5420 (from r266943, head/sys/arm/samsung/exynos/std.exynos5420) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/samsung/exynos/std.exynos5420) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 + +options PHYSADDR=0x20000000 + +makeoptions KERNPHYSADDR=0x20f00000 +options KERNPHYSADDR=0x20f00000 + +makeoptions KERNVIRTADDR=0xc0f00000 +options KERNVIRTADDR=0xc0f00000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../samsung/exynos/files.exynos5" Copied: stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi (from r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi) @@ -0,0 +1,284 @@ +/*- + * Copyright (c) 2013-2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/ { + compatible = "samsung,exynos5"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&GIC>; + + aliases { + soc = &SOC; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; + clk0 = &clk0; + dp0 = &dp0; + fimd0 = &fimd0; + }; + + SOC: Exynos5@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@10481000 { + compatible = "arm,gic"; + reg = < 0x10481000 0x1000 >, /* Distributor Registers */ + < 0x10482000 0x2000 >; /* CPU Interface Registers */ + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + + combiner: interrupt-controller@10440000 { + compatible = "exynos,combiner"; + reg = <0x10440000 0x1000>; + interrupts = < 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 >; + interrupt-parent = <&GIC>; + }; + + clk0: clk@10010000 { + compatible = "exynos,clk"; + reg = < 0x10020000 0x20000 >; + }; + + mct { + compatible = "exynos,mct"; + reg = < 0x101C0000 0x1000 >; + clock-frequency = <24000000>; + }; + + generic_timer { + compatible = "arm,armv7-timer"; + clock-frequency = <24000000>; + interrupts = < 29 30 27 26 >; + interrupt-parent = <&GIC>; + }; + + pwm { + compatible = "samsung,s3c24x0-timer"; + reg = <0x12DD0000 0x1000>; + interrupts = < 71 >; + interrupt-parent = <&GIC>; + clock-frequency = <24000000>; + }; + + pad0: pad@11400000 { + compatible = "exynos,pad"; + status = "disabled"; + reg = <0x11400000 0x1000>, /* gpio left */ + <0x13400000 0x1000>, /* gpio right */ + <0x10D10000 0x1000>, /* gpio c2c */ + <0x03860000 0x1000>; + interrupts = < 78 77 82 79 >; + interrupt-parent = <&GIC>; + }; + + usb@12110000 { + compatible = "exynos,usb-ehci", "usb-ehci"; + reg = <0x12110000 0x1000>, /* EHCI */ + <0x12130000 0x1000>, /* EHCI host ctrl */ + <0x10040000 0x1000>, /* Power */ + <0x10050230 0x10>; /* Sysreg */ + interrupts = < 103 >; + interrupt-parent = <&GIC>; + }; + + usb@12120000 { + compatible = "exynos,usb-ohci", "usb-ohci"; + status = "disabled"; + reg = <0x12120000 0x10000>; + interrupts = < 103 >; + interrupt-parent = <&GIC>; + }; + + sdhci@12200000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12200000 0x1000>; + interrupts = <107>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; /* TODO: verify freq */ + }; + + sdhci@12210000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12210000 0x1000>; + interrupts = <108>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + sdhci@12220000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12220000 0x1000>; + interrupts = <109>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + sdhci@12230000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12230000 0x1000>; + interrupts = <110>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + serial0: serial@12C00000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C00000 0x100>; + interrupts = < 83 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial1: serial@12C10000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C10000 0x100>; + interrupts = < 84 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial2: serial@12C20000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C20000 0x100>; + interrupts = < 85 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial3: serial@12C30000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C30000 0x100>; + interrupts = < 86 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + i2c0: i2c@12C60000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C60000 0x10000>; + interrupts = < 88 >; + interrupt-parent = <&GIC>; + }; + + i2c1: i2c@12C70000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C70000 0x10000>; + interrupts = < 89 >; + interrupt-parent = <&GIC>; + }; + + i2c2: i2c@12C80000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C80000 0x10000>; + interrupts = < 90 >; + interrupt-parent = <&GIC>; + }; + + i2c3: i2c@12C90000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C90000 0x10000>; + interrupts = < 91 >; + interrupt-parent = <&GIC>; + }; + + i2c4: i2c@12CA0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CA0000 0x10000>; + interrupts = < 92 >; + interrupt-parent = <&GIC>; + }; + + i2c5: i2c@12CB0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CB0000 0x10000>; + interrupts = < 93 >; + interrupt-parent = <&GIC>; + }; + + i2c6: i2c@12CC0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CC0000 0x10000>; + interrupts = < 94 >; + interrupt-parent = <&GIC>; + }; + + i2c7: i2c@12CD0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CD0000 0x10000>; + interrupts = < 95 >; + interrupt-parent = <&GIC>; + }; + + fimd0: fimd@14400000 { + compatible = "exynos,fimd"; + status = "disabled"; + reg = < 0x14400000 0x10000 >, /* fimd */ + < 0x14420000 0x10000 >, /* disp */ + < 0x10050000 0x220 >; /* sysreg */ + interrupt-parent = <&GIC>; + }; + + dp0: dp@145B0000 { + compatible = "exynos,dp"; + status = "disabled"; + reg = < 0x145B0000 0x10000 >, + < 0x10040720 0x10 >; /* PHY */ + interrupt-parent = <&GIC>; + }; + }; +}; Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts Wed Feb 11 22:35:32 2015 (r278599) @@ -44,6 +44,10 @@ status = "okay"; }; + serial2: serial@12C20000 { + status = "okay"; + }; + }; chosen { Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Wed Feb 11 22:35:32 2015 (r278599) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,248 +26,27 @@ * $FreeBSD$ */ -/ { - compatible = "samsung,exynos5250"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&GIC>; +/include/ "exynos5.dtsi" - aliases { - soc = &SOC; - serial0 = &serial0; - serial1 = &serial1; - clk0 = &clk0; - dp0 = &dp0; - fimd0 = &fimd0; - }; +/ { + compatible = "samsung,exynos5250", "samsung,exynos5"; SOC: Exynos5@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "simple-bus"; - ranges; - bus-frequency = <0>; - - GIC: interrupt-controller@10481000 { - compatible = "arm,gic"; - reg = < 0x10481000 0x1000 >, /* Distributor Registers */ - < 0x10482000 0x2000 >; /* CPU Interface Registers */ - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <1>; - }; - - combiner: interrupt-controller@10440000 { - compatible = "exynos,combiner"; - reg = <0x10440000 0x1000>; - interrupts = < 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 >; - interrupt-parent = <&GIC>; - }; - - clk0: clk@10010000 { - compatible = "exynos,clk"; - reg = < 0x10020000 0x20000 >; - }; - - mct { - compatible = "exynos,mct"; - reg = < 0x101C0000 0x1000 >; - clock-frequency = <24000000>; - }; - - generic_timer { - compatible = "arm,armv7-timer"; - clock-frequency = <24000000>; - interrupts = < 29 30 27 26 >; - interrupt-parent = <&GIC>; - }; - - pwm { - compatible = "samsung,s3c24x0-timer"; - reg = <0x12DD0000 0x1000>; - interrupts = < 71 >; - interrupt-parent = <&GIC>; - clock-frequency = <24000000>; - }; - - pad0: pad@11400000 { - compatible = "exynos,pad"; - status = "disabled"; - reg = <0x11400000 0x1000>, /* gpio left */ - <0x13400000 0x1000>, /* gpio right */ - <0x10D10000 0x1000>, /* gpio c2c */ - <0x03860000 0x1000>; - interrupts = < 78 77 82 79 >; - interrupt-parent = <&GIC>; - }; - - usb@12110000 { - compatible = "exynos,usb-ehci", "usb-ehci"; - reg = <0x12110000 0x1000>, /* EHCI */ - <0x12130000 0x1000>, /* EHCI host ctrl */ - <0x10040000 0x1000>, /* Power */ - <0x10050230 0x10>; /* Sysreg */ - interrupts = < 103 >; - interrupt-parent = <&GIC>; - }; - - usb@12120000 { - compatible = "exynos,usb-ohci", "usb-ohci"; - reg = <0x12120000 0x10000>; - interrupts = < 103 >; - interrupt-parent = <&GIC>; - }; - - sdhci@12200000 { - compatible = "sdhci_generic"; - reg = <0x12200000 0x1000>; - interrupts = <107>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; /* TODO: verify freq */ - }; - - sdhci@12210000 { - compatible = "sdhci_generic"; - reg = <0x12210000 0x1000>; - interrupts = <108>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; - - sdhci@12220000 { - compatible = "sdhci_generic"; - reg = <0x12220000 0x1000>; - interrupts = <109>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; - - sdhci@12230000 { - compatible = "sdhci_generic"; - reg = <0x12230000 0x1000>; - interrupts = <110>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; serial0: serial@12C00000 { - compatible = "exynos"; - reg = <0x12C00000 0x100>; - interrupts = < 83 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial1: serial@12C10000 { - compatible = "exynos"; - reg = <0x12C10000 0x100>; - interrupts = < 84 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial2: serial@12C20000 { - compatible = "exynos"; - reg = <0x12C20000 0x100>; - interrupts = < 85 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial3: serial@12C30000 { - compatible = "exynos"; - reg = <0x12C30000 0x100>; - interrupts = < 86 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; - }; - - i2c0: i2c@12C60000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C60000 0x10000>; - interrupts = < 88 >; - interrupt-parent = <&GIC>; - }; - - i2c1: i2c@12C70000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C70000 0x10000>; - interrupts = < 89 >; - interrupt-parent = <&GIC>; - }; - - i2c2: i2c@12C80000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C80000 0x10000>; - interrupts = < 90 >; - interrupt-parent = <&GIC>; - }; - - i2c3: i2c@12C90000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C90000 0x10000>; - interrupts = < 91 >; - interrupt-parent = <&GIC>; - }; - - i2c4: i2c@12CA0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CA0000 0x10000>; - interrupts = < 92 >; - interrupt-parent = <&GIC>; - }; - - i2c5: i2c@12CB0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CB0000 0x10000>; - interrupts = < 93 >; - interrupt-parent = <&GIC>; - }; - - i2c6: i2c@12CC0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CC0000 0x10000>; - interrupts = < 94 >; - interrupt-parent = <&GIC>; - }; - - i2c7: i2c@12CD0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CD0000 0x10000>; - interrupts = < 95 >; - interrupt-parent = <&GIC>; - }; - - fimd0: fimd@14400000 { - compatible = "exynos,fimd"; - status = "disabled"; - reg = < 0x14400000 0x10000 >, /* fimd */ - < 0x14420000 0x10000 >, /* disp */ - < 0x10050000 0x220 >; /* sysreg */ - interrupt-parent = <&GIC>; - }; - - dp0: dp@145B0000 { - compatible = "exynos,dp"; - status = "disabled"; - reg = < 0x145B0000 0x10000 >, - < 0x10040720 0x10 >; /* PHY */ - interrupt-parent = <&GIC>; }; }; }; Copied: stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts (from r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "exynos5420.dtsi" + +/ { + model = "Arndale Octa Board"; + + memory { + device_type = "memory"; + reg = < 0x20000000 0x40000000 >; /* 1G */ + }; + + SOC: Exynos5@0 { + serial3: serial@12C30000 { + status = "okay"; + }; + }; + + chosen { + stdin = &serial3; + stdout = &serial3; + }; +}; Copied: stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi (from r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +/include/ "exynos5.dtsi" + +/ { + compatible = "samsung,exynos5420", "samsung,exynos5"; + + SOC: Exynos5@0 { + + serial0: serial@12C00000 { + clock-frequency = < 50000000 >; + }; + + serial1: serial@12C10000 { + clock-frequency = < 50000000 >; + }; + + serial2: serial@12C20000 { + clock-frequency = < 50000000 >; + }; + + serial3: serial@12C30000 { + clock-frequency = < 50000000 >; + }; + }; +}; From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:39:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01E6253B; Wed, 11 Feb 2015 22:39:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E102F8E5; Wed, 11 Feb 2015 22:39:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BMdDLu063692; Wed, 11 Feb 2015 22:39:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMdDZX063691; Wed, 11 Feb 2015 22:39:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201502112239.t1BMdDZX063691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 11 Feb 2015 22:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278600 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:39:14 -0000 Author: bdrewery Date: Wed Feb 11 22:39:13 2015 New Revision: 278600 URL: https://svnweb.freebsd.org/changeset/base/278600 Log: Correct and clarify comment for __SMBF. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Wed Feb 11 22:35:32 2015 (r278599) +++ head/include/stdio.h Wed Feb 11 22:39:13 2015 (r278600) @@ -166,7 +166,7 @@ __END_DECLS #define __SRW 0x0010 /* open for reading & writing */ #define __SEOF 0x0020 /* found EOF */ #define __SERR 0x0040 /* found error */ -#define __SMBF 0x0080 /* _buf is from malloc */ +#define __SMBF 0x0080 /* _bf._base is from malloc */ #define __SAPP 0x0100 /* fdopen()ed in append mode */ #define __SSTR 0x0200 /* this is an sprintf/snprintf string */ #define __SOPT 0x0400 /* do fseek() optimization */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:47:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE5756F6; Wed, 11 Feb 2015 22:47:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D64CD9AB; Wed, 11 Feb 2015 22:47:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BMlq2Y068244; Wed, 11 Feb 2015 22:47:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMlni0068226; Wed, 11 Feb 2015 22:47:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112247.t1BMlni0068226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278601 - in stable/10/sys/arm: allwinner allwinner/a20 broadcom/bcm2835 freescale/imx freescale/vybrid mv rockchip samsung/exynos ti xilinx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:47:53 -0000 Author: ian Date: Wed Feb 11 22:47:48 2015 New Revision: 278601 URL: https://svnweb.freebsd.org/changeset/base/278601 Log: MFC r276047: Add -march=armv7a to the kernel compile for all v7a ARM systems. Modified: stable/10/sys/arm/allwinner/a20/std.a20 stable/10/sys/arm/allwinner/std.a10 stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 stable/10/sys/arm/freescale/imx/std.imx51 stable/10/sys/arm/freescale/imx/std.imx53 stable/10/sys/arm/freescale/imx/std.imx6 stable/10/sys/arm/freescale/vybrid/std.vybrid stable/10/sys/arm/mv/std-pj4b.mv stable/10/sys/arm/rockchip/std.rk30xx stable/10/sys/arm/samsung/exynos/std.exynos5250 stable/10/sys/arm/samsung/exynos/std.exynos5420 stable/10/sys/arm/ti/std.ti stable/10/sys/arm/xilinx/std.zynq7 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/std.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/std.a20 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/allwinner/a20/std.a20 Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: stable/10/sys/arm/allwinner/std.a10 ============================================================================== --- stable/10/sys/arm/allwinner/std.a10 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/allwinner/std.a10 Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 Wed Feb 11 22:47:48 2015 (r278601) @@ -2,6 +2,7 @@ machine arm armv6 cpu CPU_ARM1176 +makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s" files "../broadcom/bcm2835/files.bcm2835" Modified: stable/10/sys/arm/freescale/imx/std.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx51 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx51 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/imx/std.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx53 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx53 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/imx/std.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx6 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx6 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/std.vybrid Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/vybrid/std.vybrid Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x80000000 Modified: stable/10/sys/arm/mv/std-pj4b.mv ============================================================================== --- stable/10/sys/arm/mv/std-pj4b.mv Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/mv/std-pj4b.mv Wed Feb 11 22:47:48 2015 (r278601) @@ -3,5 +3,6 @@ files "../mv/files.mv" cpu CPU_MV_PJ4B machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" Modified: stable/10/sys/arm/rockchip/std.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/std.rk30xx Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/rockchip/std.rk30xx Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x60400000. We assume images are loaded at Modified: stable/10/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x40000000 Modified: stable/10/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x20000000 Modified: stable/10/sys/arm/ti/std.ti ============================================================================== --- stable/10/sys/arm/ti/std.ti Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/ti/std.ti Wed Feb 11 22:47:48 2015 (r278601) @@ -2,5 +2,6 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../ti/files.ti" Modified: stable/10/sys/arm/xilinx/std.zynq7 ============================================================================== --- stable/10/sys/arm/xilinx/std.zynq7 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/xilinx/std.zynq7 Wed Feb 11 22:47:48 2015 (r278601) @@ -5,6 +5,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../xilinx/files.zynq7" From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:55:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 086DAA0E; Wed, 11 Feb 2015 22:55:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5050A9E; Wed, 11 Feb 2015 22:55:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BMtSsh072706; Wed, 11 Feb 2015 22:55:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMtP7H072686; Wed, 11 Feb 2015 22:55:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112255.t1BMtP7H072686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278602 - in stable/10: lib/libstand sys/boot/common sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:55:29 -0000 Author: ian Date: Wed Feb 11 22:55:24 2015 New Revision: 278602 URL: https://svnweb.freebsd.org/changeset/base/278602 Log: MFC r276079, r276087: Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator. Modified: stable/10/lib/libstand/cd9660.c stable/10/lib/libstand/ext2fs.c stable/10/lib/libstand/nandfs.c stable/10/lib/libstand/nfs.c stable/10/lib/libstand/read.c stable/10/lib/libstand/stand.h stable/10/lib/libstand/tftp.c stable/10/lib/libstand/twiddle.c stable/10/lib/libstand/ufs.c stable/10/lib/libstand/write.c stable/10/sys/boot/common/console.c stable/10/sys/boot/common/loader.8 stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/cd9660.c ============================================================================== --- stable/10/lib/libstand/cd9660.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/cd9660.c Wed Feb 11 22:55:24 2015 (r278602) @@ -286,7 +286,7 @@ cd9660_open(const char *path, struct ope buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); vd = buf; for (bno = 16;; bno++) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -319,7 +319,7 @@ cd9660_open(const char *path, struct ope while (off < dsize) { if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy (f->f_devdata, F_READ, cdb2devb(bno + boff), @@ -379,7 +379,7 @@ cd9660_open(const char *path, struct ope /* Check for Rock Ridge since we didn't in the loop above. */ bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -436,7 +436,7 @@ buf_read_file(struct open_file *f, char if (fp->f_buf == (char *)0) fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE); - twiddle(); + twiddle(16); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read); if (rc) Modified: stable/10/lib/libstand/ext2fs.c ============================================================================== --- stable/10/lib/libstand/ext2fs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/ext2fs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -353,7 +353,7 @@ ext2fs_open(const char *upath, struct op /* allocate space and read super block */ fs = (struct ext2fs *)malloc(sizeof(*fs)); fp->f_fs = fs; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); if (error) @@ -395,7 +395,7 @@ ext2fs_open(const char *upath, struct op len = blkgrps * fs->fs_bsize; fp->f_bg = malloc(len); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp->f_bg, &buf_size); @@ -507,7 +507,7 @@ ext2fs_open(const char *upath, struct op if (error) goto out; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), fs->fs_bsize, buf, &buf_size); @@ -568,7 +568,7 @@ read_inode(ino_t inumber, struct open_fi * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); if (error) @@ -665,7 +665,7 @@ block_map(struct open_file *f, daddr_t f if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize, fp->f_blk[level], &fp->f_blksize[level]); @@ -723,7 +723,7 @@ buf_read_file(struct open_file *f, char bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); Modified: stable/10/lib/libstand/nandfs.c ============================================================================== --- stable/10/lib/libstand/nandfs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/nandfs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -921,7 +921,7 @@ nandfs_bmap_lookup(struct nandfs *fs, st return (0); } - twiddle(); + twiddle(1); NANDFS_DEBUG("calling get_map with %jx\n", ind_block_num); map = nandfs_get_map(fs, node, ind_block_num, phys); if (map == NULL) Modified: stable/10/lib/libstand/nfs.c ============================================================================== --- stable/10/lib/libstand/nfs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/nfs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -662,7 +662,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { @@ -1311,7 +1311,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { Modified: stable/10/lib/libstand/read.c ============================================================================== --- stable/10/lib/libstand/read.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/read.c Wed Feb 11 22:55:24 2015 (r278602) @@ -77,7 +77,7 @@ read(int fd, void *dest, size_t bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, btodb(f->f_offset), bcount, dest, &resid); if (errno) Modified: stable/10/lib/libstand/stand.h ============================================================================== --- stable/10/lib/libstand/stand.h Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/stand.h Wed Feb 11 22:55:24 2015 (r278602) @@ -241,7 +241,8 @@ extern int sprintf(char *buf, const char extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); extern void vsprintf(char *buf, const char *cfmt, __va_list); -extern void twiddle(void); +extern void twiddle(u_int callerdiv); +extern void twiddle_divisor(u_int globaldiv); extern void ngets(char *, int); #define gets(x) ngets((x), 0) Modified: stable/10/lib/libstand/tftp.c ============================================================================== --- stable/10/lib/libstand/tftp.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/tftp.c Wed Feb 11 22:55:24 2015 (r278602) @@ -447,14 +447,12 @@ tftp_read(struct open_file *f, void *add size_t *resid /* out */) { struct tftp_handle *tftpfile; - static int tc = 0; tftpfile = (struct tftp_handle *) f->f_fsdata; while (size > 0) { int needblock, count; - if (!(tc++ % 16)) - twiddle(); + twiddle(32); needblock = tftpfile->off / tftpfile->tftp_blksize + 1; Modified: stable/10/lib/libstand/twiddle.c ============================================================================== --- stable/10/lib/libstand/twiddle.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/twiddle.c Wed Feb 11 22:55:24 2015 (r278602) @@ -42,11 +42,28 @@ __FBSDID("$FreeBSD$"); /* Extra functions from NetBSD standalone printf.c */ +static u_int globaldiv; + void -twiddle() +twiddle(u_int callerdiv) { - static int pos; + static u_int callercnt, globalcnt, pos; + + callercnt++; + if (callerdiv > 1 && (callercnt % callerdiv) != 0) + return; + + globalcnt++; + if (globaldiv > 1 && (globalcnt % globaldiv) != 0) + return; putchar("|/-\\"[pos++ & 3]); putchar('\b'); } + +void +twiddle_divisor(u_int gdiv) +{ + + globaldiv = gdiv; +} Modified: stable/10/lib/libstand/ufs.c ============================================================================== --- stable/10/lib/libstand/ufs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/ufs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -155,7 +155,7 @@ read_inode(inumber, f) * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize); @@ -265,7 +265,7 @@ block_map(f, file_block, disk_block_p) if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize, @@ -346,7 +346,7 @@ buf_write_file(f, buf_p, size_p) if (fp->f_buf == (char *)0) fp->f_buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -365,7 +365,7 @@ buf_write_file(f, buf_p, size_p) * Write the block out to storage. */ - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -406,7 +406,7 @@ buf_read_file(f, buf_p, size_p) bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -515,7 +515,7 @@ ufs_open(upath, f) /* allocate space and read super block */ fs = malloc(SBLOCKSIZE); fp->f_fs = fs; - twiddle(); + twiddle(1); /* * Try reading the superblock in each of its possible locations. */ @@ -649,7 +649,7 @@ ufs_open(upath, f) if (rc) goto out; - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), fs->fs_bsize, buf, &buf_size); Modified: stable/10/lib/libstand/write.c ============================================================================== --- stable/10/lib/libstand/write.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/write.c Wed Feb 11 22:55:24 2015 (r278602) @@ -80,7 +80,7 @@ write(fd, dest, bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, btodb(f->f_offset), bcount, dest, &resid); if (errno) Modified: stable/10/sys/boot/common/console.c ============================================================================== --- stable/10/sys/boot/common/console.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/common/console.c Wed Feb 11 22:55:24 2015 (r278602) @@ -39,6 +39,7 @@ static int cons_set(struct env_var *ev, static int cons_find(const char *name); static int cons_check(const char *string); static void cons_change(const char *string); +static int twiddle_set(struct env_var *ev, int flags, const void *value); /* * Detect possible console(s) to use. If preferred console(s) have been @@ -52,6 +53,9 @@ cons_probe(void) int active; char *prefconsole; + /* We want a callback to install the new value when this var changes. */ + env_setenv("twiddle_divisor", EV_VOLATILE, "1", twiddle_set, env_nounset); + /* Do all console probes */ for (cons = 0; consoles[cons] != NULL; cons++) { consoles[cons]->c_flags = 0; @@ -232,3 +236,28 @@ cons_change(const char *string) free(dup); } + +/* + * Change the twiddle divisor. + * + * The user can set the twiddle_divisor variable to directly control how fast + * the progress twiddle spins, useful for folks with slow serial consoles. The + * code to monitor changes to the variable and propagate them to the twiddle + * routines has to live somewhere. Twiddling is console-related so it's here. + */ +static int +twiddle_set(struct env_var *ev, int flags, const void *value) +{ + u_long tdiv; + char * eptr; + + tdiv = strtoul(value, &eptr, 0); + if (*(const char *)value == 0 || *eptr != 0) { + printf("invalid twiddle_divisor '%s'\n", (const char *)value); + return (CMD_ERROR); + } + twiddle_divisor((u_int)tdiv); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + + return(CMD_OK); +} Modified: stable/10/sys/boot/common/loader.8 ============================================================================== --- stable/10/sys/boot/common/loader.8 Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/common/loader.8 Wed Feb 11 22:55:24 2015 (r278602) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd December 22, 2014 .Dt LOADER 8 .Os .Sh NAME @@ -670,6 +670,12 @@ Overrides the compile-time set value of .Dv TCBHASHSIZE or the preset default of 512. Must be a power of 2. +.It Va twiddle_divisor +Throttles the output of the `twiddle' I/O progress indicator displayed +while loading the kernel and modules. +This is useful on slow serial consoles where the time spent waiting for +these characters to be written can add up to many seconds. +The default is 1 (full speed); a value of 2 spins half as fast, and so on. .It Va vm.kmem_size Sets the size of kernel memory (bytes). This overrides the value determined when the kernel was compiled. Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/forth/loader.conf Wed Feb 11 22:55:24 2015 (r278602) @@ -75,6 +75,7 @@ module_path="/boot/modules" # Set the mo # the block size is set to 512. If the value # is out of range ( < 8 || > 9008 ) an error is # returned. +#twiddle_divisor="1" # >1 means slow down the progress indicator. ############################################################## From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 22:59:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86A1DBAE; Wed, 11 Feb 2015 22:59:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71CEDAC0; Wed, 11 Feb 2015 22:59:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BMxPYr073205; Wed, 11 Feb 2015 22:59:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMxPkK073204; Wed, 11 Feb 2015 22:59:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502112259.t1BMxPkK073204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 11 Feb 2015 22:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278603 - head/usr.bin/svn/svn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:59:25 -0000 Author: gjb Date: Wed Feb 11 22:59:24 2015 New Revision: 278603 URL: https://svnweb.freebsd.org/changeset/base/278603 Log: Ensure ORGANIZATION_NAME is quoted when ORGANIZATION could contain strings of two or more words. Reviewed by: peter Reported by: karl@denninger.net PR: 197540 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/svn/svn/Makefile Modified: head/usr.bin/svn/svn/Makefile ============================================================================== --- head/usr.bin/svn/svn/Makefile Wed Feb 11 22:55:24 2015 (r278602) +++ head/usr.bin/svn/svn/Makefile Wed Feb 11 22:59:24 2015 (r278603) @@ -54,8 +54,13 @@ DPSRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: - @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \ + @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \ > freebsd-organization.h + @# Remove quotes from ORGANIZATION_NAME if they exist. + @sed -i '' -e 's,",,g' freebsd-organization.h + @# Quote ORGANIZATION_NAME, in case it is two or more words. + @sed -i '' -E 's, , ",' freebsd-organization.h + @sed -i '' -E 's,$$,",' freebsd-organization.h .endif svnlite.1: svn.1 From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 23:05:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55ED4F61; Wed, 11 Feb 2015 23:05:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FD59C12; Wed, 11 Feb 2015 23:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BN5xES077748; Wed, 11 Feb 2015 23:05:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BN5wwn077746; Wed, 11 Feb 2015 23:05:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112305.t1BN5wwn077746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 23:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278604 - in stable/10/sys/boot: arm/uboot powerpc/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 23:05:59 -0000 Author: ian Date: Wed Feb 11 23:05:58 2015 New Revision: 278604 URL: https://svnweb.freebsd.org/changeset/base/278604 Log: MFC r276145: Convert lingering NO_FORTH conditionals to test MK_FORTH. Modified: stable/10/sys/boot/arm/uboot/Makefile stable/10/sys/boot/powerpc/uboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Wed Feb 11 22:59:24 2015 (r278603) +++ stable/10/sys/boot/arm/uboot/Makefile Wed Feb 11 23:05:58 2015 (r278604) @@ -76,7 +76,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm Modified: stable/10/sys/boot/powerpc/uboot/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/uboot/Makefile Wed Feb 11 22:59:24 2015 (r278603) +++ stable/10/sys/boot/powerpc/uboot/Makefile Wed Feb 11 23:05:58 2015 (r278604) @@ -66,7 +66,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 23:28:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38879488; Wed, 11 Feb 2015 23:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2359AE0A; Wed, 11 Feb 2015 23:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BNSTi4087433; Wed, 11 Feb 2015 23:28:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BNSScH087432; Wed, 11 Feb 2015 23:28:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502112328.t1BNSScH087432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 23:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278605 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 23:28:29 -0000 Author: kib Date: Wed Feb 11 23:28:28 2015 New Revision: 278605 URL: https://svnweb.freebsd.org/changeset/base/278605 Log: vm_page_lookup() accepts read-locked object. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_utils.c Modified: head/sys/x86/iommu/intel_utils.c ============================================================================== --- head/sys/x86/iommu/intel_utils.c Wed Feb 11 23:05:58 2015 (r278604) +++ head/sys/x86/iommu/intel_utils.c Wed Feb 11 23:28:28 2015 (r278605) @@ -411,11 +411,9 @@ dmar_load_root_entry_ptr(struct dmar_uni */ DMAR_ASSERT_LOCKED(unit); - /* VM_OBJECT_RLOCK(unit->ctx_obj); */ - VM_OBJECT_WLOCK(unit->ctx_obj); + VM_OBJECT_RLOCK(unit->ctx_obj); root_entry = vm_page_lookup(unit->ctx_obj, 0); - /* VM_OBJECT_RUNLOCK(unit->ctx_obj); */ - VM_OBJECT_WUNLOCK(unit->ctx_obj); + VM_OBJECT_RUNLOCK(unit->ctx_obj); dmar_write8(unit, DMAR_RTADDR_REG, VM_PAGE_TO_PHYS(root_entry)); dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd | DMAR_GCMD_SRTP); /* XXXKIB should have a timeout */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 11 23:30:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8B5361A; Wed, 11 Feb 2015 23:30:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C76EB6; Wed, 11 Feb 2015 23:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1BNUlpF090617; Wed, 11 Feb 2015 23:30:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BNUlnX090615; Wed, 11 Feb 2015 23:30:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502112330.t1BNUlnX090615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 23:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278606 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 23:30:47 -0000 Author: kib Date: Wed Feb 11 23:30:46 2015 New Revision: 278606 URL: https://svnweb.freebsd.org/changeset/base/278606 Log: Registers definitions for the new capabilities from the version 2.4 of VT-d specification. Also add definitions for the interrupt remapping table and IEC. Print new capabilities on boot. although there is no hardware which support it. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_reg.h Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Wed Feb 11 23:28:28 2015 (r278605) +++ head/sys/x86/iommu/intel_drv.c Wed Feb 11 23:30:46 2015 (r278606) @@ -375,7 +375,7 @@ dmar_print_caps(device_t dev, struct dma caphi = unit->hw_cap >> 32; device_printf(dev, "cap=%b,", (u_int)unit->hw_cap, "\020\004AFL\005WBF\006PLMR\007PHMR\010CM\027ZLR\030ISOCH"); - printf("%b, ", caphi, "\020\010PSI\027DWD\030DRD"); + printf("%b, ", caphi, "\020\010PSI\027DWD\030DRD\031FL1GP\034PSI"); printf("ndoms=%d, sagaw=%d, mgaw=%d, fro=%d, nfr=%d, superp=%d", DMAR_CAP_ND(unit->hw_cap), DMAR_CAP_SAGAW(unit->hw_cap), DMAR_CAP_MGAW(unit->hw_cap), DMAR_CAP_FRO(unit->hw_cap), @@ -385,8 +385,9 @@ dmar_print_caps(device_t dev, struct dma printf("\n"); ecaphi = unit->hw_ecap >> 32; device_printf(dev, "ecap=%b,", (u_int)unit->hw_ecap, - "\020\001C\002QI\003DI\004IR\005EIM\007PT\010SC"); - printf("%b, ", ecaphi, "\020"); + "\020\001C\002QI\003DI\004IR\005EIM\007PT\010SC\031ECS\032MTS" + "\033NEST\034DIS\035PASID\036PRS\037ERS\040SRS"); + printf("%b, ", ecaphi, "\020\002NWFS\003EAFS"); printf("mhmw=%d, iro=%d\n", DMAR_ECAP_MHMV(unit->hw_ecap), DMAR_ECAP_IRO(unit->hw_ecap)); } Modified: head/sys/x86/iommu/intel_reg.h ============================================================================== --- head/sys/x86/iommu/intel_reg.h Wed Feb 11 23:28:28 2015 (r278605) +++ head/sys/x86/iommu/intel_reg.h Wed Feb 11 23:30:46 2015 (r278606) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013-2015 The FreeBSD Foundation * All rights reserved. * * This software was developed by Konstantin Belousov @@ -79,6 +79,47 @@ typedef struct dmar_pte { #define DMAR_PTE_ADDR_MASK 0xffffffffff000 /* Address Mask */ #define DMAR_PTE_TM (1ULL << 62) /* Transient Mapping */ +typedef struct dmar_irte { + uint64_t irte1; + uint64_t irte2; +} dmar_irte_t; +/* Source Validation Type */ +#define DMAR_IRTE2_SVT_NONE (0ULL << (82 - 64)) +#define DMAR_IRTE2_SVT_RID (1ULL << (82 - 64)) +#define DMAR_IRTE2_SVT_BUS (2ULL << (82 - 64)) +/* Source-id Qualifier */ +#define DMAR_IRTE2_SQ_RID (0ULL << (80 - 64)) +#define DMAR_IRTE2_SQ_RID_N2 (1ULL << (80 - 64)) +#define DMAR_IRTE2_SQ_RID_N21 (2ULL << (80 - 64)) +#define DMAR_IRTE2_SQ_RID_N210 (3ULL << (80 - 64)) +/* Source Identifier */ +#define DMAR_IRTE2_SID_RID(x) ((uint64_t)(x)) +#define DMAR_IRTE2_SID_BUS(start, end) ((((uint64_t)(start)) << 8) | (end)) +/* Destination Id */ +#define DMAR_IRTE1_DST_xAPIC(x) (((uint64_t)(x)) << 40) +#define DMAR_IRTE1_DST_x2APIC(x) (((uint64_t)(x)) << 32) +/* Vector */ +#define DMAR_IRTE1_V(x) (((uint64_t)x) << 16) +#define DMAR_IRTE1_IM_POSTED (1ULL << 15) /* Posted */ +/* Delivery Mode */ +#define DMAR_IRTE1_DLM_FM (0ULL << 5) +#define DMAR_IRTE1_DLM_LP (1ULL << 5 +#define DMAR_IRTE1_DLM_SMI (2ULL << 5) +#define DMAR_IRTE1_DLM_NMI (4ULL << 5) +#define DMAR_IRTE1_DLM_INIT (5ULL << 5) +#define DMAR_IRTE1_DLM_ExtINT (7ULL << 5) +/* Trigger Mode */ +#define DMAR_IRTE1_TM_EDGE (0ULL << 4) +#define DMAR_IRTE1_TM_LEVEL (1ULL << 4) +/* Redirection Hint */ +#define DMAR_IRTE1_RH_DIRECT (0ULL << 3) +#define DMAR_IRTE1_RH_SELECT (1ULL << 3) +/* Destination Mode */ +#define DMAR_IRTE1_DM_PHYSICAL (0ULL << 2) +#define DMAR_IRTE1_DM_LOGICAL (1ULL << 2) +#define DMAR_IRTE1_FPD (1ULL << 1) /* Fault Processing Disable */ +#define DMAR_IRTE1_P (1ULL) /* Present */ + /* Version register */ #define DMAR_VER_REG 0 #define DMAR_MAJOR_VER(x) (((x) >> 4) & 0xf) @@ -86,6 +127,8 @@ typedef struct dmar_pte { /* Capabilities register */ #define DMAR_CAP_REG 0x8 +#define DMAR_CAP_PI (1ULL << 59) /* Posted Interrupts */ +#define DMAR_CAP_FL1GP (1ULL << 56) /* First Level 1GByte Page */ #define DMAR_CAP_DRD (1ULL << 55) /* DMA Read Draining */ #define DMAR_CAP_DWD (1ULL << 54) /* DMA Write Draining */ #define DMAR_CAP_MAMV(x) ((u_int)(((x) >> 48) & 0x3f)) @@ -120,6 +163,17 @@ typedef struct dmar_pte { /* Extended Capabilities register */ #define DMAR_ECAP_REG 0x10 +#define DMAR_ECAP_PSS(x) (((x) >> 35) & 0xf) /* PASID Size Supported */ +#define DMAR_ECAP_EAFS (1ULL << 34) /* Extended Accessed Flag */ +#define DMAR_ECAP_NWFS (1ULL << 33) /* No Write Flag */ +#define DMAR_ECAP_SRS (1ULL << 31) /* Supervisor Request */ +#define DMAR_ECAP_ERS (1ULL << 30) /* Execute Request */ +#define DMAR_ECAP_PRS (1ULL << 29) /* Page Request */ +#define DMAR_ECAP_PASID (1ULL << 28) /* Process Address Space Id */ +#define DMAR_ECAP_DIS (1ULL << 27) /* Deferred Invalidate */ +#define DMAR_ECAP_NEST (1ULL << 26) /* Nested Translation */ +#define DMAR_ECAP_MTS (1ULL << 25) /* Memory Type */ +#define DMAR_ECAP_ECS (1ULL << 24) /* Extended Context */ #define DMAR_ECAP_MHMV(x) ((u_int)(((x) >> 20) & 0xf)) /* Maximum Handle Mask Value */ #define DMAR_ECAP_IRO(x) ((u_int)(((x) >> 8) & 0x3ff)) @@ -283,6 +337,11 @@ typedef struct dmar_pte { #define DMAR_IQ_DESCR_IOTLB_DR (1 << 7) /* Drain Reads */ #define DMAR_IQ_DESCR_IOTLB_DID(x) (((uint32_t)(x)) << 16) /* Domain Id */ +#define DMAR_IQ_DESCR_IEC_INV 0x4 /* Invalidate Interrupt Entry Cache */ +#define DMAR_IQ_DESCR_IEC_IDX (1 << 4) /* Index-Selective Invalidation */ +#define DMAR_IQ_DESCR_IEC_IIDX(x) (((uint64_t)x) << 32) /* Interrupt Index */ +#define DMAR_IQ_DESCR_IEC_IM(x) ((x) << 27) /* Index Mask */ + #define DMAR_IQ_DESCR_WAIT_ID 0x5 /* Invalidation Wait Descriptor */ #define DMAR_IQ_DESCR_WAIT_IF (1 << 4) /* Interrupt Flag */ #define DMAR_IQ_DESCR_WAIT_SW (1 << 5) /* Status Write */ @@ -326,5 +385,8 @@ typedef struct dmar_pte { /* Interrupt Remapping Table Address register */ #define DMAR_IRTA_REG 0xb8 +#define DMAR_IRTA_EIME (1 << 11) /* Extended Interrupt Mode + Enable */ +#define DMAR_IRTA_S_MASK 0xf /* Size Mask */ #endif From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 00:17:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69F5AEE2; Thu, 12 Feb 2015 00:17:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54A732E1; Thu, 12 Feb 2015 00:17:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C0HFuS011951; Thu, 12 Feb 2015 00:17:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C0HF0b011950; Thu, 12 Feb 2015 00:17:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502120017.t1C0HF0b011950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 12 Feb 2015 00:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278607 - head/usr.bin/svn/svn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:17:15 -0000 Author: gjb Date: Thu Feb 12 00:17:14 2015 New Revision: 278607 URL: https://svnweb.freebsd.org/changeset/base/278607 Log: Reduce number of lines to set ORGANIZATION_NAME in freebsd-organization.h. Patched by: ian PR: 197540 MFC after: 3 days X-MFC-with: r278603 Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/svn/svn/Makefile Modified: head/usr.bin/svn/svn/Makefile ============================================================================== --- head/usr.bin/svn/svn/Makefile Wed Feb 11 23:30:46 2015 (r278606) +++ head/usr.bin/svn/svn/Makefile Thu Feb 12 00:17:14 2015 (r278607) @@ -54,13 +54,8 @@ DPSRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: - @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \ + @echo "#define ORGANIZATION_NAME \"$$(eval echo ${ORGANIZATION})\"" \ > freebsd-organization.h - @# Remove quotes from ORGANIZATION_NAME if they exist. - @sed -i '' -e 's,",,g' freebsd-organization.h - @# Quote ORGANIZATION_NAME, in case it is two or more words. - @sed -i '' -E 's, , ",' freebsd-organization.h - @sed -i '' -E 's,$$,",' freebsd-organization.h .endif svnlite.1: svn.1 From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 00:25:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 297991A1; Thu, 12 Feb 2015 00:25:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 116743D5; Thu, 12 Feb 2015 00:25:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C0PX1F016467; Thu, 12 Feb 2015 00:25:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C0PXBt016465; Thu, 12 Feb 2015 00:25:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120025.t1C0PXBt016465@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 00:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278608 - in stable/10/sys: arm/broadcom/bcm2835 boot/fdt/dts/arm conf dev/ofw powerpc/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:25:34 -0000 Author: ian Date: Thu Feb 12 00:25:33 2015 New Revision: 278608 URL: https://svnweb.freebsd.org/changeset/base/278608 Log: MFC r275779, r275963, r276101, r276161, r276297: Move ofw_cpu.c to sys/dev/ofw so that it can be used by other architectures. Add driver for CPU frequency/voltage control on the Raspberry Pi. On initialization, do not use bcm_mbox_intr() to read the pending messages. This fixes the hang that happens on boot while initializing the cpufreq on Raspberry Pi. Added: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c - copied unchanged from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h - copied unchanged from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h stable/10/sys/dev/ofw/ofw_cpu.c - copied unchanged from r275779, head/sys/dev/ofw/ofw_cpu.c Deleted: stable/10/sys/powerpc/ofw/ofw_cpu.c Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.h stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/boot/fdt/dts/arm/rpi.dts stable/10/sys/conf/files.powerpc Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c (from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Feb 12 00:25:33 2015 (r278608, copy of r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c) @@ -0,0 +1,1818 @@ +/*- + * Copyright (C) 2013-2014 Daisuke Aoyama + * All rights reserved. + * + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "cpufreq_if.h" +#include "mbox_if.h" + +#ifdef DEBUG +#define DPRINTF(fmt, ...) do { \ + printf("%s:%u: ", __func__, __LINE__); \ + printf(fmt, ##__VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(fmt, ...) +#endif + +#define HZ2MHZ(freq) ((freq) / (1000 * 1000)) +#define MHZ2HZ(freq) ((freq) * (1000 * 1000)) +#define OFFSET2MVOLT(val) (1200 + ((val) * 25)) +#define MVOLT2OFFSET(val) (((val) - 1200) / 25) +#define RAW2K(temp) (((temp) + 273150) / 1000) +#define K2RAW(temp) (((temp) * 1000) - 273150) + +#define DEFAULT_ARM_FREQUENCY 700 +#define DEFAULT_CORE_FREQUENCY 250 +#define DEFAULT_SDRAM_FREQUENCY 400 +#define DEFAULT_LOWEST_FREQ 300 +#define TRANSITION_LATENCY 1000 +#define MIN_OVER_VOLTAGE -16 +#define MAX_OVER_VOLTAGE 6 +#define MSG_ERROR -999999999 +#define MHZSTEP 100 +#define HZSTEP (MHZ2HZ(MHZSTEP)) + +#define VC_LOCK(sc) do { \ + sema_wait(&vc_sema); \ + } while (0) +#define VC_UNLOCK(sc) do { \ + sema_post(&vc_sema); \ + } while (0) + +/* ARM->VC mailbox property semaphore */ +static struct sema vc_sema; + +static struct sysctl_ctx_list bcm2835_sysctl_ctx; + +struct bcm2835_cpufreq_softc { + device_t dev; + int arm_max_freq; + int arm_min_freq; + int core_max_freq; + int core_min_freq; + int sdram_max_freq; + int sdram_min_freq; + int max_voltage_core; + int min_voltage_core; + + /* the values written in mbox */ + int voltage_core; + int voltage_sdram; + int voltage_sdram_c; + int voltage_sdram_i; + int voltage_sdram_p; + int turbo_mode; + + /* mbox buffer (physical address) */ + bus_dma_tag_t dma_tag; + bus_dmamap_t dma_map; + bus_size_t dma_size; + void *dma_buf; + bus_addr_t dma_phys; + + /* initial hook for waiting mbox intr */ + struct intr_config_hook init_hook; +}; + +static int cpufreq_verbose = 0; +TUNABLE_INT("hw.bcm2835.cpufreq.verbose", &cpufreq_verbose); +static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; +TUNABLE_INT("hw.bcm2835.cpufreq.lowest_freq", &cpufreq_lowest_freq); + +#ifdef DEBUG +static void +bcm2835_dump(const void *data, int len) +{ + const uint8_t *p = (const uint8_t*)data; + int i; + + printf("dump @ %p:\n", data); + for (i = 0; i < len; i++) { + printf("%2.2x ", p[i]); + if ((i % 4) == 3) + printf(" "); + if ((i % 16) == 15) + printf("\n"); + } + printf("\n"); +} +#endif + +static int +bcm2835_mbox_call_prop(struct bcm2835_cpufreq_softc *sc) +{ + struct bcm2835_mbox_hdr *msg = (struct bcm2835_mbox_hdr *)sc->dma_buf; + struct bcm2835_mbox_tag_hdr *tag, *last; + uint8_t *up; + device_t mbox; + size_t hdr_size; + int idx; + int err; + + /* + * For multiple calls, locking is not here. The caller must have + * VC semaphore. + */ + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(sc->dev, "can't find mbox\n"); + return (-1); + } + + /* go mailbox property */ +#ifdef PROP_DEBUG + bcm2835_dump(msg, 64); +#endif + bus_dmamap_sync(sc->dma_tag, sc->dma_map, + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)sc->dma_phys); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, &err); + bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_POSTREAD); +#ifdef PROP_DEBUG + bcm2835_dump(msg, 64); +#endif + + /* check response code */ + if (msg->code != BCM2835_MBOX_CODE_RESP_SUCCESS) { + device_printf(sc->dev, "mbox response error\n"); + return (-1); + } + + /* tag = first tag */ + up = (uint8_t *)msg; + hdr_size = sizeof(struct bcm2835_mbox_hdr); + tag = (struct bcm2835_mbox_tag_hdr *)(up + hdr_size); + /* last = end of buffer specified by header */ + last = (struct bcm2835_mbox_tag_hdr *)(up + msg->buf_size); + + /* loop unitl end tag (=0x0) */ + hdr_size = sizeof(struct bcm2835_mbox_tag_hdr); + for (idx = 0; tag->tag != 0; idx++) { + if ((tag->val_len & BCM2835_MBOX_TAG_VAL_LEN_RESPONSE) == 0) { + device_printf(sc->dev, "tag%d response error\n", idx); + return (-1); + } + /* clear response bit */ + tag->val_len &= ~BCM2835_MBOX_TAG_VAL_LEN_RESPONSE; + + /* get next tag */ + up = (uint8_t *)tag; + tag = (struct bcm2835_mbox_tag_hdr *)(up + hdr_size + + tag->val_buf_size); + + /* check buffer size of header */ + if (tag > last) { + device_printf(sc->dev, "mbox buffer size error\n"); + return (-1); + } + } + + return (0); +} + +static int +bcm2835_cpufreq_get_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_clock_rate *msg; + int rate; + int err; + + /* + * Get clock rate + * Tag: 0x00030002 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_max_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_max_clock_rate *msg; + int rate; + int err; + + /* + * Get max clock rate + * Tag: 0x00030004 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_max_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MAX_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get max clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_min_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_min_clock_rate *msg; + int rate; + int err; + + /* + * Get min clock rate + * Tag: 0x00030007 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_min_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MIN_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get min clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_set_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id, uint32_t rate_hz) +{ + struct msg_set_clock_rate *msg; + int rate; + int err; + + /* + * Set clock rate + * Tag: 0x00038002 + * Request: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_set_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->body.req.rate_hz = rate_hz; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* workaround for core clock */ + if (clock_id == BCM2835_MBOX_CLOCK_ID_CORE) { + /* for safety (may change voltage without changing clock) */ + DELAY(TRANSITION_LATENCY); + + /* + * XXX: the core clock is unable to change at once, + * to change certainly, write it twice now. + */ + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->body.req.rate_hz = rate_hz; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, + "can't set clock rate (id=%u)\n", clock_id); + return (MSG_ERROR); + } + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_turbo(struct bcm2835_cpufreq_softc *sc) +{ + struct msg_get_turbo *msg; + int level; + int err; + + /* + * Get turbo + * Tag: 0x00030009 + * Request: + * Length: 4 + * Value: + * u32: id + * Response: + * Length: 8 + * Value: + * u32: id + * u32: level + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_turbo *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_TURBO; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.id = 0; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get turbo\n"); + return (MSG_ERROR); + } + + /* result 0=non-turbo, 1=turbo */ + level = (int)msg->body.resp.level; + DPRINTF("level = %d\n", level); + return (level); +} + +static int +bcm2835_cpufreq_set_turbo(struct bcm2835_cpufreq_softc *sc, uint32_t level) +{ + struct msg_set_turbo *msg; + int value; + int err; + + /* + * Set turbo + * Tag: 0x00038009 + * Request: + * Length: 8 + * Value: + * u32: id + * u32: level + * Response: + * Length: 8 + * Value: + * u32: id + * u32: level + */ + + /* using DMA buffer for VC */ + msg = (struct msg_set_turbo *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* replace unknown value to OFF */ + if (level != BCM2835_MBOX_TURBO_ON && level != BCM2835_MBOX_TURBO_OFF) + level = BCM2835_MBOX_TURBO_OFF; + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_TURBO; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.id = 0; + msg->body.req.level = level; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set turbo\n"); + return (MSG_ERROR); + } + + /* result 0=non-turbo, 1=turbo */ + value = (int)msg->body.resp.level; + DPRINTF("level = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030003 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_max_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_max_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030005 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_max_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MAX_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get max voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} +static int +bcm2835_cpufreq_get_min_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_min_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030008 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_min_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MIN_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get min voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_set_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id, int32_t value) +{ + struct msg_set_voltage *msg; + int err; + + /* + * Set voltage + * Tag: 0x00038003 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* + * over_voltage: + * 0 (1.2 V). Values above 6 are only allowed when force_turbo or + * current_limit_override are specified (which set the warranty bit). + */ + if (value > MAX_OVER_VOLTAGE || value < MIN_OVER_VOLTAGE) { + /* currently not supported */ + device_printf(sc->dev, "not supported voltage: %d\n", value); + return (MSG_ERROR); + } + + /* using DMA buffer for VC */ + msg = (struct msg_set_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->body.req.value = (uint32_t)value; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_temperature(struct bcm2835_cpufreq_softc *sc) +{ + struct msg_get_temperature *msg; + int value; + int err; + + /* + * Get temperature + * Tag: 0x00030006 + * Request: + * Length: 4 + * Value: + * u32: temperature id + * Response: + * Length: 8 + * Value: + * u32: temperature id + * u32: value + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_temperature *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_TEMPERATURE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.temperature_id = 0; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get temperature\n"); + return (MSG_ERROR); + } + + /* result (temperature of degree C) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + + + +static int +sysctl_bcm2835_cpufreq_arm_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_ARM); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_ARM, + val); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set clock arm_freq error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_core_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_CORE); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_CORE, + val); + if (err == MSG_ERROR) { + VC_UNLOCK(sc); + device_printf(sc->dev, "set clock core_freq error\n"); + return (EIO); + } + VC_UNLOCK(sc); + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_sdram_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_SDRAM); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_SDRAM, + val); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set clock sdram_freq error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_turbo(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_turbo(sc); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + if (val > 0) + sc->turbo_mode = BCM2835_MBOX_TURBO_ON; + else + sc->turbo_mode = BCM2835_MBOX_TURBO_OFF; + + VC_LOCK(sc); + err = bcm2835_cpufreq_set_turbo(sc, sc->turbo_mode); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set turbo error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_voltage_core(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 00:35:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C8A425; Thu, 12 Feb 2015 00:35:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402AB68F; Thu, 12 Feb 2015 00:35:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C0ZxqL021262; Thu, 12 Feb 2015 00:35:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C0ZxKn021260; Thu, 12 Feb 2015 00:35:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120035.t1C0ZxKn021260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 00:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278609 - stable/10/sys/dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:35:59 -0000 Author: ian Date: Thu Feb 12 00:35:58 2015 New Revision: 278609 URL: https://svnweb.freebsd.org/changeset/base/278609 Log: MFC r276162: Don't assume required FDT properties are present. Modified: stable/10/sys/dev/ofw/ofw_cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ofw/ofw_cpu.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_cpu.c Thu Feb 12 00:25:33 2015 (r278608) +++ stable/10/sys/dev/ofw/ofw_cpu.c Thu Feb 12 00:35:58 2015 (r278609) @@ -170,7 +170,7 @@ ofw_cpu_probe(device_t dev) { const char *type = ofw_bus_get_type(dev); - if (strcmp(type, "cpu") != 0) + if (type == NULL || strcmp(type, "cpu") != 0) return (ENXIO); device_set_desc(dev, "Open Firmware CPU"); @@ -181,12 +181,20 @@ static int ofw_cpu_attach(device_t dev) { struct ofw_cpu_softc *sc; + phandle_t node; uint32_t cell; sc = device_get_softc(dev); - OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell)); + node = ofw_bus_get_node(dev); + if (OF_getencprop(node, "reg", &cell, sizeof(cell)) < 0) { + cell = device_get_unit(dev); + device_printf(dev, "missing 'reg' property, using %u\n", cell); + } sc->sc_cpu_pcpu = pcpu_find(cell); - OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell)); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { + device_printf(dev, "missing 'clock-frequency' property\n"); + return (ENXIO); + } sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */ bus_generic_probe(dev); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 02:08:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 626D653C; Thu, 12 Feb 2015 02:08:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C538F57; Thu, 12 Feb 2015 02:08:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C28kuN063375; Thu, 12 Feb 2015 02:08:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C28jbv063367; Thu, 12 Feb 2015 02:08:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502120208.t1C28jbv063367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 12 Feb 2015 02:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278611 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 02:08:46 -0000 Author: emaste Date: Thu Feb 12 02:08:44 2015 New Revision: 278611 URL: https://svnweb.freebsd.org/changeset/base/278611 Log: libdwarf: Handle .rel relocations Some architectures use .rel relocations (for debug data), so they must be handled. This was discovered from ctfconvert on ARM object files. The lack of relocation handling caused all string lookups to return the string at offset 0 in .debug_str, typically "FreeBSD clang version ..." Reviewed by: gnn, imp, rpaulo (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1819 Modified: head/contrib/elftoolchain/libdwarf/_libdwarf.h head/contrib/elftoolchain/libdwarf/dwarf_reloc.c head/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 head/contrib/elftoolchain/libdwarf/libdwarf.c head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Modified: head/contrib/elftoolchain/libdwarf/_libdwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/_libdwarf.h Thu Feb 12 00:50:54 2015 (r278610) +++ head/contrib/elftoolchain/libdwarf/_libdwarf.h Thu Feb 12 02:08:44 2015 (r278611) @@ -49,7 +49,7 @@ struct _libdwarf_globals { Dwarf_Handler errhand; Dwarf_Ptr errarg; - int applyrela; + int applyreloc; }; extern struct _libdwarf_globals _libdwarf; Modified: head/contrib/elftoolchain/libdwarf/dwarf_reloc.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_reloc.c Thu Feb 12 00:50:54 2015 (r278610) +++ head/contrib/elftoolchain/libdwarf/dwarf_reloc.c Thu Feb 12 02:08:44 2015 (r278611) @@ -33,8 +33,8 @@ dwarf_set_reloc_application(int apply) { int oldapply; - oldapply = _libdwarf.applyrela; - _libdwarf.applyrela = apply; + oldapply = _libdwarf.applyreloc; + _libdwarf.applyreloc = apply; return (oldapply); } Modified: head/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 Thu Feb 12 00:50:54 2015 (r278610) +++ head/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 Thu Feb 12 02:08:44 2015 (r278611) @@ -24,7 +24,7 @@ .\" .\" $Id: dwarf_set_reloc_application.3 2075 2011-10-27 03:47:28Z jkoshy $ .\" -.Dd June 26, 2011 +.Dd February 11, 2015 .Os .Dt DWARF_SET_RELOC_APPLICATION 3 .Sh NAME @@ -47,6 +47,8 @@ handled by the DWARF(3) library. If the argument .Ar apply holds a non-zero value, the library will process all the relevant +.Dq ".rel" +and .Dq ".rela" relocation sections and will apply the relocation records found to their corresponding DWARF sections. Modified: head/contrib/elftoolchain/libdwarf/libdwarf.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf.c Thu Feb 12 00:50:54 2015 (r278610) +++ head/contrib/elftoolchain/libdwarf/libdwarf.c Thu Feb 12 02:08:44 2015 (r278611) @@ -31,5 +31,5 @@ ELFTC_VCSID("$Id: libdwarf.c 2070 2011-1 struct _libdwarf_globals _libdwarf = { .errhand = NULL, .errarg = NULL, - .applyrela = 1 + .applyreloc = 1 }; Modified: head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Thu Feb 12 00:50:54 2015 (r278610) +++ head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Thu Feb 12 02:08:44 2015 (r278611) @@ -50,36 +50,46 @@ static const char *debug_name[] = { }; static void -_dwarf_elf_apply_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data, - Elf_Data *symtab_data, int endian) +_dwarf_elf_write_reloc(Dwarf_Debug dbg, Elf_Data *symtab_data, int endian, + void *buf, uint64_t offset, GElf_Xword r_info, GElf_Sxword r_addend) { - Dwarf_Unsigned type; - GElf_Rela rela; GElf_Sym sym; - size_t symndx; - uint64_t offset; - int size, j; + int size; + + if (gelf_getsym(symtab_data, GELF_R_SYM(r_info), &sym) == NULL) + return; + if ((size = _dwarf_get_reloc_size(dbg, GELF_R_TYPE(r_info))) == 0) + return; /* Unknown or non-absolute relocation. */ + if (endian == ELFDATA2MSB) + _dwarf_write_msb(buf, &offset, sym.st_value + r_addend, size); + else + _dwarf_write_lsb(buf, &offset, sym.st_value + r_addend, size); +} + +static void +_dwarf_elf_apply_rel_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data, + Elf_Data *symtab_data, int endian) +{ + GElf_Rel rel; + int j; j = 0; - while (gelf_getrela(rel_data, j++, &rela) != NULL) { - symndx = GELF_R_SYM(rela.r_info); - type = GELF_R_TYPE(rela.r_info); + while (gelf_getrel(rel_data, j++, &rel) != NULL) + _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf, + rel.r_offset, rel.r_info, 0); +} - if (gelf_getsym(symtab_data, symndx, &sym) == NULL) - continue; +static void +_dwarf_elf_apply_rela_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data, + Elf_Data *symtab_data, int endian) +{ + GElf_Rela rela; + int j; - offset = rela.r_offset; - size = _dwarf_get_reloc_size(dbg, type); - if (size == 0) - continue; /* Unknown or non-absolute relocation. */ - - if (endian == ELFDATA2MSB) - _dwarf_write_msb(buf, &offset, - sym.st_value + rela.r_addend, size); - else - _dwarf_write_lsb(buf, &offset, - sym.st_value + rela.r_addend, size); - } + j = 0; + while (gelf_getrela(rel_data, j++, &rela) != NULL) + _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf, + rela.r_offset, rela.r_info, rela.r_addend); } static int @@ -108,7 +118,8 @@ _dwarf_elf_relocate(Dwarf_Debug dbg, Elf return (DW_DLE_ELF); } - if (sh.sh_type != SHT_RELA || sh.sh_size == 0) + if ((sh.sh_type != SHT_REL && sh.sh_type != SHT_RELA) || + sh.sh_size == 0) continue; if (sh.sh_info == shndx && sh.sh_link == symtab) { @@ -129,8 +140,12 @@ _dwarf_elf_relocate(Dwarf_Debug dbg, Elf } memcpy(ed->ed_alloc, ed->ed_data->d_buf, ed->ed_data->d_size); - _dwarf_elf_apply_reloc(dbg, ed->ed_alloc, rel, - symtab_data, eh.e_ident[EI_DATA]); + if (sh.sh_type == SHT_REL) + _dwarf_elf_apply_rel_reloc(dbg, ed->ed_alloc, + rel, symtab_data, eh.e_ident[EI_DATA]); + else + _dwarf_elf_apply_rela_reloc(dbg, ed->ed_alloc, + rel, symtab_data, eh.e_ident[EI_DATA]); return (DW_DLE_NONE); } @@ -286,7 +301,7 @@ _dwarf_elf_init(Dwarf_Debug dbg, Elf *el } } - if (_libdwarf.applyrela) { + if (_libdwarf.applyreloc) { if (_dwarf_elf_relocate(dbg, elf, &e->eo_data[j], elf_ndxscn(scn), symtab_ndx, symtab_data, error) != DW_DLE_NONE) From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 03:16:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB74D51E; Thu, 12 Feb 2015 03:16:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95F079F6; Thu, 12 Feb 2015 03:16:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C3Gwvd096890; Thu, 12 Feb 2015 03:16:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C3GwAK096889; Thu, 12 Feb 2015 03:16:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120316.t1C3GwAK096889@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 03:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278612 - stable/10/contrib/binutils/gas/config X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 03:16:58 -0000 Author: ian Date: Thu Feb 12 03:16:57 2015 New Revision: 278612 URL: https://svnweb.freebsd.org/changeset/base/278612 Log: MFC r272519: Add movw and movt relocations to the list of relocations against function names that must not be adjusted. Modified: stable/10/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/10/contrib/binutils/gas/config/tc-arm.c Thu Feb 12 02:08:44 2015 (r278611) +++ stable/10/contrib/binutils/gas/config/tc-arm.c Thu Feb 12 03:16:57 2015 (r278612) @@ -19373,6 +19373,12 @@ arm_fix_adjustable (fixS * fixP) || fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0) return 0; + if (fixP->fx_r_type == BFD_RELOC_ARM_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_MOVT + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT) + return 0; + return 1; } #endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 03:50:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1410BCF7; Thu, 12 Feb 2015 03:50:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF16CDE1; Thu, 12 Feb 2015 03:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C3ofEj011980; Thu, 12 Feb 2015 03:50:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C3oYhs011479; Thu, 12 Feb 2015 03:50:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120350.t1C3oYhs011479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 03:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278613 - in stable/10: sys/arm/arm sys/arm/at91 sys/arm/cavium/cns11xx sys/arm/include sys/arm/s3c2xx0 sys/arm/xscale/i80321 sys/arm/xscale/i8134x sys/arm/xscale/ixp425 sys/arm/xscale/... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 03:50:42 -0000 Author: ian Date: Thu Feb 12 03:50:33 2015 New Revision: 278613 URL: https://svnweb.freebsd.org/changeset/base/278613 Log: MFC r271394, r271398: Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h. Unify interrupts bit definition and usage. While here remove PSR_C_bit. Modified: stable/10/sys/arm/arm/cpufunc_asm_sheeva.S stable/10/sys/arm/arm/cpufunc_asm_xscale.S stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fiq.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/arm/trap.c stable/10/sys/arm/arm/undefined.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/at91_aic.c stable/10/sys/arm/cavium/cns11xx/econa.c stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/atomic.h stable/10/sys/arm/s3c2xx0/s3c24x0.c stable/10/sys/arm/xscale/i80321/i80321_intr.h stable/10/sys/arm/xscale/i80321/i80321_timer.c stable/10/sys/arm/xscale/i80321/iq80321.c stable/10/sys/arm/xscale/i8134x/i81342.c stable/10/sys/arm/xscale/ixp425/ixp425.c stable/10/sys/arm/xscale/ixp425/ixp425_pci.c stable/10/sys/arm/xscale/ixp425/ixp425_timer.c stable/10/sys/arm/xscale/pxa/pxa_icu.c stable/10/sys/arm/xscale/pxa/pxa_timer.c stable/10/usr.bin/truss/arm-fbsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_sheeva.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_sheeva.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_sheeva.S Thu Feb 12 03:50:33 2015 (r278613) @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); @@ -42,7 +43,7 @@ __FBSDID("$FreeBSD$"); ENTRY(sheeva_setttb) /* Disable irqs */ mrs r2, cpsr - orr r3, r2, #I32_bit | F32_bit + orr r3, r2, #PSR_I | PSR_F msr cpsr_c, r3 mov r1, #0 @@ -87,7 +88,7 @@ ENTRY(sheeva_dcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -130,7 +131,7 @@ ENTRY(sheeva_idcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -182,7 +183,7 @@ ENTRY(sheeva_dcache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ @@ -225,7 +226,7 @@ ENTRY(sheeva_dcache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ @@ -268,7 +269,7 @@ ENTRY(sheeva_l2cache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -313,7 +314,7 @@ ENTRY(sheeva_l2cache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ @@ -356,7 +357,7 @@ ENTRY(sheeva_l2cache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -379,7 +380,7 @@ END(sheeva_l2cache_wb_range) ENTRY(sheeva_l2cache_wbinv_all) /* Disable irqs */ mrs r1, cpsr - orr r2, r1, #I32_bit | F32_bit + orr r2, r1, #PSR_I | PSR_F msr cpsr_c, r2 mov r0, #0 Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 12 03:50:33 2015 (r278613) @@ -71,7 +71,7 @@ * * XScale assembly functions for CPU / MMU / TLB specific operations */ - +#include #include __FBSDID("$FreeBSD$"); @@ -135,7 +135,7 @@ END(xscale_control) ENTRY(xscale_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access @@ -267,7 +267,7 @@ _C_LABEL(xscale_minidata_clean_size): #ifdef CACHE_CLEAN_BLOCK_INTR #define XSCALE_CACHE_CLEAN_BLOCK \ mrs r3, cpsr ; \ - orr r0, r3, #(I32_bit | F32_bit) ; \ + orr r0, r3, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 12 03:50:33 2015 (r278613) @@ -73,6 +73,7 @@ * XScale core 3 assembly functions for CPU / MMU / TLB specific operations */ +#include #include __FBSDID("$FreeBSD$"); @@ -122,7 +123,7 @@ __FBSDID("$FreeBSD$"); #define XSCALE_CACHE_CLEAN_BLOCK \ stmfd sp!, {r4} ; \ mrs r4, cpsr ; \ - orr r0, r4, #(I32_bit | F32_bit) ; \ + orr r0, r4, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ @@ -349,7 +350,7 @@ END(xscalec3_l2cache_flush_rng) ENTRY(xscalec3_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 03:50:33 2015 (r278613) @@ -244,12 +244,12 @@ __FBSDID("$FreeBSD$"); #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit|F32_bit) ;\ + orr r1, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit|F32_bit) ;\ + bic r4, r4, #(PSR_I|PSR_F) ;\ 1: GET_CURTHREAD_PTR(r5) ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ @@ -258,7 +258,7 @@ __FBSDID("$FreeBSD$"); msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit|F32_bit) ;\ + orr r0, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: @@ -382,7 +382,7 @@ END(irq_entry) */ ASENTRY_NP(fiq_entry) mrs r8, cpsr /* FIQ handling isn't supported, */ - bic r8, #(F32_bit) /* just disable FIQ and return. */ + bic r8, #(PSR_F) /* just disable FIQ and return. */ msr cpsr_c, r8 /* The r8 we trash here is the */ subs pc, lr, #4 /* banked FIQ-mode r8. */ END(fiq_entry) Modified: stable/10/sys/arm/arm/fiq.c ============================================================================== --- stable/10/sys/arm/arm/fiq.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/fiq.c Thu Feb 12 03:50:33 2015 (r278613) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -54,9 +55,6 @@ TAILQ_HEAD(, fiqhandler) fiqhandler_stac extern char *fiq_nullhandler_code; extern uint32_t fiq_nullhandler_size; -#define IRQ_BIT I32_bit -#define FIQ_BIT F32_bit - /* * fiq_installhandler: * @@ -102,7 +100,7 @@ fiq_claim(struct fiqhandler *fh) if (fh->fh_size > 0x100) return (EFBIG); - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { if ((ofh->fh_flags & FH_CANPUSH) == 0) { @@ -125,7 +123,7 @@ fiq_claim(struct fiqhandler *fh) fiq_installhandler(fh->fh_func, fh->fh_size); /* Make sure FIQs are enabled when we return. */ - oldirqstate &= ~FIQ_BIT; + oldirqstate &= ~PSR_F; out: restore_interrupts(oldirqstate); @@ -143,7 +141,7 @@ fiq_release(struct fiqhandler *fh) u_int oldirqstate; struct fiqhandler *ofh; - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); /* * If we are the currently active FIQ handler, then we @@ -167,7 +165,7 @@ fiq_release(struct fiqhandler *fh) fiq_installhandler(fiq_nullhandler_code, fiq_nullhandler_size); /* Make sure FIQs are disabled when we return. */ - oldirqstate |= FIQ_BIT; + oldirqstate |= PSR_F; } restore_interrupts(oldirqstate); Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/locore.S Thu Feb 12 03:50:33 2015 (r278613) @@ -106,7 +106,7 @@ ASENTRY_NP(_start) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 #if defined (FLASHADDR) && defined(LOADERRAMADDR) @@ -369,7 +369,7 @@ ASENTRY_NP(mpentry) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 /* Disable MMU. It should be disabled already, but make sure. */ @@ -447,7 +447,7 @@ ENTRY_NP(cpu_halt) mrs r2, cpsr bic r2, r2, #(PSR_MODE) orr r2, r2, #(PSR_SVC32_MODE) - orr r2, r2, #(I32_bit | F32_bit) + orr r2, r2, #(PSR_I | PSR_F) msr cpsr_fsxc, r2 ldr r4, .Lcpu_reset_address Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -619,7 +619,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) { - cspr = disable_interrupts(I32_bit | F32_bit); + cspr = disable_interrupts(PSR_I | PSR_F); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_cspr = cspr; } else @@ -746,7 +746,7 @@ sys_sigreturn(td, uap) */ spsr = uc.uc_mcontext.__gregs[_REG_CPSR]; if ((spsr & PSR_MODE) != PSR_USR32_MODE || - (spsr & (I32_bit | F32_bit)) != 0) + (spsr & (PSR_I | PSR_F)) != 0) return (EINVAL); /* Restore register context. */ set_mcontext(td, &uc.uc_mcontext); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/mp_machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -236,7 +237,7 @@ init_secondary(int cpu) for (int i = start; i <= end; i++) arm_unmask_irq(i); - enable_interrupts(I32_bit); + enable_interrupts(PSR_I); loop_counter = 0; while (smp_started == 0) { Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 03:50:33 2015 (r278613) @@ -241,10 +241,10 @@ data_abort_handler(struct trapframe *tf) pcb = td->td_pcb; /* Re-enable interrupts if they were enabled previously */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } @@ -446,7 +446,7 @@ dab_fatal(struct trapframe *tf, u_int fs mode = TRAP_USERMODE(tf) ? "user" : "kernel"; - disable_interrupts(I32_bit|F32_bit); + disable_interrupts(PSR_I|PSR_F); if (td != NULL) { printf("Fatal %s mode data abort: '%s'\n", mode, data_aborts[fsr & FAULT_TYPE_MASK].desc); @@ -656,10 +656,10 @@ prefetch_abort_handler(struct trapframe } fault_pc = tf->tf_pc; if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } /* Prefetch aborts cannot happen in kernel mode */ @@ -864,10 +864,10 @@ swi_handler(struct trapframe *frame) * be safe to enable them, but check anyway. */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(frame->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } syscall(td, frame); Modified: stable/10/sys/arm/arm/undefined.c ============================================================================== --- stable/10/sys/arm/arm/undefined.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/undefined.c Thu Feb 12 03:50:33 2015 (r278613) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -180,8 +181,10 @@ undefinedinstruction(struct trapframe *f ksiginfo_t ksi; /* Enable interrupts if they were enabled before the exception. */ - if (!(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit|F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); PCPU_INC(cnt.v_trap); Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -157,7 +157,7 @@ cpu_fork(register struct thread *td1, re sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td2; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; pcb2->un_32.pcb32_sp = (u_int)sf; @@ -327,7 +327,7 @@ cpu_set_syscall_retval(struct thread *td frame->tf_r0 = td->td_retval[0]; frame->tf_r1 = td->td_retval[1]; } - frame->tf_spsr &= ~PSR_C_bit; /* carry bit */ + frame->tf_spsr &= ~PSR_C; /* carry bit */ break; case ERESTART: /* @@ -340,7 +340,7 @@ cpu_set_syscall_retval(struct thread *td break; default: frame->tf_r0 = error; - frame->tf_spsr |= PSR_C_bit; /* carry bit */ + frame->tf_spsr |= PSR_C; /* carry bit */ break; } } @@ -365,7 +365,7 @@ cpu_set_upcall(struct thread *td, struct sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; td->td_pcb->un_32.pcb32_sp = (u_int)sf; KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/at91/at91.c Thu Feb 12 03:50:33 2015 (r278613) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #define _ARM32_BUS_DMA_PRIVATE #include #include @@ -303,7 +304,7 @@ at91_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: stable/10/sys/arm/at91/at91_aic.c ============================================================================== --- stable/10/sys/arm/at91/at91_aic.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/at91/at91_aic.c Thu Feb 12 03:50:33 2015 (r278613) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -149,7 +150,7 @@ at91_aic_attach(device_t dev) /* Disable and clear all interrupts. */ WR4(sc, IC_IDCR, 0xffffffff); WR4(sc, IC_ICCR, 0xffffffff); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (err); } Modified: stable/10/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/econa.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/cavium/cns11xx/econa.c Thu Feb 12 03:50:33 2015 (r278613) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include #include @@ -508,7 +509,7 @@ econa_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/armreg.h Thu Feb 12 03:50:33 2015 (r278613) @@ -44,21 +44,29 @@ #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ -#define PSR_USR26_MODE 0x00000000 -#define PSR_FIQ26_MODE 0x00000001 -#define PSR_IRQ26_MODE 0x00000002 -#define PSR_SVC26_MODE 0x00000003 #define PSR_USR32_MODE 0x00000010 #define PSR_FIQ32_MODE 0x00000011 #define PSR_IRQ32_MODE 0x00000012 #define PSR_SVC32_MODE 0x00000013 +#define PSR_MON32_MODE 0x00000016 #define PSR_ABT32_MODE 0x00000017 +#define PSR_HYP32_MODE 0x0000001a #define PSR_UND32_MODE 0x0000001b #define PSR_SYS32_MODE 0x0000001f #define PSR_32_MODE 0x00000010 -#define PSR_FLAGS 0xf0000000 /* flags */ - -#define PSR_C_bit (1 << 29) /* carry */ +#define PSR_T 0x00000020 /* Instruction set bit */ +#define PSR_F 0x00000040 /* FIQ disable bit */ +#define PSR_I 0x00000080 /* IRQ disable bit */ +#define PSR_A 0x00000100 /* Imprecise abort bit */ +#define PSR_E 0x00000200 /* Data endianess bit */ +#define PSR_GE 0x000f0000 /* Greater than or equal to bits */ +#define PSR_J 0x01000000 /* Java bit */ +#define PSR_Q 0x08000000 /* Sticky overflow bit */ +#define PSR_V 0x10000000 /* Overflow bit */ +#define PSR_C 0x20000000 /* Carry bit */ +#define PSR_Z 0x40000000 /* Zero bit */ +#define PSR_N 0x80000000 /* Negative bit */ +#define PSR_FLAGS 0xf0000000 /* Flags mask. */ /* The high-order byte is always the implementor */ #define CPU_ID_IMPLEMENTOR_MASK 0xff000000 @@ -235,16 +243,23 @@ #define CPU_CONTROL_SYST_ENABLE 0x00000100 /* S: System protection bit */ #define CPU_CONTROL_ROM_ENABLE 0x00000200 /* R: ROM protection bit */ #define CPU_CONTROL_CPCLK 0x00000400 /* F: Implementation defined */ +#define CPU_CONTROL_SW_ENABLE 0x00000400 /* SW: SWP instruction enable */ #define CPU_CONTROL_BPRD_ENABLE 0x00000800 /* Z: Branch prediction enable */ #define CPU_CONTROL_IC_ENABLE 0x00001000 /* I: IC enable */ #define CPU_CONTROL_VECRELOC 0x00002000 /* V: Vector relocation */ #define CPU_CONTROL_ROUNDROBIN 0x00004000 /* RR: Predictable replacement */ #define CPU_CONTROL_V4COMPAT 0x00008000 /* L4: ARMv4 compat LDR R15 etc */ +#define CPU_CONTROL_HAF_ENABLE 0x00020000 /* HA: Hardware Access Flag Enable */ #define CPU_CONTROL_FI_ENABLE 0x00200000 /* FI: Low interrupt latency */ #define CPU_CONTROL_UNAL_ENABLE 0x00400000 /* U: unaligned data access */ #define CPU_CONTROL_V6_EXTPAGE 0x00800000 /* XP: ARMv6 extended page tables */ +#define CPU_CONTROL_V_ENABLE 0x01000000 /* VE: Interrupt vectors enable */ +#define CPU_CONTROL_EX_BEND 0x02000000 /* EE: exception endianness */ #define CPU_CONTROL_L2_ENABLE 0x04000000 /* L2 Cache enabled */ -#define CPU_CONTROL_AF_ENABLE 0x20000000 /* Access Flag enable */ +#define CPU_CONTROL_NMFI 0x08000000 /* NMFI: Non maskable FIQ */ +#define CPU_CONTROL_TR_ENABLE 0x10000000 /* TRE: TEX Remap*/ +#define CPU_CONTROL_AF_ENABLE 0x20000000 /* AFE: Access Flag enable */ +#define CPU_CONTROL_TE_ENABLE 0x40000000 /* TE: Thumb Exception enable */ #define CPU_CONTROL_IDC_ENABLE CPU_CONTROL_DC_ENABLE @@ -361,6 +376,15 @@ #define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ #define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ +/* Fault status register definitions - v6+ */ +#define FSR_STATUS_TO_IDX(fsr) (((fsr) & 0xF) | \ + (((fsr) & (1 << 10)>> (10 - 4)))) +#define FSR_LPAE (1 << 9) /* LPAE indicator */ +#define FSR_WNR (1 << 11) /* Write-not-Read access */ +#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ +#define FSR_CM (1 << 13) /* Cache maintenance fault */ + + /* * Address of the vector page, low and high versions. */ Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 03:50:33 2015 (r278613) @@ -43,12 +43,6 @@ #define _C_LABEL(x) x #define _ASM_LABEL(x) x -#define I32_bit (1 << 7) /* IRQ disable */ -#define F32_bit (1 << 6) /* FIQ disable */ - -#define CPU_CONTROL_32BP_ENABLE 0x00000010 /* P: 32-bit exception handlers */ -#define CPU_CONTROL_32BD_ENABLE 0x00000020 /* D: 32-bit addressing */ - #ifndef _ALIGN_TEXT # define _ALIGN_TEXT .align 0 #endif Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/atomic.h Thu Feb 12 03:50:33 2015 (r278613) @@ -40,6 +40,7 @@ #define _MACHINE_ATOMIC_H_ #include +#include #ifndef _KERNEL #include @@ -67,12 +68,7 @@ #define wmb() dmb() #define rmb() dmb() -#ifndef I32_bit -#define I32_bit (1 << 7) /* IRQ disable */ -#endif -#ifndef F32_bit -#define F32_bit (1 << 6) /* FIQ disable */ -#endif + /* * It would be nice to use _HAVE_ARMv6_INSTRUCTIONS from machine/asm.h @@ -702,7 +698,7 @@ atomic_store_rel_long(volatile u_long *p "orr %1, %0, %2;" \ "msr cpsr_fsxc, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit | F32_bit) \ + : "I" (PSR_I | PSR_F) \ : "cc" ); \ (expr); \ __asm __volatile( \ Modified: stable/10/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/s3c2xx0/s3c24x0.c Thu Feb 12 03:50:33 2015 (r278613) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -638,7 +639,7 @@ s3c24x0_clock_freq(struct s3c2xx0_softc void cpu_reset(void) { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, WTCON_ENABLE | WTCON_CLKSEL_16 | WTCON_ENRST); Modified: stable/10/sys/arm/xscale/i80321/i80321_intr.h ============================================================================== --- stable/10/sys/arm/xscale/i80321/i80321_intr.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/i80321_intr.h Thu Feb 12 03:50:33 2015 (r278613) @@ -106,7 +106,7 @@ i80321_splx(int new) hwpend = (i80321_ipending & ICU_INT_HWMASK) & ~new; if (hwpend != 0) { - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); intr_enabled |= hwpend; i80321_set_intrmask(); restore_interrupts(oldirqstate); Modified: stable/10/sys/arm/xscale/i80321/i80321_timer.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/i80321_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/i80321_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -381,7 +382,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, #ifdef CPU_XSCALE_81342 Modified: stable/10/sys/arm/xscale/i80321/iq80321.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/iq80321.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/iq80321.c Thu Feb 12 03:50:33 2015 (r278613) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -325,7 +326,7 @@ arm_unmask_irq(uintptr_t nb) void cpu_reset() { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); *(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; printf("Reset failed!\n"); Modified: stable/10/sys/arm/xscale/i8134x/i81342.c ============================================================================== --- stable/10/sys/arm/xscale/i8134x/i81342.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i8134x/i81342.c Thu Feb 12 03:50:33 2015 (r278613) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include @@ -248,7 +249,7 @@ void cpu_reset(void) { - disable_interrupts(I32_bit); + disable_interrupts(PSR_I); /* XXX: Use the watchdog to reset for now */ __asm __volatile("mcr p6, 0, %0, c8, c9, 0\n" "mcr p6, 0, %1, c7, c9, 0\n" Modified: stable/10/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425.c Thu Feb 12 03:50:33 2015 (r278613) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -202,7 +203,7 @@ arm_mask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled &= ~(1 << nb); ixp425_set_intrmask(); @@ -220,7 +221,7 @@ arm_unmask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled |= (1 << nb); ixp425_set_intrmask(); Modified: stable/10/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425_pci.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425_pci.c Thu Feb 12 03:50:33 2015 (r278613) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -70,7 +71,7 @@ extern struct ixp425_softc *ixp425_softc #define PCI_CSR_READ_4(sc, reg) \ bus_read_4(sc->sc_csr, reg) -#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit) +#define PCI_CONF_LOCK(s) (s) = disable_interrupts(PSR_I) #define PCI_CONF_UNLOCK(s) restore_interrupts((s)) static device_probe_t ixppcib_probe; Modified: stable/10/sys/arm/xscale/ixp425/ixp425_timer.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -175,7 +176,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, IXP425_INT_TMR0, IXP425_INT_TMR0, 1, RF_ACTIVE); Modified: stable/10/sys/arm/xscale/pxa/pxa_icu.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_icu.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/pxa/pxa_icu.c Thu Feb 12 03:50:33 2015 (r278613) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -105,7 +106,7 @@ pxa_icu_attach(device_t dev) pxa_icu_set_iclr(0); /* XXX: This should move to configure_final or something. */ - enable_interrupts(I32_bit|F32_bit); + enable_interrupts(PSR_I|PSR_F); return (0); } Modified: stable/10/sys/arm/xscale/pxa/pxa_timer.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/pxa/pxa_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -190,7 +191,7 @@ cpu_reset(void) { uint32_t val; - (void)disable_interrupts(I32_bit|F32_bit); + (void)disable_interrupts(PSR_I|PSR_F); val = pxa_timer_get_oscr(); val += PXA_TIMER_FREQUENCY; Modified: stable/10/usr.bin/truss/arm-fbsd.c ============================================================================== --- stable/10/usr.bin/truss/arm-fbsd.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/usr.bin/truss/arm-fbsd.c Thu Feb 12 03:50:33 2015 (r278613) @@ -316,7 +316,7 @@ arm_syscall_exit(struct trussinfo *truss } retval = regs.r[0]; - errorp = !!(regs.r_cpsr & PSR_C_bit); + errorp = !!(regs.r_cpsr & PSR_C); /* * This code, while simpler than the initial versions I used, could From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 04:16:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E2C399; Thu, 12 Feb 2015 04:16:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 003DFFC3; Thu, 12 Feb 2015 04:16:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C4G0Qf025024; Thu, 12 Feb 2015 04:16:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C4FuXM024991; Thu, 12 Feb 2015 04:15:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120415.t1C4FuXM024991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 04:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278614 - in stable/10: gnu/usr.bin/gdb/kgdb sys/arm/arm sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 04:16:01 -0000 Author: ian Date: Thu Feb 12 04:15:55 2015 New Revision: 278614 URL: https://svnweb.freebsd.org/changeset/base/278614 Log: MFC r276187, r276190, r271422: Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function. Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Cleanup up ARM *frame structures. Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c stable/10/sys/arm/arm/db_trace.c stable/10/sys/arm/arm/dump_machdep.c stable/10/sys/arm/arm/gdb_machdep.c stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/minidump_machdep.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/arm/arm/stack_machdep.c stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/include/db_machdep.h stable/10/sys/arm/include/frame.h stable/10/sys/arm/include/pcb.h stable/10/sys/arm/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c ============================================================================== --- stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c Thu Feb 12 04:15:55 2015 (r278614) @@ -68,20 +68,12 @@ kgdb_trgt_fetch_registers(int regno __un warnx("kvm_read: %s", kvm_geterr(kvm)); memset(&pcb, 0, sizeof(pcb)); } - for (i = ARM_A1_REGNUM + 8; i <= ARM_SP_REGNUM; i++) { - supply_register(i, (char *)&pcb.un_32.pcb32_r8 + - (i - (ARM_A1_REGNUM + 8 )) * 4); - } - if (pcb.un_32.pcb32_sp != 0) { - for (i = 0; i < 4; i++) { - if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, - ®, 4) != 4) { - warnx("kvm_read: %s", kvm_geterr(kvm)); - break; - } - supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); - } - if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) + for (i = ARM_A1_REGNUM + 4; i <= ARM_SP_REGNUM; i++) { + supply_register(i, (char *)&pcb.pcb_regs.sf_r4 + + (i - (ARM_A1_REGNUM + 4 )) * 4); + } + if (pcb.pcb_regs.sf_sp != 0) { + if (kvm_read(kvm, pcb.pcb_regs.sf_sp + 4 * 4, ®, 4) != 4) warnx("kvm_read :%s", kvm_geterr(kvm)); else supply_register(ARM_PC_REGNUM, (char *)®); Modified: stable/10/sys/arm/arm/db_trace.c ============================================================================== --- stable/10/sys/arm/arm/db_trace.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/db_trace.c Thu Feb 12 04:15:55 2015 (r278614) @@ -603,14 +603,14 @@ db_trace_thread(struct thread *thr, int ctx = kdb_thr_ctx(thr); #ifdef __ARM_EABI__ - state.registers[FP] = ctx->un_32.pcb32_r11; - state.registers[SP] = ctx->un_32.pcb32_sp; - state.registers[LR] = ctx->un_32.pcb32_lr; - state.registers[PC] = ctx->un_32.pcb32_pc; + state.registers[FP] = ctx->pcb_regs.sf_r11; + state.registers[SP] = ctx->pcb_regs.sf_sp; + state.registers[LR] = ctx->pcb_regs.sf_lr; + state.registers[PC] = ctx->pcb_regs.sf_pc; db_stack_trace_cmd(&state); #else - db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE); + db_stack_trace_cmd(ctx->pcb_regs.sf_r11, -1, TRUE); #endif } else db_trace_self(); Modified: stable/10/sys/arm/arm/dump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/dump_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/dump_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -161,11 +161,13 @@ static int cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; - vm_paddr_t pa; + vm_paddr_t a, pa; + void *va; uint32_t pgs; size_t counter, sz, chunk; - int c, error; + int i, c, error; + va = 0; error = 0; /* catch case in which chunk size is 0 */ counter = 0; pgs = mdp->md_size / PAGE_SIZE; @@ -195,16 +197,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" %d", pgs * PAGE_SIZE); counter &= (1<<24) - 1; } - if (pa == (pa & L1_ADDR_BITS)) { - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); - cpu_tlb_flushID_SE(0); - cpu_cpwait(); + for (i = 0; i < chunk; i++) { + a = pa + i * PAGE_SIZE; + va = pmap_kenter_temporary(trunc_page(a), i); } #ifdef SW_WATCHDOG wdog_kern_pat(WD_LASTVAL); #endif - error = dump_write(di, - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz; Modified: stable/10/sys/arm/arm/gdb_machdep.c ============================================================================== --- stable/10/sys/arm/arm/gdb_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/gdb_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -67,22 +67,26 @@ gdb_cpu_getreg(int regnum, size_t *regsz } switch (regnum) { - case 8: return (&kdb_thrctx->un_32.pcb32_r8); - case 9: return (&kdb_thrctx->un_32.pcb32_r9); - case 10: return (&kdb_thrctx->un_32.pcb32_r10); - case 11: return (&kdb_thrctx->un_32.pcb32_r11); - case 12: return (&kdb_thrctx->un_32.pcb32_r12); - case 13: stacktest = kdb_thrctx->un_32.pcb32_sp + 5 * 4; + case 4: return (&kdb_thrctx->pcb_regs.sf_r4); + case 5: return (&kdb_thrctx->pcb_regs.sf_r5); + case 6: return (&kdb_thrctx->pcb_regs.sf_r6); + case 7: return (&kdb_thrctx->pcb_regs.sf_r7); + case 8: return (&kdb_thrctx->pcb_regs.sf_r8); + case 9: return (&kdb_thrctx->pcb_regs.sf_r9); + case 10: return (&kdb_thrctx->pcb_regs.sf_r10); + case 11: return (&kdb_thrctx->pcb_regs.sf_r11); + case 12: return (&kdb_thrctx->pcb_regs.sf_r12); + case 13: stacktest = kdb_thrctx->pcb_regs.sf_sp + 5 * 4; return (&stacktest); case 15: /* * On context switch, the PC is not put in the PCB, but * we can retrieve it from the stack. */ - if (kdb_thrctx->un_32.pcb32_sp > KERNBASE) { - kdb_thrctx->un_32.pcb32_pc = *(register_t *) - (kdb_thrctx->un_32.pcb32_sp + 4 * 4); - return (&kdb_thrctx->un_32.pcb32_pc); + if (kdb_thrctx->pcb_regs.sf_sp > KERNBASE) { + kdb_thrctx->pcb_regs.sf_pc = *(register_t *) + (kdb_thrctx->pcb_regs.sf_sp + 4 * 4); + return (&kdb_thrctx->pcb_regs.sf_pc); } } Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/genassym.c Thu Feb 12 04:15:55 2015 (r278614) @@ -63,13 +63,18 @@ ASSYM(PCB_FLAGS, offsetof(struct pcb, pc ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); -ASSYM(PCB_R8, offsetof(struct pcb, un_32.pcb32_r8)); -ASSYM(PCB_R9, offsetof(struct pcb, un_32.pcb32_r9)); -ASSYM(PCB_R10, offsetof(struct pcb, un_32.pcb32_r10)); -ASSYM(PCB_R11, offsetof(struct pcb, un_32.pcb32_r11)); -ASSYM(PCB_R12, offsetof(struct pcb, un_32.pcb32_r12)); -ASSYM(PCB_PC, offsetof(struct pcb, un_32.pcb32_pc)); -ASSYM(PCB_SP, offsetof(struct pcb, un_32.pcb32_sp)); +ASSYM(PCB_R4, offsetof(struct pcb, pcb_regs.sf_r4)); +ASSYM(PCB_R5, offsetof(struct pcb, pcb_regs.sf_r5)); +ASSYM(PCB_R6, offsetof(struct pcb, pcb_regs.sf_r6)); +ASSYM(PCB_R7, offsetof(struct pcb, pcb_regs.sf_r7)); +ASSYM(PCB_R8, offsetof(struct pcb, pcb_regs.sf_r8)); +ASSYM(PCB_R9, offsetof(struct pcb, pcb_regs.sf_r9)); +ASSYM(PCB_R10, offsetof(struct pcb, pcb_regs.sf_r10)); +ASSYM(PCB_R11, offsetof(struct pcb, pcb_regs.sf_r11)); +ASSYM(PCB_R12, offsetof(struct pcb, pcb_regs.sf_r12)); +ASSYM(PCB_SP, offsetof(struct pcb, pcb_regs.sf_sp)); +ASSYM(PCB_LR, offsetof(struct pcb, pcb_regs.sf_lr)); +ASSYM(PCB_PC, offsetof(struct pcb, pcb_regs.sf_pc)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -376,7 +376,7 @@ cpu_startup(void *dummy) bufinit(); vm_pager_bufferinit(); - pcb->un_32.pcb32_sp = (u_int)thread0.td_kstack + + pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); @@ -768,14 +768,18 @@ sys_sigreturn(td, uap) void makectx(struct trapframe *tf, struct pcb *pcb) { - pcb->un_32.pcb32_r8 = tf->tf_r8; - pcb->un_32.pcb32_r9 = tf->tf_r9; - pcb->un_32.pcb32_r10 = tf->tf_r10; - pcb->un_32.pcb32_r11 = tf->tf_r11; - pcb->un_32.pcb32_r12 = tf->tf_r12; - pcb->un_32.pcb32_pc = tf->tf_pc; - pcb->un_32.pcb32_lr = tf->tf_usr_lr; - pcb->un_32.pcb32_sp = tf->tf_usr_sp; + pcb->pcb_regs.sf_r4 = tf->tf_r4; + pcb->pcb_regs.sf_r5 = tf->tf_r5; + pcb->pcb_regs.sf_r6 = tf->tf_r6; + pcb->pcb_regs.sf_r7 = tf->tf_r7; + pcb->pcb_regs.sf_r8 = tf->tf_r8; + pcb->pcb_regs.sf_r9 = tf->tf_r9; + pcb->pcb_regs.sf_r10 = tf->tf_r10; + pcb->pcb_regs.sf_r11 = tf->tf_r11; + pcb->pcb_regs.sf_r12 = tf->tf_r12; + pcb->pcb_regs.sf_pc = tf->tf_pc; + pcb->pcb_regs.sf_lr = tf->tf_usr_lr; + pcb->pcb_regs.sf_sp = tf->tf_usr_sp; } /* Modified: stable/10/sys/arm/arm/minidump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/minidump_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/minidump_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -154,7 +154,7 @@ blk_write(struct dumperinfo *di, char *p sz -= len; } else { for (i = 0; i < len; i += PAGE_SIZE) - dump_va = pmap_kenter_temp(pa + i, + dump_va = pmap_kenter_temporary(pa + i, (i + fragsz) >> PAGE_SHIFT); fragsz += len; pa += len; @@ -244,7 +244,7 @@ minidumpsys(struct dumperinfo *di) } if (pmap_pde_v(pdp) && pmap_pde_page(pdp)) { /* Set bit for each valid page in this 1MB block */ - addr = pmap_kenter_temp(*pdp & L1_C_ADDR_MASK, 0); + addr = pmap_kenter_temporary(*pdp & L1_C_ADDR_MASK, 0); pt = (pt_entry_t*)(addr + (((uint32_t)*pdp & L1_C_ADDR_MASK) & PAGE_MASK)); for (k = 0; k < 256; k++) { Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/pmap-v6.c Thu Feb 12 04:15:55 2015 (r278614) @@ -2371,7 +2371,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/pmap.c Thu Feb 12 04:15:55 2015 (r278614) @@ -2666,7 +2666,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: stable/10/sys/arm/arm/stack_machdep.c ============================================================================== --- stable/10/sys/arm/arm/stack_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/stack_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -76,7 +76,7 @@ stack_save_td(struct stack *st, struct t * as it doesn't have a frame pointer, however it's value is not used * when building for EABI. */ - frame = (u_int32_t *)td->td_pcb->un_32.pcb32_r11; + frame = (u_int32_t *)td->td_pcb->pcb_regs.sf_r11; stack_zero(st); stack_capture(st, frame); } Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/swtch.S Thu Feb 12 04:15:55 2015 (r278614) @@ -116,6 +116,14 @@ __FBSDID("$FreeBSD$"); .Lblocked_lock: .word _C_LABEL(blocked_lock) +/* + * cpu_throw(oldtd, newtd) + * + * Remove current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + */ ENTRY(cpu_throw) mov r5, r1 @@ -144,7 +152,6 @@ ENTRY(cpu_throw) * r0 = Pointer to L1 slot for vector_page (or NULL) * r1 = lwp0's DACR * r5 = lwp0 - * r6 = exit func * r7 = lwp0's PCB * r9 = cpufuncs */ @@ -181,25 +188,11 @@ ENTRY(cpu_throw) mov lr, pc ldr pc, [r9, #CF_CONTEXT_SWITCH] - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r1, r7, #PCB_R8 - ldmia r1, {r8-r13} -#else - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - GET_PCPU(r6, r4) /* Hook in a new pcb */ str r7, [r6, #PC_CURPCB] /* We have a new curthread now so make a note it */ - add r6, r6, #PC_CURTHREAD - str r5, [r6] + str r5, [r6, #PC_CURTHREAD] #ifndef ARM_TP_ADDRESS mcr p15, 0, r5, c13, c0, 4 #endif @@ -215,22 +208,31 @@ ENTRY(cpu_throw) #else mcr p15, 0, r6, c13, c0, 3 #endif - - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + /* Restore all the saved registers and exit */ + add r3, r7, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_throw) +/* + * cpu_switch(oldtd, newtd, lock) + * + * Save the current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + * r2 = lock (new lock for old thread) + */ ENTRY(cpu_switch) - stmfd sp!, {r4-r7, lr} - sub sp, sp, #4; -#ifdef __ARM_EABI__ - .save {r4-r7, lr} - .pad #4 -#endif + /* Interrupts are disabled. */ + /* Save all the registers in the old thread's pcb. */ + ldr r3, [r0, #(TD_PCB)] + + /* Restore all the saved registers and exit */ + add r3, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} mov r6, r2 /* Save the mutex */ -.Lswitch_resume: /* rem: r0 = old lwp */ /* rem: interrupts are disabled */ @@ -246,30 +248,12 @@ ENTRY(cpu_switch) ldr r2, [r1, #TD_PCB] str r2, [r7, #PC_CURPCB] - /* rem: r1 = new process */ - /* rem: interrupts are enabled */ - /* Stage two : Save old context */ /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old thread's pcb */ -#ifndef _ARM_ARCH_5E - add r7, r2, #(PCB_R8) - stmia r7, {r8-r13} -#else - strd r8, [r2, #(PCB_R8)] - strd r10, [r2, #(PCB_R10)] - strd r12, [r2, #(PCB_R12)] -#endif - str pc, [r2, #(PCB_PC)] - - /* - * NOTE: We can now use r8-r13 until it is time to restore - * them for the new process. - */ #ifdef ARM_TP_ADDRESS /* Store the old tp */ ldr r3, =ARM_TP_ADDRESS @@ -318,7 +302,6 @@ ENTRY(cpu_switch) /* rem: r2 = old PCB */ /* rem: r9 = new PCB */ - /* rem: interrupts are enabled */ ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ mov r2, #DOMAIN_CLIENT @@ -336,7 +319,6 @@ ENTRY(cpu_switch) mrc p15, 0, r10, c2, c0, 0 /* r10 = old L1 */ ldr r11, [r9, #(PCB_PAGEDIR)] /* r11 = new L1 */ - teq r10, r11 /* Same L1? */ cmpeq r0, r5 /* Same DACR? */ beq .Lcs_context_switched /* yes! */ @@ -426,54 +408,18 @@ ENTRY(cpu_switch) /* rem: r9 = new PCB */ - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r7, r9, #PCB_R8 - ldmia r7, {r8-r13} - sub r7, r7, #PCB_R8 /* restore PCB pointer */ -#else - mov r7, r9 - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - - /* rem: r5 = new lwp's proc */ - /* rem: r6 = lock */ - /* rem: r7 = new PCB */ - -.Lswitch_return: - - /* - * Pull the registers that got pushed when either savectx() or - * cpu_switch() was called and return. - */ - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} -#ifdef DIAGNOSTIC -.Lswitch_bogons: - adr r0, .Lswitch_panic_str - bl _C_LABEL(panic) -1: nop - b 1b - -.Lswitch_panic_str: - .asciz "cpu_switch: sched_qs empty with non-zero sched_whichqs!\n" -#endif + /* Restore all the saved registers and exit */ + add r3, r9, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_switch) ENTRY(savectx) - stmfd sp!, {r4-r7, lr} + stmfd sp!, {lr} sub sp, sp, #4 - /* - * r0 = pcb - */ - /* Store all the registers in the process's pcb */ - add r2, r0, #(PCB_R8) - stmia r2, {r8-r13} + + /* Store all the registers in the thread's pcb */ + add r3, r0, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} #ifdef VFP fmrx r2, fpexc /* If the VFP is enabled */ tst r2, #(VFPEXC_EN) /* the current thread has */ @@ -482,7 +428,7 @@ ENTRY(savectx) blne _C_LABEL(vfp_store) /* and disable the VFP. */ #endif add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + ldmfd sp!, {pc} END(savectx) ENTRY(fork_trampoline) Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 04:15:55 2015 (r278614) @@ -565,7 +565,7 @@ dab_buserr(struct trapframe *tf, u_int f * If the current trapframe is at the top of the kernel stack, * the fault _must_ have come from user mode. */ - if (tf != ((struct trapframe *)pcb->un_32.pcb32_sp) - 1) { + if (tf != ((struct trapframe *)pcb->pcb_regs.sf_sp) - 1) { /* * Kernel mode. We're either about to die a * spectacular death, or pcb_onfault will come Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); * struct switchframe and trapframe must both be a multiple of 8 * for correct stack alignment. */ -CTASSERT(sizeof(struct switchframe) == 24); +CTASSERT(sizeof(struct switchframe) == 48); CTASSERT(sizeof(struct trapframe) == 80); #ifndef NSFBUFS @@ -130,43 +130,55 @@ cpu_fork(register struct thread *td1, re { struct pcb *pcb2; struct trapframe *tf; - struct switchframe *sf; struct mdproc *mdp2; if ((flags & RFPROC) == 0) return; - pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; + + /* Point the pcb to the top of the stack */ + pcb2 = (struct pcb *) + (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE); #endif #endif td2->td_pcb = pcb2; + + /* Clone td1's pcb */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); + + /* Point to mdproc and then copy over td1's contents */ mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_sp = td2->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(*pcb2); + + /* Point the frame to the stack in front of pcb and copy td1's frame */ + td2->td_frame = (struct trapframe *)pcb2 - 1; + *td2->td_frame = *td1->td_frame; + + /* + * Create a new fresh stack for the new process. + * Copy the trap frame for the return to user mode as if from a + * syscall. This copies most of the user mode register values. + */ + pmap_set_pcb_pagedir(vmspace_pmap(p2->p_vmspace), pcb2); + pcb2->pcb_regs.sf_r4 = (register_t)fork_return; + pcb2->pcb_regs.sf_r5 = (register_t)td2; + pcb2->pcb_regs.sf_lr = (register_t)fork_trampoline; + pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); + pcb2->pcb_vfpcpu = -1; pcb2->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ; - pmap_activate(td2); - td2->td_frame = tf = (struct trapframe *)STACKALIGN( - pcb2->un_32.pcb32_sp - sizeof(struct trapframe)); - *tf = *td1->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td2; - sf->sf_pc = (u_int)fork_trampoline; + + tf = td2->td_frame; tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; - pcb2->un_32.pcb32_sp = (u_int)sf; - KASSERT((pcb2->un_32.pcb32_sp & 7) == 0, - ("cpu_fork: Incorrect stack alignment")); + /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; - td2->td_md.md_saved_cspr = 0; + td2->td_md.md_saved_cspr = PSR_SVC32_MODE;; #ifdef ARM_TP_ADDRESS td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #else @@ -355,25 +367,21 @@ cpu_set_syscall_retval(struct thread *td void cpu_set_upcall(struct thread *td, struct thread *td0) { - struct trapframe *tf; - struct switchframe *sf; bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); bcopy(td0->td_pcb, td->td_pcb, sizeof(struct pcb)); - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td; - sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C; - tf->tf_r0 = 0; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_upcall: Incorrect stack alignment")); + + td->td_pcb->pcb_regs.sf_r4 = (register_t)fork_return; + td->td_pcb->pcb_regs.sf_r5 = (register_t)td; + td->td_pcb->pcb_regs.sf_lr = (register_t)fork_trampoline; + td->td_pcb->pcb_regs.sf_sp = STACKALIGN(td->td_frame); + + td->td_frame->tf_spsr &= ~PSR_C; + td->td_frame->tf_r0 = 0; /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_cspr = 0; + td->td_md.md_saved_cspr = PSR_SVC32_MODE; } /* @@ -387,8 +395,7 @@ cpu_set_upcall_kse(struct thread *td, vo { struct trapframe *tf = td->td_frame; - tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size - - sizeof(struct trapframe)); + tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size); tf->tf_pc = (int)entry; tf->tf_r0 = (int)arg; tf->tf_spsr = PSR_USR32_MODE; @@ -426,9 +433,8 @@ cpu_thread_alloc(struct thread *td) * placed into the stack pointer which must be 8 byte aligned in * the ARM EABI. */ - td->td_frame = (struct trapframe *)STACKALIGN((u_int)td->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(struct pcb) - - sizeof(struct trapframe)); + td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb) - 1; + #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); @@ -455,16 +461,8 @@ cpu_thread_clean(struct thread *td) void cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) { - struct switchframe *sf; - struct trapframe *tf; - - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)func; - sf->sf_r5 = (u_int)arg; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_fork_handler: Incorrect stack alignment")); + td->td_pcb->pcb_regs.sf_r4 = (register_t)func; /* function */ + td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */ } /* Modified: stable/10/sys/arm/include/db_machdep.h ============================================================================== --- stable/10/sys/arm/include/db_machdep.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/db_machdep.h Thu Feb 12 04:15:55 2015 (r278614) @@ -38,7 +38,7 @@ typedef vm_offset_t db_addr_t; typedef int db_expr_t; -#define PC_REGS() ((db_addr_t)kdb_thrctx->un_32.pcb32_pc) +#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs.sf_pc) #define BKPT_INST (KERNEL_BREAKPOINT) #define BKPT_SIZE (INSN_SIZE) Modified: stable/10/sys/arm/include/frame.h ============================================================================== --- stable/10/sys/arm/include/frame.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/frame.h Thu Feb 12 04:15:55 2015 (r278614) @@ -86,57 +86,16 @@ struct trapframe { #define tf_r13 tf_usr_sp #define tf_r14 tf_usr_lr #define tf_r15 tf_pc -/* - * * Scheduler activations upcall frame. Pushed onto user stack before - * * calling an SA upcall. - * */ - -struct saframe { -#if 0 /* in registers on entry to upcall */ - int sa_type; - struct sa_t ** sa_sas; - int sa_events; - int sa_interrupted; -#endif - void * sa_arg; -}; /* - * * Signal frame. Pushed onto user stack before calling sigcode. - * */ - -/* the pointers are use in the trampoline code to locate the ucontext */ + * Signal frame. Pushed onto user stack before calling sigcode. + * The pointers are used in the trampoline code to locate the ucontext. + */ struct sigframe { - siginfo_t sf_si; /* actual saved siginfo */ + siginfo_t sf_si; /* actual saved siginfo */ ucontext_t sf_uc; /* actual saved ucontext */ }; -/* - * System stack frames. - */ - - -typedef struct irqframe { - unsigned int if_spsr; - unsigned int if_r0; - unsigned int if_r1; - unsigned int if_r2; - unsigned int if_r3; - unsigned int if_r4; - unsigned int if_r5; - unsigned int if_r6; - unsigned int if_r7; - unsigned int if_r8; - unsigned int if_r9; - unsigned int if_r10; - unsigned int if_r11; - unsigned int if_r12; - unsigned int if_usr_sp; - unsigned int if_usr_lr; - unsigned int if_svc_sp; - unsigned int if_svc_lr; - unsigned int if_pc; -} irqframe_t; /* * Switch frame. @@ -144,16 +103,23 @@ typedef struct irqframe { * It is important this is a multiple of 8 bytes so the stack is correctly * aligned when we create new threads. */ - -struct switchframe { - u_int pad; /* Used to pad the struct to a multiple of 8-bytes */ - u_int sf_r4; - u_int sf_r5; - u_int sf_r6; - u_int sf_r7; - u_int sf_pc; +struct switchframe +{ + register_t sf_r4; + register_t sf_r5; + register_t sf_r6; + register_t sf_r7; + register_t sf_r8; + register_t sf_r9; + register_t sf_r10; + register_t sf_r11; + register_t sf_r12; + register_t sf_sp; + register_t sf_lr; + register_t sf_pc; }; + /* * Stack frame. Used during stack traces (db_trace.c) */ Modified: stable/10/sys/arm/include/pcb.h ============================================================================== --- stable/10/sys/arm/include/pcb.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/pcb.h Thu Feb 12 04:15:55 2015 (r278614) @@ -39,50 +39,29 @@ #define _MACHINE_PCB_H_ #include +#include -struct trapframe; - -struct pcb_arm32 { - vm_offset_t pcb32_pagedir; /* PT hooks */ - uint32_t *pcb32_pl1vec; /* PTR to vector_base L1 entry*/ - uint32_t pcb32_l1vec; /* Value to stuff on ctx sw */ - u_int pcb32_dacr; /* Domain Access Control Reg */ - /* - * WARNING! - * cpuswitch.S relies on pcb32_r8 being quad-aligned in struct pcb - * (due to the use of "strd" when compiled for XSCALE) - */ - u_int pcb32_r8; /* used */ - u_int pcb32_r9; /* used */ - u_int pcb32_r10; /* used */ - u_int pcb32_r11; /* used */ - u_int pcb32_r12; /* used */ - u_int pcb32_sp; /* used */ - u_int pcb32_lr; - u_int pcb32_pc; -}; -#define pcb_pagedir un_32.pcb32_pagedir -#define pcb_pl1vec un_32.pcb32_pl1vec -#define pcb_l1vec un_32.pcb32_l1vec -#define pcb_dacr un_32.pcb32_dacr -#define pcb_cstate un_32.pcb32_cstate - /* * WARNING! - * See warning for struct pcb_arm32, above, before changing struct pcb! + * Keep pcb_regs first for faster access in switch.S */ struct pcb { + struct switchframe pcb_regs; /* CPU state */ u_int pcb_flags; #define PCB_OWNFPU 0x00000001 #define PCB_NOALIGNFLT 0x00000002 caddr_t pcb_onfault; /* On fault handler */ - struct pcb_arm32 un_32; + vm_offset_t pcb_pagedir; /* PT hooks */ + uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/ + uint32_t pcb_l1vec; /* Value to stuff on ctx sw */ + u_int pcb_dacr; /* Domain Access Control Reg */ + struct vfp_state pcb_vfpstate; /* VP/NEON state */ u_int pcb_vfpcpu; /* VP/NEON last cpu */ } __aligned(8); /* * We need the PCB to be aligned on 8 bytes, as we may - * access it using ldrd/strd, and some CPUs require it + * access it using ldrd/strd, and ARM ABI require it * to by aligned on 8 bytes. */ Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/pmap.h Thu Feb 12 04:15:55 2015 (r278614) @@ -256,7 +256,7 @@ int pmap_change_attr(vm_offset_t, vm_siz void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_device(vm_offset_t va, vm_paddr_t pa); -void *pmap_kenter_temp(vm_paddr_t pa, int i); +void *pmap_kenter_temporary(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 04:31:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E769FE; Thu, 12 Feb 2015 04:31:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 594D61EC; Thu, 12 Feb 2015 04:31:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C4VIm3031287; Thu, 12 Feb 2015 04:31:18 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C4VIVD031286; Thu, 12 Feb 2015 04:31:18 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502120431.t1C4VIVD031286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 12 Feb 2015 04:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278615 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 04:31:18 -0000 Author: gonzo Date: Thu Feb 12 04:31:17 2015 New Revision: 278615 URL: https://svnweb.freebsd.org/changeset/base/278615 Log: - Perform bus_dmamap_sync on pagelist structure - Wire pages of bulk transfer buffer when preparing pagelist Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Thu Feb 12 04:15:55 2015 (r278614) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Thu Feb 12 04:31:17 2015 (r278615) @@ -353,6 +353,16 @@ vchiq_platform_handle_timeout(VCHIQ_STAT * Local functions */ +static void +pagelist_page_free(vm_page_t pp) +{ + vm_page_lock(pp); + vm_page_unwire(pp, PQ_INACTIVE); + if (pp->wire_count == 0 && pp->object == NULL) + vm_page_free(pp); + vm_page_unlock(pp); +} + /* There is a potential problem with partial cache lines (pages?) ** at the ends of the block when reading. If the CPU accessed anything in ** the same line (page?) then it may have pulled old data into the cache, @@ -406,8 +416,6 @@ create_pagelist(char __user *buf, size_t NULL, NULL, /* lockfunc, lockarg */ &bi->pagelist_dma_tag); - - err = bus_dmamem_alloc(bi->pagelist_dma_tag, (void **)&pagelist, BUS_DMA_COHERENT | BUS_DMA_WAITOK, &bi->pagelist_dma_map); if (err) { @@ -444,6 +452,13 @@ create_pagelist(char __user *buf, size_t return (-ENOMEM); } + for (i = 0; i < actual_pages; i++) { + vm_page_lock(pages[i]); + vm_page_wire(pages[i]); + vm_page_unhold(pages[i]); + vm_page_unlock(pages[i]); + } + pagelist->length = count; pagelist->type = type; pagelist->offset = offset; @@ -496,9 +511,10 @@ create_pagelist(char __user *buf, size_t g_fragments_base); } - /* XXX: optimize? INV operation for read WBINV for write? */ cpu_dcache_wbinv_range((vm_offset_t)buf, count); + bus_dmamap_sync(bi->pagelist_dma_tag, bi->pagelist_dma_map, BUS_DMASYNC_PREWRITE); + bi->pagelist = pagelist; return 0; @@ -563,12 +579,12 @@ free_pagelist(BULKINFO_T *bi, int actual } for (i = 0; i < num_pages; i++) { - if (pagelist->type != PAGELIST_WRITE) + if (pagelist->type != PAGELIST_WRITE) { vm_page_dirty(pages[i]); + pagelist_page_free(pages[i]); + } } - vm_page_unhold_pages(pages, num_pages); - bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map); bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map); bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 05:35:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5AD4572; Thu, 12 Feb 2015 05:35:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D53E9CB; Thu, 12 Feb 2015 05:35:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C5Z9xT062039; Thu, 12 Feb 2015 05:35:09 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C5Z0el061979; Thu, 12 Feb 2015 05:35:00 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201502120535.t1C5Z0el061979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 12 Feb 2015 05:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 05:35:09 -0000 Author: cperciva Date: Thu Feb 12 05:35:00 2015 New Revision: 278616 URL: https://svnweb.freebsd.org/changeset/base/278616 Log: Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin; update paths; and include everything in the "base" distribution. The "games" distribution being optional made sense when there were more games and we had small disks; but the "games-like" games were moved into the ports tree a dozen years ago and the remaining "utility-like" games occupy less than 0.001% of my laptop's small hard drive. Meanwhile every new user is confronted by the question "do you want games installed" when they they try to install FreeBSD. The next steps will be: 2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor, morse, number, primes, and random, since there is evidence that those are still being used. 3. Merging src/games into src/usr.bin. This change will not be MFCed. Reviewed by: jmg Discussed at: EuroBSDCon Approved by: gjb (release-affecting changes) Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/netbsd-tests/games/t_factor.sh head/etc/login.conf head/etc/master.passwd head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/etc/root/dot.cshrc head/etc/root/dot.login head/etc/root/dot.profile head/games/Makefile.inc head/games/caesar/rot13.sh head/games/fortune/datfiles/Makefile head/release/scripts/make-manifest.sh head/share/man/man4/led.4 head/share/man/man6/intro.6 head/share/man/man7/hier.7 head/share/mk/bsd.prog.mk head/share/skel/dot.cshrc head/share/skel/dot.login head/share/skel/dot.profile head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/tools/nanobsd/gateworks/Files/root/.profile head/tools/tools/nanobsd/pcengines/Files/root/.cshrc head/tools/tools/nanobsd/pcengines/Files/root/.login head/tools/tools/nanobsd/rescue/Files/root/.cshrc head/usr.bin/whereis/pathnames.h head/usr.bin/whereis/whereis.1 head/usr.bin/whereis/whereis.c head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Feb 12 04:31:17 2015 (r278615) +++ head/Makefile.inc1 Thu Feb 12 05:35:00 2015 (r278616) @@ -189,9 +189,8 @@ OBJTREE= ${MAKEOBJDIRPREFIX} OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp -# /usr/games added for fortune which depend on strfile -BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin -XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin +XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} @@ -807,9 +806,6 @@ ITOOLS+=makewhatis # Non-base distributions produced by the base system EXTRA_DISTRIBUTIONS= doc -.if ${MK_GAMES} != "no" -EXTRA_DISTRIBUTIONS+= games -.endif .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Feb 12 04:31:17 2015 (r278615) +++ head/ObsoleteFiles.inc Thu Feb 12 05:35:00 2015 (r278616) @@ -38,6 +38,22 @@ # xargs -n1 | sort | uniq -d; # done +# 20150212: /usr/games moving into /usr/bin +OLD_FILES+=usr/games/bcd +OLD_FILES+=usr/games/caesar +OLD_FILES+=usr/games/factor +OLD_FILES+=usr/games/fortune +OLD_FILES+=usr/games/grdc +OLD_FILES+=usr/games/morse +OLD_FILES+=usr/games/number +OLD_FILES+=usr/games/pom +OLD_FILES+=usr/games/ppt +OLD_FILES+=usr/games/primes +OLD_FILES+=usr/games/random +OLD_FILES+=usr/games/rot13 +OLD_FILES+=usr/games/strfile +OLD_FILES+=usr/games/unstr +OLD_DIRS+=usr/games # 20150209: liblzma header OLD_FILES+=usr/include/lzma/lzma.h # 20150124: spl.9 and friends Modified: head/contrib/netbsd-tests/games/t_factor.sh ============================================================================== --- head/contrib/netbsd-tests/games/t_factor.sh Thu Feb 12 04:31:17 2015 (r278615) +++ head/contrib/netbsd-tests/games/t_factor.sh Thu Feb 12 05:35:00 2015 (r278616) @@ -27,13 +27,13 @@ expect() { echo "${2}" >expout - atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1} + atf_check -s eq:0 -o file:expout -e empty /usr/bin/factor ${1} } atf_test_case overflow overflow_head() { atf_set "descr" "Tests for overflow conditions" - atf_set "require.progs" "/usr/games/factor" + atf_set "require.progs" "/usr/bin/factor" } overflow_body() { expect '8675309' '8675309: 8675309' @@ -44,7 +44,7 @@ atf_test_case loop loop_head() { atf_set "descr" "Tests some cases that once locked the program" \ "in an infinite loop" - atf_set "require.progs" "/usr/games/factor" + atf_set "require.progs" "/usr/bin/factor" } loop_body() { expect '99999999999991' '99999999999991: 7 13 769231 1428571' Modified: head/etc/login.conf ============================================================================== --- head/etc/login.conf Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/login.conf Thu Feb 12 05:35:00 2015 (r278616) @@ -27,7 +27,7 @@ default:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ - :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\ + :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ :datasize=unlimited:\ Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/master.passwd Thu Feb 12 05:35:00 2015 (r278616) @@ -7,7 +7,7 @@ operator:*:2:5::0:0:System &:/:/usr/sbin bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin -games:*:7:13::0:0:Games pseudo-user:/usr/games:/usr/sbin/nologin +games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/mtree/BSD.debug.dist Thu Feb 12 05:35:00 2015 (r278616) @@ -21,8 +21,6 @@ usr bin .. - games - .. lib clang 3.5.1 Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/mtree/BSD.usr.dist Thu Feb 12 05:35:00 2015 (r278616) @@ -7,8 +7,6 @@ . bin .. - games - .. include .. lib Modified: head/etc/root/dot.cshrc ============================================================================== --- head/etc/root/dot.cshrc Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/root/dot.cshrc Thu Feb 12 05:35:00 2015 (r278616) @@ -15,7 +15,7 @@ alias ll ls -lAF # A righteous umask umask 22 -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi setenv PAGER more Modified: head/etc/root/dot.login ============================================================================== --- head/etc/root/dot.login Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/root/dot.login Thu Feb 12 05:35:00 2015 (r278616) @@ -6,4 +6,4 @@ # # Uncomment to display a random cookie each login: -# if ( -x /usr/games/fortune ) /usr/games/fortune -s +# if ( -x /usr/bin/fortune ) /usr/bin/fortune -s Modified: head/etc/root/dot.profile ============================================================================== --- head/etc/root/dot.profile Thu Feb 12 04:31:17 2015 (r278615) +++ head/etc/root/dot.profile Thu Feb 12 05:35:00 2015 (r278616) @@ -1,6 +1,6 @@ # $FreeBSD$ # -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin export PATH HOME=/root export HOME Modified: head/games/Makefile.inc ============================================================================== --- head/games/Makefile.inc Thu Feb 12 04:31:17 2015 (r278615) +++ head/games/Makefile.inc Thu Feb 12 05:35:00 2015 (r278616) @@ -1,7 +1,6 @@ # @(#)Makefile.inc 8.1 (Berkeley) 5/31/93 # $FreeBSD$ -BINDIR?= /usr/games +BINDIR?= /usr/bin FILESDIR?= ${SHAREDIR}/games WARNS?= 6 -DISTRIBUTION?= games Modified: head/games/caesar/rot13.sh ============================================================================== --- head/games/caesar/rot13.sh Thu Feb 12 04:31:17 2015 (r278615) +++ head/games/caesar/rot13.sh Thu Feb 12 05:35:00 2015 (r278616) @@ -30,4 +30,4 @@ # @(#)rot13.sh 8.1 (Berkeley) 5/31/93 # $FreeBSD$ -exec /usr/games/caesar 13 "$@" +exec /usr/bin/caesar 13 "$@" Modified: head/games/fortune/datfiles/Makefile ============================================================================== --- head/games/fortune/datfiles/Makefile Thu Feb 12 04:31:17 2015 (r278615) +++ head/games/fortune/datfiles/Makefile Thu Feb 12 05:35:00 2015 (r278616) @@ -15,7 +15,7 @@ FILESDIR= ${SHAREDIR}/games/fortune .for f in ${DB} $f.dat: $f - PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \ + PATH=$$PATH:/usr/bin:${.OBJDIR}/../strfile \ strfile -Cs ${.ALLSRC} ${.TARGET} .endfor Modified: head/release/scripts/make-manifest.sh ============================================================================== --- head/release/scripts/make-manifest.sh Thu Feb 12 04:31:17 2015 (r278615) +++ head/release/scripts/make-manifest.sh Thu Feb 12 05:35:00 2015 (r278616) @@ -13,7 +13,6 @@ desc_base="Base system (MANDATORY)" desc_kernel="Kernel (MANDATORY)" desc_doc="Additional documentation" doc_default=off -desc_games="Games (fortune, etc.)" desc_lib32="32-bit compatibility libraries" desc_ports="Ports tree" desc_src="System source code" Modified: head/share/man/man4/led.4 ============================================================================== --- head/share/man/man4/led.4 Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/man/man4/led.4 Thu Feb 12 05:35:00 2015 (r278616) @@ -170,7 +170,7 @@ flashes .Pp .Dl *_*__**_ .Bd -literal -/usr/games/morse -l "Soekris rocks" > /dev/led/error +/usr/bin/morse -l "Soekris rocks" > /dev/led/error .Ed .Sh SEE ALSO .Xr morse 6 Modified: head/share/man/man6/intro.6 ============================================================================== --- head/share/man/man6/intro.6 Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/man/man6/intro.6 Thu Feb 12 05:35:00 2015 (r278616) @@ -37,7 +37,7 @@ This section contains information about games. The games are located in -.Pa /usr/games +.Pa /usr/bin if installed. You can get a short overview about all the games with the command: @@ -45,13 +45,18 @@ command: $ apropos '\\(6\\)' .Ed .Sh FILES -.Bl -tag -width /usr/games -compact -.It Pa /usr/games +.Bl -tag -width /usr/bin -compact +.It Pa /usr/bin location of games .El .Sh SEE ALSO .Xr intro 1 .Sh HISTORY +In earlier versions of +.Fx , +games were located in +.Pa /usr/games . +.Pp The .Nm section manual page appeared in Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/man/man7/hier.7 Thu Feb 12 05:35:00 2015 (r278616) @@ -187,8 +187,6 @@ common utilities, programming tools, and .It Pa compat/ files needed to support binary compatibility with other operating systems, such as Linux -.It Pa games/ -useful and semi-frivolous programs .It Pa include/ standard C include files .Pp Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/mk/bsd.prog.mk Thu Feb 12 05:35:00 2015 (r278616) @@ -62,7 +62,7 @@ PROG_FULL=${PROG}.full ${BINDIR} == "/bin" ||\ ${BINDIR} == "/libexec" ||\ ${BINDIR} == "/sbin" ||\ - ${BINDIR:C%/usr/(bin|bsdinstall|games|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\ + ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\ ) DEBUGFILEDIR= ${DEBUGDIR}${BINDIR} .else Modified: head/share/skel/dot.cshrc ============================================================================== --- head/share/skel/dot.cshrc Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/skel/dot.cshrc Thu Feb 12 05:35:00 2015 (r278616) @@ -14,7 +14,7 @@ alias ll ls -lAF # These are normally set through /etc/login.conf. You may override them here # if wanted. -# set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) +# set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) # setenv BLOCKSIZE K # A righteous umask # umask 22 Modified: head/share/skel/dot.login ============================================================================== --- head/share/skel/dot.login Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/skel/dot.login Thu Feb 12 05:35:00 2015 (r278616) @@ -5,4 +5,4 @@ # see also csh(1), environ(7). # -if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips +if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips Modified: head/share/skel/dot.profile ============================================================================== --- head/share/skel/dot.profile Thu Feb 12 04:31:17 2015 (r278615) +++ head/share/skel/dot.profile Thu Feb 12 05:35:00 2015 (r278616) @@ -7,7 +7,7 @@ # These are normally set through /etc/login.conf. You may override them here # if wanted. -# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH +# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH # BLOCKSIZE=K; export BLOCKSIZE # Setting TERM is normally done through /etc/ttys. Do only override @@ -21,4 +21,4 @@ PAGER=more; export PAGER # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV -if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi +if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 12 04:31:17 2015 (r278615) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 12 05:35:00 2015 (r278616) @@ -1606,21 +1606,20 @@ OLD_FILES+=usr/share/man/man8/freebsd-up .endif .if ${MK_GAMES} == no -OLD_FILES+=usr/games/bcd -OLD_FILES+=usr/games/caesar -OLD_FILES+=usr/games/factor -OLD_FILES+=usr/games/fortune -OLD_FILES+=usr/games/grdc -OLD_FILES+=usr/games/morse -OLD_FILES+=usr/games/number -OLD_FILES+=usr/games/pom -OLD_FILES+=usr/games/ppt -OLD_FILES+=usr/games/primes -OLD_FILES+=usr/games/random -OLD_FILES+=usr/games/rot13 -OLD_FILES+=usr/games/strfile -OLD_FILES+=usr/games/unstr -OLD_DIRS+=usr/games +OLD_FILES+=usr/bin/bcd +OLD_FILES+=usr/bin/caesar +OLD_FILES+=usr/bin/factor +OLD_FILES+=usr/bin/fortune +OLD_FILES+=usr/bin/grdc +OLD_FILES+=usr/bin/morse +OLD_FILES+=usr/bin/number +OLD_FILES+=usr/bin/pom +OLD_FILES+=usr/bin/ppt +OLD_FILES+=usr/bin/primes +OLD_FILES+=usr/bin/random +OLD_FILES+=usr/bin/rot13 +OLD_FILES+=usr/bin/strfile +OLD_FILES+=usr/bin/unstr OLD_FILES+=usr/share/games/fortune/fortunes OLD_FILES+=usr/share/games/fortune/fortunes.dat OLD_FILES+=usr/share/games/fortune/freebsd-tips Modified: head/tools/tools/nanobsd/gateworks/Files/root/.profile ============================================================================== --- head/tools/tools/nanobsd/gateworks/Files/root/.profile Thu Feb 12 04:31:17 2015 (r278615) +++ head/tools/tools/nanobsd/gateworks/Files/root/.profile Thu Feb 12 05:35:00 2015 (r278616) @@ -1,6 +1,6 @@ # $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $ # -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin export PATH HOME=/root; export HOME TERM=${TERM:-xterm}; export TERM Modified: head/tools/tools/nanobsd/pcengines/Files/root/.cshrc ============================================================================== --- head/tools/tools/nanobsd/pcengines/Files/root/.cshrc Thu Feb 12 04:31:17 2015 (r278615) +++ head/tools/tools/nanobsd/pcengines/Files/root/.cshrc Thu Feb 12 05:35:00 2015 (r278616) @@ -14,7 +14,7 @@ alias ll ls -lA # A righteous umask umask 22 -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi setenv PAGER more Modified: head/tools/tools/nanobsd/pcengines/Files/root/.login ============================================================================== --- head/tools/tools/nanobsd/pcengines/Files/root/.login Thu Feb 12 04:31:17 2015 (r278615) +++ head/tools/tools/nanobsd/pcengines/Files/root/.login Thu Feb 12 05:35:00 2015 (r278616) @@ -6,4 +6,4 @@ # # Uncomment to display a random cookie each login: -# [ -x /usr/games/fortune ] && /usr/games/fortune -s +# [ -x /usr/bin/fortune ] && /usr/bin/fortune -s Modified: head/tools/tools/nanobsd/rescue/Files/root/.cshrc ============================================================================== --- head/tools/tools/nanobsd/rescue/Files/root/.cshrc Thu Feb 12 04:31:17 2015 (r278615) +++ head/tools/tools/nanobsd/rescue/Files/root/.cshrc Thu Feb 12 05:35:00 2015 (r278616) @@ -11,7 +11,7 @@ a lm 'll | more' a m more -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin) +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin) setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man" setenv PAGER more Modified: head/usr.bin/whereis/pathnames.h ============================================================================== --- head/usr.bin/whereis/pathnames.h Thu Feb 12 04:31:17 2015 (r278615) +++ head/usr.bin/whereis/pathnames.h Thu Feb 12 05:35:00 2015 (r278616) @@ -25,9 +25,8 @@ * $FreeBSD$ */ -/* Where to look for libexec and games */ +/* Where to look for libexec */ #define PATH_LIBEXEC "/usr/libexec" -#define PATH_GAMES "/usr/games" /* Where to look for sources. */ #define PATH_SOURCES \ Modified: head/usr.bin/whereis/whereis.1 ============================================================================== --- head/usr.bin/whereis/whereis.1 Thu Feb 12 04:31:17 2015 (r278615) +++ head/usr.bin/whereis/whereis.1 Thu Feb 12 05:35:00 2015 (r278616) @@ -65,8 +65,7 @@ The default path searched is the string utility for the .Dq user.cs_path string, with -.Pa /usr/libexec , -.Pa /usr/games +.Pa /usr/libexec and the current user's .Ev $PATH appended. Modified: head/usr.bin/whereis/whereis.c ============================================================================== --- head/usr.bin/whereis/whereis.c Thu Feb 12 04:31:17 2015 (r278615) +++ head/usr.bin/whereis/whereis.c Thu Feb 12 05:35:00 2015 (r278616) @@ -265,7 +265,7 @@ defaults(void) opt_b = opt_m = opt_s = 1; /* -b defaults to default path + /usr/libexec + - * /usr/games + user's path */ + * user's path */ if (!bindirs) { if (sysctlbyname("user.cs_path", (void *)NULL, &s, (void *)NULL, 0) == -1) @@ -276,11 +276,10 @@ defaults(void) err(EX_OSERR, "sysctlbyname(\"user.cs_path\")"); nele = 0; decolonify(b, &bindirs, &nele); - bindirs = realloc(bindirs, (nele + 3) * sizeof(char *)); + bindirs = realloc(bindirs, (nele + 2) * sizeof(char *)); if (bindirs == NULL) abort(); bindirs[nele++] = PATH_LIBEXEC; - bindirs[nele++] = PATH_GAMES; bindirs[nele] = NULL; if ((cp = getenv("PATH")) != NULL) { /* don't destroy the original environment... */ Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Thu Feb 12 04:31:17 2015 (r278615) +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Feb 12 05:35:00 2015 (r278616) @@ -138,7 +138,6 @@ msg_ftp="FTP" msg_ftp_desc="FTP client and server utilities." msg_ftp_passive="FTP Passive" msg_ftp_username="FTP username" -msg_games_desc="Various games and sundry amusements." msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..." msg_geography_desc="Geography-related software." msg_german_desc="Ported software for Germanic countries." Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Feb 12 04:31:17 2015 (r278615) +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Feb 12 05:35:00 2015 (r278616) @@ -303,7 +303,7 @@ fetch_split_files() OUTFILE="${FSMNT}/.fetch-${INSFILE}" fi - DIRS="base catpages dict doc games info manpages proflibs kernels src" + DIRS="base catpages dict doc info manpages proflibs kernels src" if [ "${FBSD_ARCH}" = "amd64" ] then DIRS="${DIRS} lib32" From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 05:37:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0766A772 for ; Thu, 12 Feb 2015 05:37:27 +0000 (UTC) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB089EE for ; Thu, 12 Feb 2015 05:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=PHjX0GZZQqbXaavng59I17somvQ=; b=hHZSc3xRpK5VORap73 C/fSTgzYkz6/0zzJQ6ZDLBEgMCIDPbPnd/H14AY73ltskrr61DCEwr5lw8CIqWEW F3u1A15NlwWRqdVU8W3b+tuAfKP5j66ttv2lMZ7hXT56pl65SG5oADYt6hrfEbSN a0Q1R9ZDPZaZy8VHAv7nNfJbo= Received: by filter0150p1mdw1.sendgrid.net with SMTP id filter0150p1mdw1.15926.54DC3C0DB 2015-02-12 05:37:18.415712907 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd-005 (SG) with ESMTP id 14b7c4a9819.704.291d75 for ; Thu, 12 Feb 2015 05:37:18 +0000 (UTC) Received: (qmail 60461 invoked from network); 12 Feb 2015 05:36:21 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 12 Feb 2015 05:36:21 -0000 Received: (qmail 8312 invoked from network); 12 Feb 2015 05:35:53 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 12 Feb 2015 05:35:53 -0000 Message-ID: <54DC3BB9.1020202@freebsd.org> Date: Wed, 11 Feb 2015 21:35:53 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... References: <201502120535.t1C5Z0el061979@svn.freebsd.org> In-Reply-To: <201502120535.t1C5Z0el061979@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PHZ8T7JO+Eegp531KCFkcPIVkAqPjAc4htiYS IrQ/c/c7HVASfGc96PEzazcoXgGdQk5ADWol+ZSvygDec9Js8D8It1sInxSzFJEIEnJ86BhVjbaSjL 5x5zmNPXF5VeoPU= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 05:37:27 -0000 On 02/11/15 21:35, Colin Percival wrote: > 2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and > caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor, > morse, number, primes, and random, since there is evidence that those are > still being used. If anyone has a desperate need for punch card support and can't possibly install it from the ports tree, please email me *off-list*. I don't want to have too much of a crazy bikeshed discussion about this. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 06:17:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EE54B95; Thu, 12 Feb 2015 06:17:14 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 453F3D9B; Thu, 12 Feb 2015 06:17:14 +0000 (UTC) Received: from [64.201.244.132] (port=51305 helo=[10.0.0.105]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YL84J-000JlW-2D; Tue, 10 Feb 2015 02:29:23 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... From: Devin Teske X-Mailer: iPhone Mail (12B440) In-Reply-To: <201502120535.t1C5Z0el061979@svn.freebsd.org> Date: Wed, 11 Feb 2015 22:17:05 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201502120535.t1C5Z0el061979@svn.freebsd.org> To: Colin Percival Cc: "svn-src-head@freebsd.org" , Devin Teske , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 06:17:14 -0000 PLEASE! Do NOT remove the grand digital clock (grdc). So many of us over the years have used it as a terminal keeper-aliver :) (an= d as a clock, to boot). I will be very sad if you remove grdc. --=20 Devin > On Feb 11, 2015, at 9:35 PM, Colin Percival wrote: >=20 > Author: cperciva > Date: Thu Feb 12 05:35:00 2015 > New Revision: 278616 > URL: https://svnweb.freebsd.org/changeset/base/278616 >=20 > Log: > Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin= ; > update paths; and include everything in the "base" distribution. >=20 > The "games" distribution being optional made sense when there were more > games and we had small disks; but the "games-like" games were moved into > the ports tree a dozen years ago and the remaining "utility-like" games > occupy less than 0.001% of my laptop's small hard drive. Meanwhile every= > new user is confronted by the question "do you want games installed" when= > they they try to install FreeBSD. >=20 > The next steps will be: >=20 > 2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and= > caesar cipher (caesar, rot13) utilities. I intend to keep fortune, facto= r, > morse, number, primes, and random, since there is evidence that those are= > still being used. >=20 > 3. Merging src/games into src/usr.bin. >=20 > This change will not be MFCed. >=20 > Reviewed by: jmg > Discussed at: EuroBSDCon > Approved by: gjb (release-affecting changes) >=20 > Modified: > head/Makefile.inc1 > head/ObsoleteFiles.inc > head/contrib/netbsd-tests/games/t_factor.sh > head/etc/login.conf > head/etc/master.passwd > head/etc/mtree/BSD.debug.dist > head/etc/mtree/BSD.usr.dist > head/etc/root/dot.cshrc > head/etc/root/dot.login > head/etc/root/dot.profile > head/games/Makefile.inc > head/games/caesar/rot13.sh > head/games/fortune/datfiles/Makefile > head/release/scripts/make-manifest.sh > head/share/man/man4/led.4 > head/share/man/man6/intro.6 > head/share/man/man7/hier.7 > head/share/mk/bsd.prog.mk > head/share/skel/dot.cshrc > head/share/skel/dot.login > head/share/skel/dot.profile > head/tools/build/mk/OptionalObsoleteFiles.inc > head/tools/tools/nanobsd/gateworks/Files/root/.profile > head/tools/tools/nanobsd/pcengines/Files/root/.cshrc > head/tools/tools/nanobsd/pcengines/Files/root/.login > head/tools/tools/nanobsd/rescue/Files/root/.cshrc > head/usr.bin/whereis/pathnames.h > head/usr.bin/whereis/whereis.1 > head/usr.bin/whereis/whereis.c > head/usr.sbin/bsdconfig/include/messages.subr > head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/Makefile.inc1 Thu Feb 12 04:31:17 2015 (r278615) > +++ head/Makefile.inc1 Thu Feb 12 05:35:00 2015 (r278616) > @@ -189,9 +189,8 @@ OBJTREE=3D ${MAKEOBJDIRPREFIX} > OBJTREE=3D ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} > .endif > WORLDTMP=3D ${OBJTREE}${.CURDIR}/tmp > -# /usr/games added for fortune which depend on strfile > -BPATH=3D ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${= WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin > -XPATH=3D ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/= games > +BPATH=3D ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${= WORLDTMP}/legacy/bin > +XPATH=3D ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin > STRICTTMPPATH=3D ${BPATH}:${XPATH} > TMPPATH=3D ${STRICTTMPPATH}:${PATH} >=20 > @@ -807,9 +806,6 @@ ITOOLS+=3Dmakewhatis >=20 > # Non-base distributions produced by the base system > EXTRA_DISTRIBUTIONS=3D doc > -.if ${MK_GAMES} !=3D "no" > -EXTRA_DISTRIBUTIONS+=3D games > -.endif > .if defined(LIB32TMP) && ${MK_LIB32} !=3D "no" > EXTRA_DISTRIBUTIONS+=3D lib32 > .endif >=20 > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/ObsoleteFiles.inc Thu Feb 12 04:31:17 2015 (r278615) > +++ head/ObsoleteFiles.inc Thu Feb 12 05:35:00 2015 (r278616) > @@ -38,6 +38,22 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > +# 20150212: /usr/games moving into /usr/bin > +OLD_FILES+=3Dusr/games/bcd > +OLD_FILES+=3Dusr/games/caesar > +OLD_FILES+=3Dusr/games/factor > +OLD_FILES+=3Dusr/games/fortune > +OLD_FILES+=3Dusr/games/grdc > +OLD_FILES+=3Dusr/games/morse > +OLD_FILES+=3Dusr/games/number > +OLD_FILES+=3Dusr/games/pom > +OLD_FILES+=3Dusr/games/ppt > +OLD_FILES+=3Dusr/games/primes > +OLD_FILES+=3Dusr/games/random > +OLD_FILES+=3Dusr/games/rot13 > +OLD_FILES+=3Dusr/games/strfile > +OLD_FILES+=3Dusr/games/unstr > +OLD_DIRS+=3Dusr/games > # 20150209: liblzma header > OLD_FILES+=3Dusr/include/lzma/lzma.h > # 20150124: spl.9 and friends >=20 > Modified: head/contrib/netbsd-tests/games/t_factor.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/contrib/netbsd-tests/games/t_factor.sh Thu Feb 12 04:31:17 201= 5 (r278615) > +++ head/contrib/netbsd-tests/games/t_factor.sh Thu Feb 12 05:35:00 201= 5 (r278616) > @@ -27,13 +27,13 @@ >=20 > expect() { > echo "${2}" >expout > - atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1} > + atf_check -s eq:0 -o file:expout -e empty /usr/bin/factor ${1} > } >=20 > atf_test_case overflow > overflow_head() { > atf_set "descr" "Tests for overflow conditions" > - atf_set "require.progs" "/usr/games/factor" > + atf_set "require.progs" "/usr/bin/factor" > } > overflow_body() { > expect '8675309' '8675309: 8675309' > @@ -44,7 +44,7 @@ atf_test_case loop > loop_head() { > atf_set "descr" "Tests some cases that once locked the program" \ > "in an infinite loop" > - atf_set "require.progs" "/usr/games/factor" > + atf_set "require.progs" "/usr/bin/factor" > } > loop_body() { > expect '99999999999991' '99999999999991: 7 13 769231 1428571' >=20 > Modified: head/etc/login.conf > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/login.conf Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/login.conf Thu Feb 12 05:35:00 2015 (r278616) > @@ -27,7 +27,7 @@ default:\ > :copyright=3D/etc/COPYRIGHT:\ > :welcome=3D/etc/motd:\ > :setenv=3DMAIL=3D/var/mail/$,BLOCKSIZE=3DK:\ > - :path=3D/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr= /local/bin ~/bin:\ > + :path=3D/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~= /bin:\ > :nologin=3D/var/run/nologin:\ > :cputime=3Dunlimited:\ > :datasize=3Dunlimited:\ >=20 > Modified: head/etc/master.passwd > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/master.passwd Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/master.passwd Thu Feb 12 05:35:00 2015 (r278616) > @@ -7,7 +7,7 @@ operator:*:2:5::0:0:System &:/:/usr/sbin > bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin > tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin > kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin > -games:*:7:13::0:0:Games pseudo-user:/usr/games:/usr/sbin/nologin > +games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin > news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin > man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin > sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin >=20 > Modified: head/etc/mtree/BSD.debug.dist > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/mtree/BSD.debug.dist Thu Feb 12 04:31:17 2015 (r278615)= > +++ head/etc/mtree/BSD.debug.dist Thu Feb 12 05:35:00 2015 (r278616)= > @@ -21,8 +21,6 @@ > usr > bin > .. > - games > - .. > lib > clang > 3.5.1 >=20 > Modified: head/etc/mtree/BSD.usr.dist > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/mtree/BSD.usr.dist Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/mtree/BSD.usr.dist Thu Feb 12 05:35:00 2015 (r278616) > @@ -7,8 +7,6 @@ > . > bin > .. > - games > - .. > include > .. > lib >=20 > Modified: head/etc/root/dot.cshrc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/root/dot.cshrc Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/root/dot.cshrc Thu Feb 12 05:35:00 2015 (r278616) > @@ -15,7 +15,7 @@ alias ll ls -lAF > # A righteous umask > umask 22 >=20 > -set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /u= sr/local/bin $HOME/bin) > +set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bi= n $HOME/bin) >=20 > setenv EDITOR vi > setenv PAGER more >=20 > Modified: head/etc/root/dot.login > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/root/dot.login Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/root/dot.login Thu Feb 12 05:35:00 2015 (r278616) > @@ -6,4 +6,4 @@ > # >=20 > # Uncomment to display a random cookie each login: > -# if ( -x /usr/games/fortune ) /usr/games/fortune -s > +# if ( -x /usr/bin/fortune ) /usr/bin/fortune -s >=20 > Modified: head/etc/root/dot.profile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/root/dot.profile Thu Feb 12 04:31:17 2015 (r278615) > +++ head/etc/root/dot.profile Thu Feb 12 05:35:00 2015 (r278616) > @@ -1,6 +1,6 @@ > # $FreeBSD$ > # > -PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/loca= l/bin:~/bin > +PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin= > export PATH > HOME=3D/root > export HOME >=20 > Modified: head/games/Makefile.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/games/Makefile.inc Thu Feb 12 04:31:17 2015 (r278615) > +++ head/games/Makefile.inc Thu Feb 12 05:35:00 2015 (r278616) > @@ -1,7 +1,6 @@ > # @(#)Makefile.inc 8.1 (Berkeley) 5/31/93 > # $FreeBSD$ >=20 > -BINDIR?=3D /usr/games > +BINDIR?=3D /usr/bin > FILESDIR?=3D ${SHAREDIR}/games > WARNS?=3D 6 > -DISTRIBUTION?=3D games >=20 > Modified: head/games/caesar/rot13.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/games/caesar/rot13.sh Thu Feb 12 04:31:17 2015 (r278615) > +++ head/games/caesar/rot13.sh Thu Feb 12 05:35:00 2015 (r278616) > @@ -30,4 +30,4 @@ > # @(#)rot13.sh 8.1 (Berkeley) 5/31/93 > # $FreeBSD$ >=20 > -exec /usr/games/caesar 13 "$@" > +exec /usr/bin/caesar 13 "$@" >=20 > Modified: head/games/fortune/datfiles/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/games/fortune/datfiles/Makefile Thu Feb 12 04:31:17 2015 (r= 278615) > +++ head/games/fortune/datfiles/Makefile Thu Feb 12 05:35:00 2015 (r= 278616) > @@ -15,7 +15,7 @@ FILESDIR=3D ${SHAREDIR}/games/fortune >=20 > .for f in ${DB} > $f.dat: $f > - PATH=3D$$PATH:/usr/games:${.OBJDIR}/../strfile \ > + PATH=3D$$PATH:/usr/bin:${.OBJDIR}/../strfile \ > strfile -Cs ${.ALLSRC} ${.TARGET} > .endfor >=20 >=20 > Modified: head/release/scripts/make-manifest.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/release/scripts/make-manifest.sh Thu Feb 12 04:31:17 2015 (= r278615) > +++ head/release/scripts/make-manifest.sh Thu Feb 12 05:35:00 2015 (= r278616) > @@ -13,7 +13,6 @@ desc_base=3D"Base system (MANDATORY)" > desc_kernel=3D"Kernel (MANDATORY)" > desc_doc=3D"Additional documentation" > doc_default=3Doff > -desc_games=3D"Games (fortune, etc.)" > desc_lib32=3D"32-bit compatibility libraries" > desc_ports=3D"Ports tree" > desc_src=3D"System source code" >=20 > Modified: head/share/man/man4/led.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/man/man4/led.4 Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/man/man4/led.4 Thu Feb 12 05:35:00 2015 (r278616) > @@ -170,7 +170,7 @@ flashes > .Pp > .Dl *_*__**_ > .Bd -literal > -/usr/games/morse -l "Soekris rocks" > /dev/led/error > +/usr/bin/morse -l "Soekris rocks" > /dev/led/error > .Ed > .Sh SEE ALSO > .Xr morse 6 >=20 > Modified: head/share/man/man6/intro.6 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/man/man6/intro.6 Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/man/man6/intro.6 Thu Feb 12 05:35:00 2015 (r278616) > @@ -37,7 +37,7 @@ > This section contains information about games. > The games > are located in > -.Pa /usr/games > +.Pa /usr/bin > if installed. > You can get a short overview about all the games with the > command: > @@ -45,13 +45,18 @@ command: > $ apropos '\\(6\\)' > .Ed > .Sh FILES > -.Bl -tag -width /usr/games -compact > -.It Pa /usr/games > +.Bl -tag -width /usr/bin -compact > +.It Pa /usr/bin > location of games > .El > .Sh SEE ALSO > .Xr intro 1 > .Sh HISTORY > +In earlier versions of > +.Fx , > +games were located in > +.Pa /usr/games . > +.Pp > The > .Nm > section manual page appeared in >=20 > Modified: head/share/man/man7/hier.7 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/man/man7/hier.7 Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/man/man7/hier.7 Thu Feb 12 05:35:00 2015 (r278616) > @@ -187,8 +187,6 @@ common utilities, programming tools, and > .It Pa compat/ > files needed to support binary compatibility with other operating systems,= > such as Linux > -.It Pa games/ > -useful and semi-frivolous programs > .It Pa include/ > standard C include files > .Pp >=20 > Modified: head/share/mk/bsd.prog.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/mk/bsd.prog.mk Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/mk/bsd.prog.mk Thu Feb 12 05:35:00 2015 (r278616) > @@ -62,7 +62,7 @@ PROG_FULL=3D${PROG}.full > ${BINDIR} =3D=3D "/bin" ||\ > ${BINDIR} =3D=3D "/libexec" ||\ > ${BINDIR} =3D=3D "/sbin" ||\ > - ${BINDIR:C%/usr/(bin|bsdinstall|games|libexec|lpr|sendmail|sm.bin|sbi= n)(/.*)?%/usr/bin%} =3D=3D "/usr/bin"\ > + ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*= )?%/usr/bin%} =3D=3D "/usr/bin"\ > ) > DEBUGFILEDIR=3D ${DEBUGDIR}${BINDIR} > .else >=20 > Modified: head/share/skel/dot.cshrc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/skel/dot.cshrc Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/skel/dot.cshrc Thu Feb 12 05:35:00 2015 (r278616) > @@ -14,7 +14,7 @@ alias ll ls -lAF >=20 > # These are normally set through /etc/login.conf. You may override them h= ere > # if wanted. > -# set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /= usr/local/bin $HOME/bin) > +# set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/= bin $HOME/bin) > # setenv BLOCKSIZE K > # A righteous umask > # umask 22 >=20 > Modified: head/share/skel/dot.login > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/skel/dot.login Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/skel/dot.login Thu Feb 12 05:35:00 2015 (r278616) > @@ -5,4 +5,4 @@ > # see also csh(1), environ(7). > # >=20 > -if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips > +if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips >=20 > Modified: head/share/skel/dot.profile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/skel/dot.profile Thu Feb 12 04:31:17 2015 (r278615) > +++ head/share/skel/dot.profile Thu Feb 12 05:35:00 2015 (r278616) > @@ -7,7 +7,7 @@ >=20 > # These are normally set through /etc/login.conf. You may override them h= ere > # if wanted. > -# PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/lo= cal/bin:$HOME/bin; export PATH > +# PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HO= ME/bin; export PATH > # BLOCKSIZE=3DK; export BLOCKSIZE >=20 > # Setting TERM is normally done through /etc/ttys. Do only override > @@ -21,4 +21,4 @@ PAGER=3Dmore; export PAGER > # set ENV to a file invoked each time sh is started for interactive use. > ENV=3D$HOME/.shrc; export ENV >=20 > -if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi > +if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi >=20 > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 12 04:31:17 2= 015 (r278615) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 12 05:35:00 2= 015 (r278616) > @@ -1606,21 +1606,20 @@ OLD_FILES+=3Dusr/share/man/man8/freebsd-up > .endif >=20 > .if ${MK_GAMES} =3D=3D no > -OLD_FILES+=3Dusr/games/bcd > -OLD_FILES+=3Dusr/games/caesar > -OLD_FILES+=3Dusr/games/factor > -OLD_FILES+=3Dusr/games/fortune > -OLD_FILES+=3Dusr/games/grdc > -OLD_FILES+=3Dusr/games/morse > -OLD_FILES+=3Dusr/games/number > -OLD_FILES+=3Dusr/games/pom > -OLD_FILES+=3Dusr/games/ppt > -OLD_FILES+=3Dusr/games/primes > -OLD_FILES+=3Dusr/games/random > -OLD_FILES+=3Dusr/games/rot13 > -OLD_FILES+=3Dusr/games/strfile > -OLD_FILES+=3Dusr/games/unstr > -OLD_DIRS+=3Dusr/games > +OLD_FILES+=3Dusr/bin/bcd > +OLD_FILES+=3Dusr/bin/caesar > +OLD_FILES+=3Dusr/bin/factor > +OLD_FILES+=3Dusr/bin/fortune > +OLD_FILES+=3Dusr/bin/grdc > +OLD_FILES+=3Dusr/bin/morse > +OLD_FILES+=3Dusr/bin/number > +OLD_FILES+=3Dusr/bin/pom > +OLD_FILES+=3Dusr/bin/ppt > +OLD_FILES+=3Dusr/bin/primes > +OLD_FILES+=3Dusr/bin/random > +OLD_FILES+=3Dusr/bin/rot13 > +OLD_FILES+=3Dusr/bin/strfile > +OLD_FILES+=3Dusr/bin/unstr > OLD_FILES+=3Dusr/share/games/fortune/fortunes > OLD_FILES+=3Dusr/share/games/fortune/fortunes.dat > OLD_FILES+=3Dusr/share/games/fortune/freebsd-tips >=20 > Modified: head/tools/tools/nanobsd/gateworks/Files/root/.profile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tools/tools/nanobsd/gateworks/Files/root/.profile Thu Feb 12 0= 4:31:17 2015 (r278615) > +++ head/tools/tools/nanobsd/gateworks/Files/root/.profile Thu Feb 12 0= 5:35:00 2015 (r278616) > @@ -1,6 +1,6 @@ > # $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $= > # > -PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/loca= l/bin:~/bin > +PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin= > export PATH > HOME=3D/root; export HOME > TERM=3D${TERM:-xterm}; export TERM >=20 > Modified: head/tools/tools/nanobsd/pcengines/Files/root/.cshrc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tools/tools/nanobsd/pcengines/Files/root/.cshrc Thu Feb 12 04:= 31:17 2015 (r278615) > +++ head/tools/tools/nanobsd/pcengines/Files/root/.cshrc Thu Feb 12 05:= 35:00 2015 (r278616) > @@ -14,7 +14,7 @@ alias ll ls -lA > # A righteous umask > umask 22 >=20 > -set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /u= sr/local/bin $HOME/bin) > +set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bi= n $HOME/bin) >=20 > setenv EDITOR vi > setenv PAGER more >=20 > Modified: head/tools/tools/nanobsd/pcengines/Files/root/.login > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tools/tools/nanobsd/pcengines/Files/root/.login Thu Feb 12 04:= 31:17 2015 (r278615) > +++ head/tools/tools/nanobsd/pcengines/Files/root/.login Thu Feb 12 05:= 35:00 2015 (r278616) > @@ -6,4 +6,4 @@ > # >=20 > # Uncomment to display a random cookie each login: > -# [ -x /usr/games/fortune ] && /usr/games/fortune -s > +# [ -x /usr/bin/fortune ] && /usr/bin/fortune -s >=20 > Modified: head/tools/tools/nanobsd/rescue/Files/root/.cshrc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/tools/tools/nanobsd/rescue/Files/root/.cshrc Thu Feb 12 04:31:= 17 2015 (r278615) > +++ head/tools/tools/nanobsd/rescue/Files/root/.cshrc Thu Feb 12 05:35:= 00 2015 (r278616) > @@ -11,7 +11,7 @@ > a lm 'll | more' > a m more >=20 > -set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /u= sr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $= HOME/bin) > +set path =3D (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bi= n /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin) > setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man" >=20 > setenv PAGER more >=20 > Modified: head/usr.bin/whereis/pathnames.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.bin/whereis/pathnames.h Thu Feb 12 04:31:17 2015 (r2786= 15) > +++ head/usr.bin/whereis/pathnames.h Thu Feb 12 05:35:00 2015 (r2786= 16) > @@ -25,9 +25,8 @@ > * $FreeBSD$ > */ >=20 > -/* Where to look for libexec and games */ > +/* Where to look for libexec */ > #define PATH_LIBEXEC "/usr/libexec" > -#define PATH_GAMES "/usr/games" >=20 > /* Where to look for sources. */ > #define PATH_SOURCES \ >=20 > Modified: head/usr.bin/whereis/whereis.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.bin/whereis/whereis.1 Thu Feb 12 04:31:17 2015 (r278615= ) > +++ head/usr.bin/whereis/whereis.1 Thu Feb 12 05:35:00 2015 (r278616= ) > @@ -65,8 +65,7 @@ The default path searched is the string=20 > utility for the > .Dq user.cs_path > string, with > -.Pa /usr/libexec , > -.Pa /usr/games > +.Pa /usr/libexec > and the current user's > .Ev $PATH > appended. >=20 > Modified: head/usr.bin/whereis/whereis.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.bin/whereis/whereis.c Thu Feb 12 04:31:17 2015 (r278615= ) > +++ head/usr.bin/whereis/whereis.c Thu Feb 12 05:35:00 2015 (r278616= ) > @@ -265,7 +265,7 @@ defaults(void) > opt_b =3D opt_m =3D opt_s =3D 1; >=20 > /* -b defaults to default path + /usr/libexec + > - * /usr/games + user's path */ > + * user's path */ > if (!bindirs) { > if (sysctlbyname("user.cs_path", (void *)NULL, &s, > (void *)NULL, 0) =3D=3D -1) > @@ -276,11 +276,10 @@ defaults(void) > err(EX_OSERR, "sysctlbyname(\"user.cs_path\")"); > nele =3D 0; > decolonify(b, &bindirs, &nele); > - bindirs =3D realloc(bindirs, (nele + 3) * sizeof(char *)); > + bindirs =3D realloc(bindirs, (nele + 2) * sizeof(char *)); > if (bindirs =3D=3D NULL) > abort(); > bindirs[nele++] =3D PATH_LIBEXEC; > - bindirs[nele++] =3D PATH_GAMES; > bindirs[nele] =3D NULL; > if ((cp =3D getenv("PATH")) !=3D NULL) { > /* don't destroy the original environment... */ >=20 > Modified: head/usr.sbin/bsdconfig/include/messages.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.sbin/bsdconfig/include/messages.subr Thu Feb 12 04:31:17 2= 015 (r278615) > +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Feb 12 05:35:00 2= 015 (r278616) > @@ -138,7 +138,6 @@ msg_ftp=3D"FTP" > msg_ftp_desc=3D"FTP client and server utilities." > msg_ftp_passive=3D"FTP Passive" > msg_ftp_username=3D"FTP username" > -msg_games_desc=3D"Various games and sundry amusements." > msg_generating_index_from_pkg_database=3D"Generating INDEX from pkg(8) dat= abase\n(this can take a while)..." > msg_geography_desc=3D"Geography-related software." > msg_german_desc=3D"Ported software for Germanic countries." >=20 > Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Fe= b 12 04:31:17 2015 (r278615) > +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Fe= b 12 05:35:00 2015 (r278616) > @@ -303,7 +303,7 @@ fetch_split_files() > OUTFILE=3D"${FSMNT}/.fetch-${INSFILE}" > fi >=20 > - DIRS=3D"base catpages dict doc games info manpages proflibs kernels src= " > + DIRS=3D"base catpages dict doc info manpages proflibs kernels src" > if [ "${FBSD_ARCH}" =3D "amd64" ] > then > DIRS=3D"${DIRS} lib32" >=20 From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 07:21:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9917F4A2; Thu, 12 Feb 2015 07:21:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8383E601; Thu, 12 Feb 2015 07:21:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C7LNhV012890; Thu, 12 Feb 2015 07:21:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C7LNsp012888; Thu, 12 Feb 2015 07:21:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502120721.t1C7LNsp012888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 12 Feb 2015 07:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278617 - in stable: 10/sys/dev/drm2/radeon 9/sys/dev/drm2/radeon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 07:21:23 -0000 Author: dim Date: Thu Feb 12 07:21:22 2015 New Revision: 278617 URL: https://svnweb.freebsd.org/changeset/base/278617 Log: MFC r278004: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1727 MFC r278438: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1748 Modified: stable/9/sys/dev/drm2/radeon/ni.c stable/9/sys/dev/drm2/radeon/si.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/drm2/radeon/ni.c stable/10/sys/dev/drm2/radeon/si.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/ni.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/ni.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/9/sys/dev/drm2/radeon/ni.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: stable/9/sys/dev/drm2/radeon/si.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/si.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/9/sys/dev/drm2/radeon/si.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 07:21:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821734A3; Thu, 12 Feb 2015 07:21:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C66D604; Thu, 12 Feb 2015 07:21:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C7LOYH012897; Thu, 12 Feb 2015 07:21:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C7LOqu012895; Thu, 12 Feb 2015 07:21:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502120721.t1C7LOqu012895@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 12 Feb 2015 07:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278617 - in stable: 10/sys/dev/drm2/radeon 9/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 07:21:24 -0000 Author: dim Date: Thu Feb 12 07:21:22 2015 New Revision: 278617 URL: https://svnweb.freebsd.org/changeset/base/278617 Log: MFC r278004: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1727 MFC r278438: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1748 Modified: stable/10/sys/dev/drm2/radeon/ni.c stable/10/sys/dev/drm2/radeon/si.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/drm2/radeon/ni.c stable/9/sys/dev/drm2/radeon/si.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/ni.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: stable/10/sys/dev/drm2/radeon/si.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 07:22:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB14871D; Thu, 12 Feb 2015 07:22:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6790623; Thu, 12 Feb 2015 07:22:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C7MljS013231; Thu, 12 Feb 2015 07:22:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C7Mlm5013230; Thu, 12 Feb 2015 07:22:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502120722.t1C7Mlm5013230@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 12 Feb 2015 07:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278618 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 07:22:48 -0000 Author: ngie Date: Thu Feb 12 07:22:46 2015 New Revision: 278618 URL: https://svnweb.freebsd.org/changeset/base/278618 Log: Add debugging output to help track down the recent Jenkins failures Modified: head/bin/pkill/tests/pgrep-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 07:21:22 2015 (r278617) +++ head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 07:22:46 2015 (r278618) @@ -40,7 +40,7 @@ if [ `id -u` -eq 0 ]; then if [ "$pid1" = "$pid2" ]; then echo "ok 1 - $name" else - echo "not ok 1 - $name" + echo "not ok 1 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) @@ -66,7 +66,7 @@ if [ `id -u` -eq 0 ]; then if [ "$pid1" = "$pid2" ]; then echo "ok 2 - $name" else - echo "not ok 2 - $name" + echo "not ok 2 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) @@ -87,7 +87,7 @@ if [ `id -u` -eq 0 ]; then if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then echo "ok 3 - $name" else - echo "not ok 3 - $name" + echo "not ok 3 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi rm -f $sleep [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 10:24:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F55BDEE; Thu, 12 Feb 2015 10:24:21 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 161C9B9D; Thu, 12 Feb 2015 10:24:21 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YLqwO-000Hva-5B; Thu, 12 Feb 2015 13:24:12 +0300 Date: Thu, 12 Feb 2015 13:24:12 +0300 From: Slawa Olhovchenkov To: Colin Percival Subject: Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... Message-ID: <20150212102412.GA67478@zxy.spb.ru> References: <201502120535.t1C5Z0el061979@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502120535.t1C5Z0el061979@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 10:24:21 -0000 On Thu, Feb 12, 2015 at 05:35:00AM +0000, Colin Percival wrote: > Author: cperciva > Date: Thu Feb 12 05:35:00 2015 > New Revision: 278616 > URL: https://svnweb.freebsd.org/changeset/base/278616 > > Log: > Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin; > update paths; and include everything in the "base" distribution. > > The "games" distribution being optional made sense when there were more > games and we had small disks; but the "games-like" games were moved into > the ports tree a dozen years ago and the remaining "utility-like" games > occupy less than 0.001% of my laptop's small hard drive. Meanwhile every > new user is confronted by the question "do you want games installed" when > they they try to install FreeBSD. > > The next steps will be: > > 2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and > caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor, > morse, number, primes, and random, since there is evidence that those are > still being used. Please, keep pom. From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 10:28:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00FBFF82; Thu, 12 Feb 2015 10:28:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1284BCD; Thu, 12 Feb 2015 10:28:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CASjGw098433; Thu, 12 Feb 2015 10:28:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CASjCv098432; Thu, 12 Feb 2015 10:28:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502121028.t1CASjCv098432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Feb 2015 10:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278619 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 10:28:46 -0000 Author: mav Date: Thu Feb 12 10:28:45 2015 New Revision: 278619 URL: https://svnweb.freebsd.org/changeset/base/278619 Log: Make WRITE SAME commands respect physical block size. This change by 2-3 times improves performance of misaligned WRITE SAME commands by avoiding unneeded read-modify-write cycles inside ZFS. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Thu Feb 12 07:22:46 2015 (r278618) +++ head/sys/cam/ctl/ctl_backend_block.c Thu Feb 12 10:28:45 2015 (r278619) @@ -1187,7 +1187,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len_flags *lbalen; - uint64_t len_left, lba; + uint64_t len_left, lba, pb, pbo, adj; int i, seglen; uint8_t *buf, *end; @@ -1241,6 +1241,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b DPRINTF("WRITE SAME at LBA %jx len %u\n", (uintmax_t)lbalen->lba, lbalen->len); + pb = (uint64_t)be_lun->blocksize << be_lun->pblockexp; + pbo = pb - (uint64_t)be_lun->blocksize * be_lun->pblockoff; len_left = (uint64_t)lbalen->len * be_lun->blocksize; for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { @@ -1248,7 +1250,15 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b * Setup the S/G entry for this chunk. */ seglen = MIN(CTLBLK_MAX_SEG, len_left); - seglen -= seglen % be_lun->blocksize; + if (pb > be_lun->blocksize) { + adj = ((lbalen->lba + lba) * be_lun->blocksize + + seglen - pbo) % pb; + if (seglen > adj) + seglen -= adj; + else + seglen -= seglen % be_lun->blocksize; + } else + seglen -= seglen % be_lun->blocksize; beio->sg_segs[i].len = seglen; beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 11:06:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1029065B; Thu, 12 Feb 2015 11:06:37 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id BEAE0F97; Thu, 12 Feb 2015 11:06:36 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 472ED1A23C7; Thu, 12 Feb 2015 22:06:27 +1100 (AEDT) Date: Thu, 12 Feb 2015 22:06:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" Subject: Re: svn commit: r278589 - head/usr.sbin/flowctl In-Reply-To: <201502111746.t1BHkZqt022491@svn.freebsd.org> Message-ID: <20150212212417.U1109@besplex.bde.org> References: <201502111746.t1BHkZqt022491@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=baJSDo/B c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=wQHLCYbhVzbzD75rOj8A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:06:37 -0000 On Wed, 11 Feb 2015, Pedro F. Giffuni wrote: > Log: > flowctl: Replace alloca() with an array. > > Reviewed by: glebius > > Modified: > head/usr.sbin/flowctl/flowctl.c > > Modified: head/usr.sbin/flowctl/flowctl.c > ============================================================================== > --- head/usr.sbin/flowctl/flowctl.c Wed Feb 11 17:41:23 2015 (r278588) > +++ head/usr.sbin/flowctl/flowctl.c Wed Feb 11 17:46:35 2015 (r278589) > @@ -222,12 +222,10 @@ ctl_show(int argc, char **argv) > static void > do_show(int version, void (*func)(struct ngnf_show_header *)) > { > - struct ng_mesg *ng_mesg; > + struct ng_mesg ng_mesg[SORCVBUF_SIZE]; > struct ngnf_show_header req, *resp; > int token, nread; > > - ng_mesg = alloca(SORCVBUF_SIZE); > - > req.version = version; > req.hash_id = req.list_id = 0; It is surprising that this even compiles. It replaces the allocation of 1 (variable-size, using a perhaps-standard form of the struct hack) struct of size SORCVBUF_SIZE with that of SORCVBUF_SIZE (fixed-size) structs, each of too-small size. This accidentally allocates enough storage since 1 * SORCVBUF_SIZE < SORCVBUF_SIZE * sizeof(any). It changes the variable type significantly, from a pointer to 1 struct to the bogus array. In 1 place, the array decays to a pointer to its first element without too much magic. (The magic is larger than usual since the struct hack is used. The first element is too small and is overrun. This works because the pointer isn't really a pointer to a struct.) In 4 places, the array decays to a pointer to its first element more magically. It is surprising that ng_mesg->header means the same thing as ng_mesg[0].header when ng_mesg is an array. Using alloca() was ugly, but correctly reflected what was going on. It is an optimization of mallocing the struct. VLAs don't work as well as alloca() for variable-sized structs. I don't see how they can be used at all. Since we allocate the maximum size needed, we don't even need a VLA, and could almost use u_char buf[SORCVBUF_SIZE] struct ng_mesg *ng_mesg; ng_msg = (struct ng_mesg *)buf; but this doesn't guarantee the necessary alignment like malloc() and alloca() do. It also takes more code than alloca(). To get the necessary alignment, you would have to use some alignment hack, e.g., put buf in a union with the struct (only works for fixed-size allocation), or perhaps use an array not quite as in this commit: struct ng_mesg buf[howmany(SORCVBUF_SIZE, sizeof(struct ng_mesg))]; struct ng_mesg *ng_mesg; ng_msg = &buf[0]; This form works using VLAs (SORCVBUF_SIZE can be variable), but is much uglier than using alloca(). Bruce From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 11:10:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF9737C7; Thu, 12 Feb 2015 11:10:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA467FB4; Thu, 12 Feb 2015 11:10:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CBA7pp017688; Thu, 12 Feb 2015 11:10:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CBA7Z3017686; Thu, 12 Feb 2015 11:10:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201502121110.t1CBA7Z3017686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 12 Feb 2015 11:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278620 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:10:08 -0000 Author: ae Date: Thu Feb 12 11:10:07 2015 New Revision: 278620 URL: https://svnweb.freebsd.org/changeset/base/278620 Log: MFC r278268: Print IPv6 address in log message instead of address of pointer. Modified: stable/10/sys/netinet6/in6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Thu Feb 12 10:28:45 2015 (r278619) +++ stable/10/sys/netinet6/in6.c Thu Feb 12 11:10:07 2015 (r278620) @@ -1543,6 +1543,7 @@ in6_purgeaddr(struct ifaddr *ifa) static void in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) { + char ip6buf[INET6_ADDRSTRLEN]; IF_ADDR_WLOCK(ifp); TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); @@ -1566,7 +1567,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st if (ia->ia6_ndpr == NULL) { nd6log((LOG_NOTICE, "in6_unlink_ifa: autoconf'ed address " - "%p has no prefix\n", ia)); + "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { ia->ia6_ndpr->ndpr_refcnt--; ia->ia6_ndpr = NULL; From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 11:27:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2195C97; Thu, 12 Feb 2015 11:27:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD573218; Thu, 12 Feb 2015 11:27:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CBRtLS026735; Thu, 12 Feb 2015 11:27:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CBRt9D026734; Thu, 12 Feb 2015 11:27:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502121127.t1CBRt9D026734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Feb 2015 11:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278621 - head/usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:27:55 -0000 Author: mav Date: Thu Feb 12 11:27:54 2015 New Revision: 278621 URL: https://svnweb.freebsd.org/changeset/base/278621 Log: Fix man page to match real option names. MFC after: 3 days Modified: head/usr.sbin/ctladm/ctladm.8 Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Thu Feb 12 11:10:07 2015 (r278620) +++ head/usr.sbin/ctladm/ctladm.8 Thu Feb 12 11:27:54 2015 (r278621) @@ -1035,11 +1035,11 @@ Set to "off" to allow them be issued in Parallel issue of consecutive operations may confuse logic of the backing file system, hurting performance; but it may improve performance of backing stores without prefetch/write-back. -.It Va psectorsize -.It Va psectoroffset +.It Va pblocksize +.It Va pblockoffset Specify physical block size and offset of the device. -.It Va usectorsize -.It Va usectoroffset +.It Va ublocksize +.It Va ublockoffset Specify UNMAP block size and offset of the device. .It Va rpm .It Va rpm From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 11:57:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCFE405; Thu, 12 Feb 2015 11:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF976E7; Thu, 12 Feb 2015 11:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CBvX5X040891; Thu, 12 Feb 2015 11:57:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CBvWPg040887; Thu, 12 Feb 2015 11:57:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201502121157.t1CBvWPg040887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 12 Feb 2015 11:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278622 - in head/usr.sbin: ctld iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:57:33 -0000 Author: trasz Date: Thu Feb 12 11:57:31 2015 New Revision: 278622 URL: https://svnweb.freebsd.org/changeset/base/278622 Log: Remove unused code. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/keys.c head/usr.sbin/iscsid/iscsid.h head/usr.sbin/iscsid/keys.c Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Thu Feb 12 11:27:54 2015 (r278621) +++ head/usr.sbin/ctld/ctld.h Thu Feb 12 11:57:31 2015 (r278622) @@ -416,7 +416,6 @@ void keys_delete(struct keys *keys); void keys_load(struct keys *keys, const struct pdu *pdu); void keys_save(struct keys *keys, struct pdu *pdu); const char *keys_find(struct keys *keys, const char *name); -int keys_find_int(struct keys *keys, const char *name); void keys_add(struct keys *keys, const char *name, const char *value); void keys_add_int(struct keys *keys, Modified: head/usr.sbin/ctld/keys.c ============================================================================== --- head/usr.sbin/ctld/keys.c Thu Feb 12 11:27:54 2015 (r278621) +++ head/usr.sbin/ctld/keys.c Thu Feb 12 11:57:31 2015 (r278622) @@ -161,26 +161,6 @@ keys_find(struct keys *keys, const char return (NULL); } -int -keys_find_int(struct keys *keys, const char *name) -{ - const char *str; - char *endptr; - int num; - - str = keys_find(keys, name); - if (str == NULL) - return (-1); - - num = strtoul(str, &endptr, 10); - if (*endptr != '\0') { - log_debugx("invalid numeric value \"%s\"", str); - return (-1); - } - - return (num); -} - void keys_add(struct keys *keys, const char *name, const char *value) { Modified: head/usr.sbin/iscsid/iscsid.h ============================================================================== --- head/usr.sbin/iscsid/iscsid.h Thu Feb 12 11:27:54 2015 (r278621) +++ head/usr.sbin/iscsid/iscsid.h Thu Feb 12 11:57:31 2015 (r278622) @@ -116,7 +116,6 @@ void keys_delete(struct keys *key); void keys_load(struct keys *keys, const struct pdu *pdu); void keys_save(struct keys *keys, struct pdu *pdu); const char *keys_find(struct keys *keys, const char *name); -int keys_find_int(struct keys *keys, const char *name); void keys_add(struct keys *keys, const char *name, const char *value); void keys_add_int(struct keys *keys, Modified: head/usr.sbin/iscsid/keys.c ============================================================================== --- head/usr.sbin/iscsid/keys.c Thu Feb 12 11:27:54 2015 (r278621) +++ head/usr.sbin/iscsid/keys.c Thu Feb 12 11:57:31 2015 (r278622) @@ -162,26 +162,6 @@ keys_find(struct keys *keys, const char return (NULL); } -int -keys_find_int(struct keys *keys, const char *name) -{ - const char *str; - char *endptr; - int num; - - str = keys_find(keys, name); - if (str == NULL) - return (-1); - - num = strtoul(str, &endptr, 10); - if (*endptr != '\0') { - log_debugx("invalid numeric value \"%s\"", str); - return (-1); - } - - return (num); -} - void keys_add(struct keys *keys, const char *name, const char *value) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 13:31:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87994891; Thu, 12 Feb 2015 13:31:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6848EF9; Thu, 12 Feb 2015 13:31:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CDV9Qq086270; Thu, 12 Feb 2015 13:31:09 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CDV9jR086269; Thu, 12 Feb 2015 13:31:09 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201502121331.t1CDV9jR086269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 12 Feb 2015 13:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278623 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 13:31:09 -0000 Author: rrs Date: Thu Feb 12 13:31:08 2015 New Revision: 278623 URL: https://svnweb.freebsd.org/changeset/base/278623 Log: This fixes a bug I in-advertantly inserted when I updated the callout code in my last commit. The cc_exec_next is used to track the next when a direct call is being made from callout. It is *never* used in the in-direct method. When macro-izing I made it so that it would separate out direct/vs/non-direct. This is incorrect and can cause panics as Peter Holm has found for me (Thanks so much Peter for all your help in this). What this change does is restore that behavior but also get rid of the cc_next from the array and instead make it be part of the base callout structure. This way no one else will get confused since we will never use it for non-direct. Reviewed by: Peter Holm and more importantly tested by him ;-) MFC after: 3 days. Sponsored by: Netflix Inc. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Thu Feb 12 11:57:31 2015 (r278622) +++ head/sys/kern/kern_timeout.c Thu Feb 12 13:31:08 2015 (r278623) @@ -135,7 +135,6 @@ u_int callwheelsize, callwheelmask; * the migrating callout is already running. */ struct cc_exec { - struct callout *cc_next; struct callout *cc_curr; #ifdef SMP void (*ce_migration_func)(void *); @@ -155,6 +154,7 @@ struct cc_exec { struct callout_cpu { struct mtx_padalign cc_lock; struct cc_exec cc_exec_entity[2]; + struct callout *cc_next; struct callout *cc_callout; struct callout_list *cc_callwheel; struct callout_tailq cc_expireq; @@ -167,7 +167,7 @@ struct callout_cpu { }; #define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr -#define cc_exec_next(cc, dir) cc->cc_exec_entity[dir].cc_next +#define cc_exec_next(cc) cc->cc_next #define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel #define cc_exec_waiting(cc, dir) cc->cc_exec_entity[dir].cc_waiting #ifdef SMP @@ -226,7 +226,6 @@ cc_cce_cleanup(struct callout_cpu *cc, i { cc_exec_curr(cc, direct) = NULL; - cc_exec_next(cc, direct) = NULL; cc_exec_cancel(cc, direct) = false; cc_exec_waiting(cc, direct) = false; #ifdef SMP @@ -482,7 +481,7 @@ callout_process(sbintime_t now) #ifdef CALLOUT_PROFILING ++depth_dir; #endif - cc_exec_next(cc, 1) = + cc_exec_next(cc) = LIST_NEXT(tmp, c_links.le); cc->cc_bucket = firstb & callwheelmask; LIST_REMOVE(tmp, c_links.le); @@ -491,7 +490,8 @@ callout_process(sbintime_t now) &mpcalls_dir, &lockcalls_dir, NULL, #endif 1); - tmp = cc_exec_next(cc, 1); + tmp = cc_exec_next(cc); + cc_exec_next(cc) = NULL; } else { tmpn = LIST_NEXT(tmp, c_links.le); LIST_REMOVE(tmp, c_links.le); @@ -575,7 +575,7 @@ callout_lock(struct callout *c) static void callout_cc_add(struct callout *c, struct callout_cpu *cc, sbintime_t sbt, sbintime_t precision, void (*func)(void *), - void *arg, int cpu, int flags, int direct) + void *arg, int cpu, int flags) { int bucket; @@ -584,8 +584,6 @@ callout_cc_add(struct callout *c, struct sbt = cc->cc_lastscan; c->c_arg = arg; c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING); - if (flags & C_DIRECT_EXEC) - c->c_flags |= CALLOUT_DIRECT; c->c_flags &= ~CALLOUT_PROCESSED; c->c_func = func; c->c_time = sbt; @@ -596,7 +594,7 @@ callout_cc_add(struct callout *c, struct (u_int)(c->c_precision & 0xffffffff)); LIST_INSERT_HEAD(&cc->cc_callwheel[bucket], c, c_links.le); if (cc->cc_bucket == bucket) - cc_exec_next(cc, direct) = c; + cc_exec_next(cc) = c; #ifndef NO_EVENTTIMERS /* * Inform the eventtimers(4) subsystem there's a new callout @@ -790,7 +788,7 @@ skip: new_cc = callout_cpu_switch(c, cc, new_cpu); flags = (direct) ? C_DIRECT_EXEC : 0; callout_cc_add(c, new_cc, new_time, new_prec, new_func, - new_arg, new_cpu, flags, direct); + new_arg, new_cpu, flags); CC_UNLOCK(new_cc); CC_LOCK(cc); #else @@ -994,6 +992,14 @@ callout_reset_sbt_on(struct callout *c, */ if (c->c_flags & CALLOUT_LOCAL_ALLOC) cpu = c->c_cpu; + /* + * This flag used to be added by callout_cc_add, but the + * first time you call this we could end up with the + * wrong direct flag if we don't do it before we add. + */ + if (flags & C_DIRECT_EXEC) { + c->c_flags |= CALLOUT_DIRECT; + } direct = (c->c_flags & CALLOUT_DIRECT) != 0; KASSERT(!direct || c->c_lock == NULL, ("%s: direct callout %p has lock", __func__, c)); @@ -1039,8 +1045,8 @@ callout_reset_sbt_on(struct callout *c, } if (c->c_flags & CALLOUT_PENDING) { if ((c->c_flags & CALLOUT_PROCESSED) == 0) { - if (cc_exec_next(cc, direct) == c) - cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le); + if (cc_exec_next(cc) == c) + cc_exec_next(cc) = LIST_NEXT(c, c_links.le); LIST_REMOVE(c, c_links.le); } else TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); @@ -1089,7 +1095,7 @@ callout_reset_sbt_on(struct callout *c, } #endif - callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags, direct); + callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags); CTR6(KTR_CALLOUT, "%sscheduled %p func %p arg %p in %d.%08x", cancelled ? "re" : "", c, c->c_func, c->c_arg, (int)(to_sbt >> 32), (u_int)(to_sbt & 0xffffffff)); @@ -1322,8 +1328,8 @@ again: c, c->c_func, c->c_arg); if (not_on_a_list == 0) { if ((c->c_flags & CALLOUT_PROCESSED) == 0) { - if (cc_exec_next(cc, direct) == c) - cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le); + if (cc_exec_next(cc) == c) + cc_exec_next(cc) = LIST_NEXT(c, c_links.le); LIST_REMOVE(c, c_links.le); } else TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 14:13:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0256BE6 for ; Thu, 12 Feb 2015 14:13:47 +0000 (UTC) Received: from vfemail.net (nine.vfemail.net [108.76.175.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 968037C0 for ; Thu, 12 Feb 2015 14:13:40 +0000 (UTC) Received: (qmail 51001 invoked by uid 89); 12 Feb 2015 14:13:08 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 12 Feb 2015 14:13:06 -0000 Received: (qmail 30293 invoked by uid 89); 12 Feb 2015 12:22:42 -0000 Received: by simscan 1.3.1 ppid: 30280, pid: 30286, t: 0.0068s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 12 Feb 2015 12:22:42 -0000 Received: (qmail 18628 invoked by uid 89); 12 Feb 2015 12:22:46 -0000 Received: by simscan 1.4.0 ppid: 18609, pid: 18624, t: 0.5492s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 12 Feb 2015 12:22:46 -0000 From: Jan Beich To: Devin Teske Subject: Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... In-Reply-To: (Devin Teske's message of "Wed, 11 Feb 2015 22:17:05 -0800") References: <201502120535.t1C5Z0el061979@svn.freebsd.org> Date: Thu, 12 Feb 2015 13:22:37 +0100 Message-ID: <61b7-qpyq-wny@vfemail.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Devin Teske , "src-committers@freebsd.org" , Colin Percival X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 14:13:48 -0000 --=-=-= Content-Type: text/plain Devin Teske writes: > PLEASE! Do NOT remove the grand digital clock (grdc). > > So many of us over the years have used it as a terminal keeper-aliver :) (and as a clock, to boot). > > I will be very sad if you remove grdc. Aren't there better alternatives in ports? clock-mode in sysutils/tmux, sysutils/tty-clock, sysutils/currtime to name a few. OTOH, grdc(6) lacks a license, unmaintained, has a few PRs with patches. Not to mention it paints the whole terminal black sans the glitchy NCURSES_ASSUMED_COLORS=-1,-1. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJU3JsNXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bbXkH/2xL2vCnYlryEntlgmKNhbSH QDq0WpwL8RkfL2E8pktLMoE7B4qR6WcFwoQw7YzFeghLv+Ie4cW1eRIMlgdXZaH7 hagkmuCtqBWElyxRM0R3/EZbiHzV9WOWfZx7mm40wcuochj9xzFoP5kyEQMEDQbu z4ApZf6yjzefQihqtCPCGJZ9zVfYVwX+5en2a6HF79PMpMuCGMa2VyGzBYmPIvtM f/SJgHNAKUnjTCZPA1IVyWnrwAglZHZARycLZmWxQFlavyXq103r6oxWpL0CvKGo phVxJ2AeUEP87pakHTcDETubsf0z9FMLGulwksAsvrUdqFL5FsjTugsKX/5w7ic= =Fhr9 -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 15:46:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76B6DF62; Thu, 12 Feb 2015 15:46:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57403281; Thu, 12 Feb 2015 15:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CFkkQn050079; Thu, 12 Feb 2015 15:46:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CFkj3n050075; Thu, 12 Feb 2015 15:46:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502121546.t1CFkj3n050075@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Feb 2015 15:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278625 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 15:46:46 -0000 Author: mav Date: Thu Feb 12 15:46:44 2015 New Revision: 278625 URL: https://svnweb.freebsd.org/changeset/base/278625 Log: Make XCOPY and WUT commands respect physical block size/offset. This change by 2-3 times improves performance of misaligned XCOPY and WUT commands by avoiding unneeded read-modify-write cycles inside ZFS. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_tpc.c head/sys/cam/ctl/ctl_tpc.h head/sys/cam/ctl/ctl_tpc_local.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Thu Feb 12 15:34:16 2015 (r278624) +++ head/sys/cam/ctl/ctl_backend_block.c Thu Feb 12 15:46:44 2015 (r278625) @@ -1187,7 +1187,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len_flags *lbalen; - uint64_t len_left, lba, pb, pbo, adj; + uint64_t len_left, lba; + uint32_t pb, pbo, adj; int i, seglen; uint8_t *buf, *end; @@ -1241,8 +1242,11 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b DPRINTF("WRITE SAME at LBA %jx len %u\n", (uintmax_t)lbalen->lba, lbalen->len); - pb = (uint64_t)be_lun->blocksize << be_lun->pblockexp; - pbo = pb - (uint64_t)be_lun->blocksize * be_lun->pblockoff; + pb = be_lun->blocksize << be_lun->pblockexp; + if (be_lun->pblockoff > 0) + pbo = pb - be_lun->blocksize * be_lun->pblockoff; + else + pbo = 0; len_left = (uint64_t)lbalen->len * be_lun->blocksize; for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Thu Feb 12 15:34:16 2015 (r278624) +++ head/sys/cam/ctl/ctl_tpc.c Thu Feb 12 15:46:44 2015 (r278625) @@ -785,18 +785,25 @@ ctl_copy_operation_abort(struct ctl_scsi } static uint64_t -tpc_resolve(struct tpc_list *list, uint16_t idx, uint32_t *ss) +tpc_resolve(struct tpc_list *list, uint16_t idx, uint32_t *ss, + uint32_t *pb, uint32_t *pbo) { if (idx == 0xffff) { if (ss && list->lun->be_lun) *ss = list->lun->be_lun->blocksize; + if (pb && list->lun->be_lun) + *pb = list->lun->be_lun->blocksize << + list->lun->be_lun->pblockexp; + if (pbo && list->lun->be_lun) + *pbo = list->lun->be_lun->blocksize * + list->lun->be_lun->pblockoff; return (list->lun->lun); } if (idx >= list->ncscd) return (UINT64_MAX); return (tpcl_resolve(list->lun->ctl_softc, - list->init_port, &list->cscd[idx], ss)); + list->init_port, &list->cscd[idx], ss, pb, pbo)); } static int @@ -809,7 +816,7 @@ tpc_process_b2b(struct tpc_list *list) uint64_t sl, dl; off_t srclba, dstlba, numbytes, donebytes, roundbytes; int numlba; - uint32_t srcblock, dstblock; + uint32_t srcblock, dstblock, pb, pbo, adj; if (list->stage == 1) { while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { @@ -834,14 +841,16 @@ tpc_process_b2b(struct tpc_list *list) TAILQ_INIT(&list->allio); seg = (struct scsi_ec_segment_b2b *)list->seg[list->curseg]; - sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), &srcblock); - dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), &dstblock); + sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), &srcblock, NULL, NULL); + dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), &dstblock, &pb, &pbo); if (sl >= CTL_MAX_LUNS || dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } + if (pbo > 0) + pbo = pb - pbo; sdstp = &list->cscd[scsi_2btoul(seg->src_cscd)].dtsp; if (scsi_3btoul(sdstp->block_length) != 0) srcblock = scsi_3btoul(sdstp->block_length); @@ -878,7 +887,16 @@ tpc_process_b2b(struct tpc_list *list) prun = &run; list->tbdio = 1; while (donebytes < numbytes) { - roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE); + roundbytes = numbytes - donebytes; + if (roundbytes > TPC_MAX_IO_SIZE) { + roundbytes = TPC_MAX_IO_SIZE; + roundbytes -= roundbytes % dstblock; + if (pb > dstblock) { + adj = (dstlba * dstblock + roundbytes - pbo) % pb; + if (roundbytes > adj) + roundbytes -= adj; + } + } tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); @@ -891,7 +909,7 @@ tpc_process_b2b(struct tpc_list *list) /*read_op*/ 1, /*byte2*/ 0, /*minimum_cdb_size*/ 0, - /*lba*/ srclba + donebytes / srcblock, + /*lba*/ srclba, /*num_blocks*/ roundbytes / srcblock, /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); @@ -910,7 +928,7 @@ tpc_process_b2b(struct tpc_list *list) /*read_op*/ 0, /*byte2*/ 0, /*minimum_cdb_size*/ 0, - /*lba*/ dstlba + donebytes / dstblock, + /*lba*/ dstlba, /*num_blocks*/ roundbytes / dstblock, /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); @@ -922,6 +940,8 @@ tpc_process_b2b(struct tpc_list *list) TAILQ_INSERT_TAIL(prun, tior, rlinks); prun = &tior->run; donebytes += roundbytes; + srclba += roundbytes / srcblock; + dstlba += roundbytes / dstblock; } while ((tior = TAILQ_FIRST(&run)) != NULL) { @@ -961,7 +981,7 @@ tpc_process_verify(struct tpc_list *list TAILQ_INIT(&list->allio); seg = (struct scsi_ec_segment_verify *)list->seg[list->curseg]; - sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), NULL); + sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), NULL, NULL, NULL); if (sl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, @@ -1019,7 +1039,7 @@ tpc_process_register_key(struct tpc_list TAILQ_INIT(&list->allio); seg = (struct scsi_ec_segment_register_key *)list->seg[list->curseg]; - dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), NULL); + dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), NULL, NULL, NULL); if (dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, @@ -1090,7 +1110,7 @@ tpc_process_wut(struct tpc_list *list) int drange, srange; off_t doffset, soffset; off_t srclba, dstlba, numbytes, donebytes, roundbytes; - uint32_t srcblock, dstblock; + uint32_t srcblock, dstblock, pb, pbo, adj; if (list->stage > 0) { /* Cleanup after previous rounds. */ @@ -1118,6 +1138,11 @@ tpc_process_wut(struct tpc_list *list) &drange, &doffset) != 0) return (CTL_RETVAL_COMPLETE); dstblock = list->lun->be_lun->blocksize; + pb = dstblock << list->lun->be_lun->pblockexp; + if (list->lun->be_lun->pblockoff > 0) + pbo = pb - dstblock * list->lun->be_lun->pblockoff; + else + pbo = 0; /* Check where we are on source ranges list. */ srcblock = list->token->blocksize; @@ -1131,12 +1156,20 @@ tpc_process_wut(struct tpc_list *list) } srclba = scsi_8btou64(list->token->range[srange].lba) + soffset; - numbytes = srcblock * omin(TPC_MAX_IOCHUNK_SIZE / srcblock, - (scsi_4btoul(list->token->range[srange].length) - soffset)); dstlba = scsi_8btou64(list->range[drange].lba) + doffset; - numbytes = omin(numbytes, - dstblock * omin(TPC_MAX_IOCHUNK_SIZE / dstblock, - (scsi_4btoul(list->range[drange].length) - doffset))); + numbytes = srcblock * + (scsi_4btoul(list->token->range[srange].length) - soffset); + numbytes = omin(numbytes, dstblock * + (scsi_4btoul(list->range[drange].length) - doffset)); + if (numbytes > TPC_MAX_IOCHUNK_SIZE) { + numbytes = TPC_MAX_IOCHUNK_SIZE; + numbytes -= numbytes % dstblock; + if (pb > dstblock) { + adj = (dstlba * dstblock + numbytes - pbo) % pb; + if (numbytes > adj) + numbytes -= adj; + } + } if (numbytes % srcblock != 0 || numbytes % dstblock != 0) { ctl_set_sense(list->ctsio, /*current_error*/ 1, @@ -1157,7 +1190,16 @@ tpc_process_wut(struct tpc_list *list) list->tbdio = 1; TAILQ_INIT(&list->allio); while (donebytes < numbytes) { - roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE); + roundbytes = numbytes - donebytes; + if (roundbytes > TPC_MAX_IO_SIZE) { + roundbytes = TPC_MAX_IO_SIZE; + roundbytes -= roundbytes % dstblock; + if (pb > dstblock) { + adj = (dstlba * dstblock + roundbytes - pbo) % pb; + if (roundbytes > adj) + roundbytes -= adj; + } + } tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); @@ -1170,7 +1212,7 @@ tpc_process_wut(struct tpc_list *list) /*read_op*/ 1, /*byte2*/ 0, /*minimum_cdb_size*/ 0, - /*lba*/ srclba + donebytes / srcblock, + /*lba*/ srclba, /*num_blocks*/ roundbytes / srcblock, /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); @@ -1189,7 +1231,7 @@ tpc_process_wut(struct tpc_list *list) /*read_op*/ 0, /*byte2*/ 0, /*minimum_cdb_size*/ 0, - /*lba*/ dstlba + donebytes / dstblock, + /*lba*/ dstlba, /*num_blocks*/ roundbytes / dstblock, /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); @@ -1201,6 +1243,8 @@ tpc_process_wut(struct tpc_list *list) TAILQ_INSERT_TAIL(prun, tior, rlinks); prun = &tior->run; donebytes += roundbytes; + srclba += roundbytes / srcblock; + dstlba += roundbytes / dstblock; } while ((tior = TAILQ_FIRST(&run)) != NULL) { Modified: head/sys/cam/ctl/ctl_tpc.h ============================================================================== --- head/sys/cam/ctl/ctl_tpc.h Thu Feb 12 15:34:16 2015 (r278624) +++ head/sys/cam/ctl/ctl_tpc.h Thu Feb 12 15:46:44 2015 (r278625) @@ -32,7 +32,7 @@ void tpc_done(union ctl_io *io); uint64_t tpcl_resolve(struct ctl_softc *softc, int init_port, - struct scsi_ec_cscd *cscd, uint32_t *ss); + struct scsi_ec_cscd *cscd, uint32_t *ss, uint32_t *ps, uint32_t *pso); union ctl_io * tpcl_alloc_io(void); int tpcl_queue(union ctl_io *io, uint64_t lun); Modified: head/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc_local.c Thu Feb 12 15:34:16 2015 (r278624) +++ head/sys/cam/ctl/ctl_tpc_local.c Thu Feb 12 15:46:44 2015 (r278625) @@ -309,7 +309,7 @@ tpcl_done(union ctl_io *io) uint64_t tpcl_resolve(struct ctl_softc *softc, int init_port, - struct scsi_ec_cscd *cscd, uint32_t *ss) + struct scsi_ec_cscd *cscd, uint32_t *ss, uint32_t *ps, uint32_t *pso) { struct scsi_ec_cscd_id *cscdid; struct ctl_port *port; @@ -337,6 +337,12 @@ tpcl_resolve(struct ctl_softc *softc, in lunid = lun->lun; if (ss && lun->be_lun) *ss = lun->be_lun->blocksize; + if (ps && lun->be_lun) + *ps = lun->be_lun->blocksize << + lun->be_lun->pblockexp; + if (pso && lun->be_lun) + *pso = lun->be_lun->blocksize * + lun->be_lun->pblockoff; break; } } From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 17:01:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9ED3D5B; Thu, 12 Feb 2015 17:01:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5352D73; Thu, 12 Feb 2015 17:01:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CH1tkH087155; Thu, 12 Feb 2015 17:01:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CH1tvW087154; Thu, 12 Feb 2015 17:01:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121701.t1CH1tvW087154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 17:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278626 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:01:55 -0000 Author: ian Date: Thu Feb 12 17:01:54 2015 New Revision: 278626 URL: https://svnweb.freebsd.org/changeset/base/278626 Log: MFC r276191: Display correct value for cache level-of-coherency (needs +1). Modified: stable/10/sys/arm/arm/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/identcpu.c ============================================================================== --- stable/10/sys/arm/arm/identcpu.c Thu Feb 12 15:46:44 2015 (r278625) +++ stable/10/sys/arm/arm/identcpu.c Thu Feb 12 17:01:54 2015 (r278626) @@ -455,7 +455,7 @@ identify_arm_cpu(void) if (arm_cache_level) { printf("LoUU:%d LoC:%d LoUIS:%d \n", CPU_CLIDR_LOUU(arm_cache_level) + 1, - arm_cache_loc, CPU_CLIDR_LOUIS(arm_cache_level) + 1); + arm_cache_loc + 1, CPU_CLIDR_LOUIS(arm_cache_level) + 1); i = 0; while (((type = CPU_CLIDR_CTYPE(arm_cache_level, i)) != 0) && i < 7) { printf("Cache level %d: \n", i + 1); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 17:16:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 401C220E; Thu, 12 Feb 2015 17:16:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12040ED2; Thu, 12 Feb 2015 17:16:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CHGsiA092510; Thu, 12 Feb 2015 17:16:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CHGsbm092509; Thu, 12 Feb 2015 17:16:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502121716.t1CHGsbm092509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 12 Feb 2015 17:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278627 - head/lib/libthr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:16:55 -0000 Author: kib Date: Thu Feb 12 17:16:54 2015 New Revision: 278627 URL: https://svnweb.freebsd.org/changeset/base/278627 Log: Update libthr(3) man page to reflect the work done to support dlopen. Noted and reviewed by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libthr/libthr.3 Modified: head/lib/libthr/libthr.3 ============================================================================== --- head/lib/libthr/libthr.3 Thu Feb 12 17:01:54 2015 (r278626) +++ head/lib/libthr/libthr.3 Thu Feb 12 17:16:54 2015 (r278627) @@ -1,5 +1,5 @@ .\" Copyright (c) 2005 Robert N. M. Watson -.\" Copyright (c) 2014 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2014,2015 The FreeBSD Foundation, Inc. .\" All rights reserved. .\" .\" Part of this documentation was written by @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd February 12, 2015 .Dt LIBTHR 3 .Os .Sh NAME @@ -200,45 +200,25 @@ Bigger values reduce the frequency of th The value must be between 0 and 255. .El .Sh INTERACTION WITH RUN-TIME LINKER -The +On load, .Nm -library must appear before -.Li libc -in the global order of depended objects. -.Pp -Loading -.Nm -with the -.Xr dlopen 3 -call in the process after the program binary is activated -is not supported, and causes miscellaneous and hard-to-diagnose misbehaviour. -This is due to -.Nm -interposing several important -.Li libc -symbols to provide thread-safe services. -In particular, -.Dv errno -and the locking stubs from -.Li libc -are affected. -This requirement is currently not enforced. -.Pp -If the program loads any modules at run-time, and those modules may require -threading services, the main program binary must be linked with -.Li libpthread , -even if it does not require any services from the library. +installs interposing handlers into the hooks exported by +.Li libc . +The interposers provide real locking implementation instead of the +stubs for single-threaded processes in +.Li , +cancellation support and some modifications to the signal operations. .Pp .Nm cannot be unloaded; the .Xr dlclose 3 function does not perform any action when called with a handle for .Nm . -One of the reasons is that the interposing of +One of the reasons is that the internal interposing of .Li libc functions cannot be undone. .Sh SIGNALS -The implementation also interposes the user-installed +The implementation interposes the user-installed .Xr signal 3 handlers. This interposing is done to postpone signal delivery to threads which From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 17:58:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7188B24F; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD553E1; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CHw3l0011654; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CHw3mP011653; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502121758.t1CHw3mP011653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 12 Feb 2015 17:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278628 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:58:03 -0000 Author: jhb Date: Thu Feb 12 17:58:02 2015 New Revision: 278628 URL: https://svnweb.freebsd.org/changeset/base/278628 Log: MFC 277710: Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() instead of NULL. Modified: stable/10/sys/dev/pci/pci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Thu Feb 12 17:16:54 2015 (r278627) +++ stable/10/sys/dev/pci/pci_pci.c Thu Feb 12 17:58:02 2015 (r278628) @@ -933,11 +933,13 @@ int pcib_resume(device_t dev) { device_t pcib; + int dstate; if (pci_do_power_resume) { pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0) - pci_set_powerstate(dev, PCI_POWERSTATE_D0); + dstate = PCI_POWERSTATE_D0; + if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) + pci_set_powerstate(dev, dstate); } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 19:32:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97B1490D; Thu, 12 Feb 2015 19:32:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 781B9FB0; Thu, 12 Feb 2015 19:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CJW8s7058868; Thu, 12 Feb 2015 19:32:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJW8Yf058866; Thu, 12 Feb 2015 19:32:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121932.t1CJW8Yf058866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278629 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:32:08 -0000 Author: ian Date: Thu Feb 12 19:32:07 2015 New Revision: 278629 URL: https://svnweb.freebsd.org/changeset/base/278629 Log: MFC r276196, r276197, r276198, r276202, r276203, r276204: Change the style of the DO_AST macro to match the others Remove _PROF_PROLOGUE from the EENTRY() macros. Stylish changes... put tabs where they need to be in macros, move lines around so that related things are more grouped together, rewrite comments. Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY. Create 'L' variants of all the ENTRY macros for file-static/local symbols. Modified: stable/10/sys/arm/arm/exception.S stable/10/sys/arm/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 17:58:02 2015 (r278628) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 19:32:07 2015 (r278629) @@ -241,26 +241,26 @@ __FBSDID("$FreeBSD$"); #define UNWINDSVCFRAME #endif -#define DO_AST \ - ldr r0, [sp] /* Get the SPSR from stack */ ;\ - mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r1 /* Disable interrupts */ ;\ - and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ - teq r0, #(PSR_USR32_MODE) ;\ - bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(PSR_I|PSR_F) ;\ -1: GET_CURTHREAD_PTR(r5) ;\ - ldr r1, [r5, #(TD_FLAGS)] ;\ - and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ - teq r1, #0x00000000 ;\ - beq 2f /* Nope. Just bail */ ;\ - msr cpsr_c, r4 /* Restore interrupts */ ;\ - mov r0, sp ;\ - bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r0 ;\ - b 1b ;\ +#define DO_AST \ + ldr r0, [sp]; /* Get the SPSR from stack */ \ + mrs r4, cpsr; /* save CPSR */ \ + orr r1, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r1; /* Disable interrupts */ \ + and r0, r0, #(PSR_MODE); /* Returning to USR mode? */ \ + teq r0, #(PSR_USR32_MODE); \ + bne 2f; /* Nope, get out now */ \ + bic r4, r4, #(PSR_I|PSR_F); \ +1: GET_CURTHREAD_PTR(r5); \ + ldr r1, [r5, #(TD_FLAGS)]; \ + and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED); \ + teq r1, #0; \ + beq 2f; /* Nope. Just bail */ \ + msr cpsr_c, r4; /* Restore interrupts */ \ + mov r0, sp; \ + bl _C_LABEL(ast); /* ast(frame) */ \ + orr r0, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r0; \ + b 1b; \ 2: Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 17:58:02 2015 (r278628) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 19:32:07 2015 (r278629) @@ -58,7 +58,24 @@ #endif /* + * gas/arm uses @ as a single comment character and thus cannot be used here. + * It recognises the # instead of an @ symbol in .type directives. + */ +#define _ASM_TYPE_FUNCTION #function +#define _ASM_TYPE_OBJECT #object + +/* XXX Is this still the right prologue for profiling? */ +#ifdef GPROF +#define _PROF_PROLOGUE \ + mov ip, lr; \ + bl __mcount +#else +#define _PROF_PROLOGUE +#endif + +/* * EENTRY()/EEND() mark "extra" entry/exit points from a function. + * LEENTRY()/LEEND() are the the same for local symbols. * The unwind info cannot handle the concept of a nested function, or a function * with multiple .fnstart directives, but some of our assembler code is written * with multiple labels to allow entry at several points. The EENTRY() macro @@ -66,41 +83,36 @@ * basically just a label that you can jump to. The EEND() macro does nothing * at all, except document the exit point associated with the same-named entry. */ -#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: -#define _EEND(x) /* nothing */ +#define GLOBAL(x) .global x -/* - * gas/arm uses @ as a single comment character and thus cannot be used here - * Instead it recognised the # instead of an @ symbols in .type directives - * We define a couple of macros so that assembly code will not be dependent - * on one or the other. - */ -#define _ASM_TYPE_FUNCTION #function -#define _ASM_TYPE_OBJECT #object -#define GLOBAL(X) .globl x -#define _ENTRY(x) \ - .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART -#define _END(x) .size x, . - x; _FNEND - -#ifdef GPROF -# define _PROF_PROLOGUE \ - mov ip, lr; bl __mcount -#else -# define _PROF_PROLOGUE -#endif +#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; x: +#define _LEEND(x) /* nothing */ +#define _EENTRY(x) GLOBAL(x); _LEENTRY(x) +#define _EEND(x) _LEEND(x) + +#define _LENTRY(x) .text; _ALIGN_TEXT; _LEENTRY(x); _FNSTART +#define _LEND(x) .size x, . - x; _FNEND +#define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x); _FNSTART +#define _END(x) _LEND(x) #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE -#define EENTRY(y) _EENTRY(_C_LABEL(y)); _PROF_PROLOGUE +#define EENTRY(y) _EENTRY(_C_LABEL(y)); #define ENTRY_NP(y) _ENTRY(_C_LABEL(y)) #define EENTRY_NP(y) _EENTRY(_C_LABEL(y)) #define END(y) _END(_C_LABEL(y)) -#define EEND(y) +#define EEND(y) _EEND(_C_LABEL(y)) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE -#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASLENTRY(y) _LENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); +#define ASLEENTRY(y) _LEENTRY(_ASM_LABEL(y)); #define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) +#define ASLENTRY_NP(y) _LENTRY(_ASM_LABEL(y)) #define ASEENTRY_NP(y) _EENTRY(_ASM_LABEL(y)) +#define ASLEENTRY_NP(y) _LEENTRY(_ASM_LABEL(y)) #define ASEND(y) _END(_ASM_LABEL(y)) -#define ASEEND(y) +#define ASLEND(y) _LEND(_ASM_LABEL(y)) +#define ASEEND(y) _EEND(_ASM_LABEL(y)) +#define ASLEEND(y) _LEEND(_ASM_LABEL(y)) #define ASMSTR .asciz From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 19:35:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF83A80; Thu, 12 Feb 2015 19:35:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA481FD5; Thu, 12 Feb 2015 19:35:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CJZlGZ059420; Thu, 12 Feb 2015 19:35:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJZl3q059417; Thu, 12 Feb 2015 19:35:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121935.t1CJZl3q059417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278630 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:35:48 -0000 Author: ian Date: Thu Feb 12 19:35:46 2015 New Revision: 278630 URL: https://svnweb.freebsd.org/changeset/base/278630 Log: MFC r276206: For data and instruction prefetch aborts, call the same handler in the C code, passing a 0/1 flag that indicates which type of abort it was. This sets the stage for unifying the handling of page faults in a single routine. Modified: stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/include/machdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 19:35:46 2015 (r278630) @@ -320,7 +320,8 @@ ASENTRY_NP(prefetch_abort_entry) PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Return from handler via standard */ mov r0, sp /* exception exit routine. Pass the */ - b prefetch_abort_handler /* trapframe to the handler. */ + mov r1, #1 /* Type flag */ + b _C_LABEL(abort_handler) END(prefetch_abort_entry) /* @@ -337,9 +338,10 @@ ASENTRY_NP(data_abort_entry) #endif sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ - adr lr, exception_exit /* Return from handler via standard */ - mov r0, sp /* exception exit routine. Pass the */ - b data_abort_handler /* trapframe to the handler. */ + adr lr, exception_exit /* Exception exit routine */ + mov r0, sp /* Trapframe to the handler */ + mov r1, #0 /* Type flag */ + b _C_LABEL(abort_handler) END(data_abort_entry) /* Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 19:35:46 2015 (r278630) @@ -152,6 +152,7 @@ static int dab_align(struct trapframe *, struct ksig *); static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *, struct ksig *); +static void prefetch_abort_handler(struct trapframe *); static const struct data_abort data_aborts[] = { {dab_fatal, "Vector Exception"}, @@ -196,7 +197,7 @@ call_trapsignal(struct thread *td, int s } void -data_abort_handler(struct trapframe *tf) +abort_handler(struct trapframe *tf, int type) { struct vm_map *map; struct pcb *pcb; @@ -209,6 +210,8 @@ data_abort_handler(struct trapframe *tf) struct ksig ksig; struct proc *p; + if (type == 1) + return (prefetch_abort_handler(tf)); /* Grab FAR/FSR before enabling interrupts */ far = cpu_faultaddress(); @@ -625,7 +628,7 @@ dab_buserr(struct trapframe *tf, u_int f * does no have read permission so send it a signal. * Otherwise fault the page in and try again. */ -void +static void prefetch_abort_handler(struct trapframe *tf) { struct thread *td; Modified: stable/10/sys/arm/include/machdep.h ============================================================================== --- stable/10/sys/arm/include/machdep.h Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/include/machdep.h Thu Feb 12 19:35:46 2015 (r278630) @@ -20,8 +20,7 @@ struct trapframe; void arm_lock_cache_line(vm_offset_t); void init_proc0(vm_offset_t kstack); void halt(void); -void data_abort_handler(struct trapframe *); -void prefetch_abort_handler(struct trapframe *); +void abort_handler(struct trapframe *, int ); void set_stackptrs(int cpu); void undefinedinstruction_bounce(struct trapframe *); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 19:45:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75662C60; Thu, 12 Feb 2015 19:45:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E40A121; Thu, 12 Feb 2015 19:45:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CJj8V3064152; Thu, 12 Feb 2015 19:45:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJj78t064149; Thu, 12 Feb 2015 19:45:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121945.t1CJj78t064149@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278631 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:45:08 -0000 Author: ian Date: Thu Feb 12 19:45:07 2015 New Revision: 278631 URL: https://svnweb.freebsd.org/changeset/base/278631 Log: MFC r272209, r272300, r276212, r276213: Add machine/sysreg.h to simplify accessing the system control coprocessor registers and use it in the ARMv7 CPU functions. Add macros for asm barrier instructions with arch-specific implementations. Define only the CP15 register operations that are valid for the architecture. Added: stable/10/sys/arm/include/sysreg.h - copied, changed from r272209, head/sys/arm/include/sysreg.h Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Thu Feb 12 19:35:46 2015 (r278630) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Thu Feb 12 19:45:07 2015 (r278631) @@ -33,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include + .cpu cortex-a8 .Lcoherency_level: @@ -70,12 +72,12 @@ ENTRY(armv7_setttb) dsb orr r0, r0, #PT_ATTR - mcr p15, 0, r0, c2, c0, 0 /* Translation Table Base Register 0 (TTBR0) */ + mcr CP15_TTBR0(r0) isb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* invalidate I+D TLBs Inner Shareable*/ + mcr CP15_TLBIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + mcr CP15_TLBIALL #endif dsb isb @@ -85,11 +87,11 @@ END(armv7_setttb) ENTRY(armv7_tlb_flushID) dsb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* flush Unified TLB all entries Inner Shareable */ - mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ + mcr CP15_TLBIALLIS + mcr CP15_BPIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* flush Unified TLB all entries */ - mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ + mcr CP15_TLBIALL + mcr CP15_BPIALL #endif dsb isb @@ -100,11 +102,11 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 3 /* flush Unified TLB single entry Inner Shareable */ - mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ + mcr CP15_TLBIMVAAIS(r0) + mcr CP15_BPIALLIS #else - mcr p15, 0, r0, c8, c7, 1 /* flush Unified TLB single entry */ - mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ + mcr CP15_TLBIMVA(r0) + mcr CP15_BPIALL #endif dsb isb @@ -149,7 +151,7 @@ Loop3: orr r6, r6, r7, lsl r2 /* Clean and invalidate data cache by way/index */ - mcr p15, 0, r6, c7, c14, 2 + mcr CP15_DCCISW(r6) subs r9, r9, #1 bge Loop3 subs r7, r7, #1 @@ -168,9 +170,9 @@ ENTRY(armv7_idcache_wbinv_all) stmdb sp!, {lr} bl armv7_dcache_wbinv_all #ifdef SMP - mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I caches to PoU (ICIALLUIS) */ + mcr CP15_ICIALLUIS #else - mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I caches to PoU (ICIALLU) */ + mcr CP15_ICIALLU #endif dsb isb @@ -191,7 +193,7 @@ ENTRY(armv7_dcache_wb_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_wb_next: - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ + mcr CP15_DCCMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_wb_next @@ -206,7 +208,7 @@ ENTRY(armv7_dcache_wbinv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_wbinv_next: - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ + mcr CP15_DCCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_wbinv_next @@ -225,7 +227,7 @@ ENTRY(armv7_dcache_inv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_inv_next: - mcr p15, 0, r0, c7, c6, 1 /* Invalidate D cache SE with VA */ + mcr CP15_DCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_inv_next @@ -240,8 +242,8 @@ ENTRY(armv7_idcache_wbinv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_id_wbinv_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ + mcr CP15_ICIMVAU(r0) + mcr CP15_DCCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_id_wbinv_next @@ -252,9 +254,9 @@ END(armv7_idcache_wbinv_range) ENTRY_NP(armv7_icache_sync_all) #ifdef SMP - mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I cache to PoU Inner Shareable */ + mcr CP15_ICIALLUIS #else - mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I cache to PoU (ICIALLU) */ + mcr CP15_ICIALLU #endif isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ @@ -264,8 +266,8 @@ END(armv7_icache_sync_all) ENTRY_NP(armv7_icache_sync_range) ldr ip, .Larmv7_line_size .Larmv7_sync_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ + mcr CP15_ICIMVAU(r0) + mcr CP15_DCCMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_sync_next @@ -283,13 +285,13 @@ END(armv7_cpu_sleep) ENTRY(armv7_context_switch) dsb orr r0, r0, #PT_ATTR - - mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ + + mcr CP15_TTBR0(r0) isb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* and flush the I+D tlbs Inner Sharable */ + mcr CP15_TLBIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* and flush the I+D tlbs */ + mcr CP15_TLBIALL #endif dsb isb @@ -309,12 +311,12 @@ ENTRY(armv7_sev) END(armv7_sev) ENTRY(armv7_auxctrl) - mrc p15, 0, r2, c1, c0, 1 + mrc CP15_ACTLR(r2) bic r3, r2, r0 /* Clear bits */ eor r3, r3, r1 /* XOR bits */ teq r2, r3 - mcrne p15, 0, r3, c1, c0, 1 + mcrne CP15_ACTLR(r3) mov r0, r2 RET END(armv7_auxctrl) @@ -325,8 +327,8 @@ END(armv7_auxctrl) */ ENTRY(armv7_idcache_inv_all) mov r0, #0 - mcr p15, 2, r0, c0, c0, 0 @ set cache level to L1 - mrc p15, 1, r0, c0, c0, 0 @ read CCSIDR + mcr CP15_CSSELR(r0) @ set cache level to L1 + mrc CP15_CCSIDR(r0) ubfx r2, r0, #13, #15 @ get num sets - 1 from CCSIDR ubfx r3, r0, #3, #10 @ get numways - 1 from CCSIDR @@ -345,7 +347,7 @@ ENTRY(armv7_idcache_inv_all) mov r2, ip @ r2 now contains set way decr /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -1: mcr p15, 0, r3, c7, c6, 2 @ invalidate line +1: mcr CP15_DCISW(r3) @ invalidate line movs r0, r3 @ get current way/set beq 2f @ at 0 means we are done. movs r0, r0, lsl #10 @ clear way bits leaving only set bits @@ -355,7 +357,7 @@ ENTRY(armv7_idcache_inv_all) 2: dsb @ wait for stores to finish mov r0, #0 @ and ... - mcr p15, 0, r0, c7, c5, 0 @ invalidate instruction+branch cache + mcr CP15_ICIALLU @ invalidate instruction+branch cache isb @ instruction sync barrier bx lr @ return END(armv7_idcache_inv_all) Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 19:35:46 2015 (r278630) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 19:45:07 2015 (r278631) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #define _C_LABEL(x) x #define _ASM_LABEL(x) x @@ -221,4 +222,18 @@ # define RETc(c) mov##c pc, lr #endif +#if __ARM_ARCH >= 7 +#define ISB isb +#define DSB dsb +#define DMB dmb +#elif __ARM_ARCH == 6 +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB +#define DMB mcr CP15_CP15DMB +#else +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ +#define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +#endif + #endif /* !_MACHINE_ASM_H_ */ Copied and modified: stable/10/sys/arm/include/sysreg.h (from r272209, head/sys/arm/include/sysreg.h) ============================================================================== --- head/sys/arm/include/sysreg.h Sat Sep 27 09:57:34 2014 (r272209, copy source) +++ stable/10/sys/arm/include/sysreg.h Thu Feb 12 19:45:07 2015 (r278631) @@ -34,6 +34,8 @@ #ifndef MACHINE_SYSREG_H #define MACHINE_SYSREG_H +#include + /* * CP15 C0 registers */ @@ -97,12 +99,13 @@ #if __ARM_ARCH >= 6 /* From ARMv6: */ #define CP15_IFSR(rr) p15, 0, rr, c5, c0, 1 /* Instruction Fault Status Register */ +#endif +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ADFSR(rr) p15, 0, rr, c5, c1, 0 /* Auxiliary Data Fault Status Register */ #define CP15_AIFSR(rr) p15, 0, rr, c5, c1, 1 /* Auxiliary Instruction Fault Status Register */ #endif - /* * CP15 C6 registers */ @@ -116,7 +119,7 @@ /* * CP15 C7 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_ICIALLUIS p15, 0, r0, c7, c1, 0 /* Instruction cache invalidate all PoU, IS */ #define CP15_BPIALLIS p15, 0, r0, c7, c1, 6 /* Branch predictor invalidate all IS */ @@ -126,14 +129,14 @@ #define CP15_ICIALLU p15, 0, r0, c7, c5, 0 /* Instruction cache invalidate all PoU */ #define CP15_ICIMVAU(rr) p15, 0, rr, c7, c5, 1 /* Instruction cache invalidate */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Deprecated in ARMv7 */ #define CP15_CP15ISB p15, 0, r0, c7, c5, 4 /* ISB */ #endif #define CP15_BPIALL p15, 0, r0, c7, c5, 6 /* Branch predictor invalidate all */ #define CP15_BPIMVA p15, 0, rr, c7, c5, 7 /* Branch predictor invalidate by MVA */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCIALL p15, 0, r0, c7, c6, 0 /* Data cache invalidate all */ #endif @@ -145,7 +148,7 @@ #define CP15_ATS1CUR(rr) p15, 0, rr, c7, c8, 2 /* Stage 1 Current state unprivileged read */ #define CP15_ATS1CUW(rr) p15, 0, rr, c7, c8, 3 /* Stage 1 Current state unprivileged write */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ATS12NSOPR(rr) p15, 0, rr, c7, c8, 4 /* Stages 1 and 2 Non-secure only PL1 read */ #define CP15_ATS12NSOPW(rr) p15, 0, rr, c7, c8, 5 /* Stages 1 and 2 Non-secure only PL1 write */ @@ -153,24 +156,24 @@ #define CP15_ATS12NSOUW(rr) p15, 0, rr, c7, c8, 7 /* Stages 1 and 2 Non-secure only unprivileged write */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCALL p15, 0, r0, c7, c10, 0 /* Data cache clean all */ #endif #define CP15_DCCMVAC(rr) p15, 0, rr, c7, c10, 1 /* Data cache clean by MVA PoC */ #define CP15_DCCSW(rr) p15, 0, rr, c7, c10, 2 /* Data cache clean by set/way */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */ #define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_DCCMVAU(rr) p15, 0, rr, c7, c11, 1 /* Data cache clean by MVA PoU */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCIALL p15, 0, r0, c7, c14, 0 /* Data cache clean and invalidate all */ #endif @@ -180,7 +183,7 @@ /* * CP15 C8 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_TLBIALLIS p15, 0, r0, c8, c3, 0 /* Invalidate entire unified TLB IS */ #define CP15_TLBIMVAIS(rr) p15, 0, rr, c8, c3, 1 /* Invalidate unified TLB by MVA IS */ @@ -227,4 +230,9 @@ #define CP15_TPIDRURO(rr) p15, 0, rr, c13, c0, 3 /* User Read-Only Thread ID Register */ #define CP15_TPIDRPRW(rr) p15, 0, rr, c13, c0, 4 /* PL1 only Thread ID Register */ +/* + * CP15 C15 registers + */ +#define CP15_CBAR(rr) p15, 4, rr, c15, c0, 0 /* Configuration Base Address Register */ + #endif /* !MACHINE_SYSREG_H */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 20:57:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 783D4698; Thu, 12 Feb 2015 20:57:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56251AC3; Thu, 12 Feb 2015 20:57:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CKvwbC098926; Thu, 12 Feb 2015 20:57:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CKvwOC098925; Thu, 12 Feb 2015 20:57:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502122057.t1CKvwOC098925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 12 Feb 2015 20:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278633 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 20:57:58 -0000 Author: ngie Date: Thu Feb 12 20:57:57 2015 New Revision: 278633 URL: https://svnweb.freebsd.org/changeset/base/278633 Log: Refactor the tests 1. `id -u` -> 0 is now only checked once; the entire test script is now skipped if this assertion is violated 2. De-dent whitespace, based on 1. 3. Only setup the symlink for $sleep once at the top of the script, and tear it down once at the bottom of the script Modified: head/bin/pkill/tests/pgrep-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 20:35:30 2015 (r278632) +++ head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 20:57:57 2015 (r278633) @@ -19,79 +19,68 @@ jail_name_to_jid() base=pgrep_j_test +if [ `id -u` -ne 0 ]; then + echo "1..0 # skip Test needs uid 0." + exit 0 +fi + echo "1..3" +sleep=$(pwd)/sleep.txt +ln -sf /bin/sleep $sleep + name="pgrep -j " -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & - - jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & - - jid1=$(jail_name_to_jid ${base}_1_1) - jid2=$(jail_name_to_jid ${base}_1_2) - jid="${jid1},${jid2}" - pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" - pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ - $(cat ${PWD}/${base}_1_2.pid) | sort) - if [ "$pid1" = "$pid2" ]; then - echo "ok 1 - $name" - else - echo "not ok 1 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" - fi - [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) - [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) - rm -f $sleep +jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + +jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + +jid1=$(jail_name_to_jid ${base}_1_1) +jid2=$(jail_name_to_jid ${base}_1_2) +jid="${jid1},${jid2}" +pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" +pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ + $(cat ${PWD}/${base}_1_2.pid) | sort) +if [ "$pid1" = "$pid2" ]; then + echo "ok 1 - $name" else - echo "ok 1 - $name # skip Test needs uid 0." + echo "not ok 1 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) +[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) name="pgrep -j any" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & - - jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & - - sleep 2 - pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" - pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ - $(cat ${PWD}/${base}_2_2.pid) | sort) - if [ "$pid1" = "$pid2" ]; then - echo "ok 2 - $name" - else - echo "not ok 2 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" - fi - [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) - [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) - rm -f $sleep +jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + +jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + +sleep 2 +pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" +pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ + $(cat ${PWD}/${base}_2_2.pid) | sort) +if [ "$pid1" = "$pid2" ]; then + echo "ok 2 - $name" else - echo "ok 2 - $name # skip Test needs uid 0." + echo "not ok 2 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) +[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) name="pgrep -j none" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & - jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & - sleep 2 - pid="$(pgrep -f -x -j none "$sleep 5")" - if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then - echo "ok 3 - $name" - else - echo "not ok 3 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" - fi - rm -f $sleep - [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) - [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) +daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & +jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & +sleep 2 +pid="$(pgrep -f -x -j none "$sleep 5")" +if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then + echo "ok 3 - $name" else - echo "ok 3 - $name # skip Test needs uid 0." + echo "not ok 3 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'" fi +[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) +[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) + +rm -f $sleep From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:07:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B562EB9; Thu, 12 Feb 2015 21:07:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1643AC5A; Thu, 12 Feb 2015 21:07:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CL7gWs004042; Thu, 12 Feb 2015 21:07:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CL7gaO004041; Thu, 12 Feb 2015 21:07:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502122107.t1CL7gaO004041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 12 Feb 2015 21:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278634 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:07:43 -0000 Author: pfg Date: Thu Feb 12 21:07:42 2015 New Revision: 278634 URL: https://svnweb.freebsd.org/changeset/base/278634 Log: ulimit(3): Fix broken check. The existing implementation had a broken comparison that could overflow. Replace this with a check that avoids the overflow before it happens. Consistently return a maximum value also on the case of negative arguments since negative is considered an overflow and means infinity for our current setrlimit(). Discussed with: bde (rather extensively) CID: 1199295 MFC after: 1 week Modified: head/lib/libc/gen/ulimit.c Modified: head/lib/libc/gen/ulimit.c ============================================================================== --- head/lib/libc/gen/ulimit.c Thu Feb 12 20:57:57 2015 (r278633) +++ head/lib/libc/gen/ulimit.c Thu Feb 12 21:07:42 2015 (r278634) @@ -53,13 +53,13 @@ ulimit(int cmd, ...) va_start(ap, cmd); arg = va_arg(ap, long); va_end(ap); + if (arg > RLIM_INFINITY / 512 || arg < 0) + arg = RLIM_INFINITY / 512; limit.rlim_max = limit.rlim_cur = (rlim_t)arg * 512; /* The setrlimit() function sets errno to EPERM if needed. */ if (setrlimit(RLIMIT_FSIZE, &limit) == -1) return (-1); - if (arg * 512 > LONG_MAX) - return (LONG_MAX); return (arg); } else { errno = EINVAL; From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:10:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64814B8; Thu, 12 Feb 2015 21:10:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D707D05; Thu, 12 Feb 2015 21:10:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CLARZX004492; Thu, 12 Feb 2015 21:10:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLAPuk004481; Thu, 12 Feb 2015 21:10:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122110.t1CLAPuk004481@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278635 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:10:27 -0000 Author: ian Date: Thu Feb 12 21:10:24 2015 New Revision: 278635 URL: https://svnweb.freebsd.org/changeset/base/278635 Log: MFC r276247, r276333, r276334, r276335, r276336, r276340, r276350: Include acle-compat.h directly rather than getting it via sysreg.h. Add new code to read and parse cpu identification data using the new CPUID mechanism defined for armv7. Add new TLB and cache maintainence functions for armv6 and armv7. Eliminate an unused macro whose name clashes now with a function in the new cpu-v6.h Add cache maintenance functions which will be used by startup code to initially set up the MMU. Fix a "decl is not a prototype" error noticed by gcc (but not clang). Update comments (r4 is not used anywhere), use non-profiling entry macros. Add arm option ARM_NEW_PMAP, to allow us to begin adding the new pmap code alongside the existing implementation Add armv6 implementations of cache operations to avoid duplication Added: stable/10/sys/arm/arm/cpu_asm-v6.S - copied, changed from r276336, head/sys/arm/arm/cpu_asm-v6.S stable/10/sys/arm/arm/cpuinfo.c - copied unchanged from r276333, head/sys/arm/arm/cpuinfo.c stable/10/sys/arm/include/cpu-v6.h - copied, changed from r276333, head/sys/arm/include/cpu-v6.h stable/10/sys/arm/include/cpuinfo.h - copied unchanged from r276333, head/sys/arm/include/cpuinfo.h Modified: stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/cpufunc.h stable/10/sys/conf/files.arm Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/arm/cpu_asm-v6.S (from r276336, head/sys/arm/arm/cpu_asm-v6.S) ============================================================================== --- head/sys/arm/arm/cpu_asm-v6.S Sun Dec 28 18:38:25 2014 (r276336, copy source) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Thu Feb 12 21:10:24 2015 (r278635) @@ -37,14 +37,16 @@ /* * Define cache functions used by startup code, which counts on the fact that - * only r0-r4,r12 (ip) are modified and no stack space is used. This set - * of function must be called with interrupts disabled and don't follow - * ARM ABI (cannot be called form C code. - * Moreover, it works only with caches integrated to CPU (accessible via CP15). + * only r0-r3,r12 (ip) are modified and no stack space is used. These functions + * must be called with interrupts disabled. Moreover, these work only with + * caches integrated to CPU (accessible via CP15); systems with an external L2 + * cache controller such as a PL310 need separate calls to that device driver + * to affect L2 caches. This is not a factor during early kernel startup, as + * any external L2 cache controller has not been enabled yet. */ /* Invalidate D cache to PoC. (aka all cache levels)*/ -ASENTRY(dcache_inv_poc_all) +ASENTRY_NP(dcache_inv_poc_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ @@ -96,7 +98,7 @@ ASENTRY(dcache_inv_poc_all) END(dcache_inv_poc_all) /* Invalidate D cache to PoU. (aka L1 cache only)*/ -ASENTRY(dcache_inv_pou_all) +ASENTRY_NP(dcache_inv_pou_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ @@ -147,7 +149,7 @@ ASENTRY(dcache_inv_pou_all) END(dcache_inv_pou_all) /* Write back and Invalidate D cache to PoC. */ -ASENTRY(dcache_wbinv_poc_all) +ASENTRY_NP(dcache_wbinv_poc_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ Copied: stable/10/sys/arm/arm/cpuinfo.c (from r276333, head/sys/arm/arm/cpuinfo.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/cpuinfo.c Thu Feb 12 21:10:24 2015 (r278635, copy of r276333, head/sys/arm/arm/cpuinfo.c) @@ -0,0 +1,121 @@ +/*- + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * All rights reserved. + * + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +struct cpuinfo cpuinfo; + +/* Read and parse CPU id scheme */ +void +cpuinfo_init(void) +{ + + cpuinfo.midr = cp15_midr_get(); + /* Test old version id schemes first */ + if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) { + if (CPU_ID_ISOLD(cpuinfo.midr)) { + /* obsolete ARMv2 or ARMv3 CPU */ + cpuinfo.midr = 0; + return; + } + if (CPU_ID_IS7(cpuinfo.midr)) { + if ((cpuinfo.midr & (1 << 23)) == 0) { + /* obsolete ARMv3 CPU */ + cpuinfo.midr = 0; + return; + } + /* ARMv4T CPU */ + cpuinfo.architecture = 1; + cpuinfo.revision = (cpuinfo.midr >> 16) & 0x7F; + } + } else { + /* must be new id scheme */ + cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; + cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; + } + /* Parse rest of MIDR */ + cpuinfo.implementer = (cpuinfo.midr >> 24) & 0xFF; + cpuinfo.part_number = (cpuinfo.midr >> 4) & 0xFFF; + cpuinfo.patch = cpuinfo.midr & 0x0F; + + /* CP15 c0,c0 regs 0-7 exist on all CPUs (although aliased with MIDR) */ + cpuinfo.ctr = cp15_ctr_get(); + cpuinfo.tcmtr = cp15_tcmtr_get(); + cpuinfo.tlbtr = cp15_tlbtr_get(); + cpuinfo.mpidr = cp15_mpidr_get(); + cpuinfo.revidr = cp15_revidr_get(); + + /* if CPU is not v7 cpu id scheme */ + if (cpuinfo.architecture != 0xF) + return; + + cpuinfo.id_pfr0 = cp15_id_pfr0_get(); + cpuinfo.id_pfr1 = cp15_id_pfr1_get(); + cpuinfo.id_dfr0 = cp15_id_dfr0_get(); + cpuinfo.id_afr0 = cp15_id_afr0_get(); + cpuinfo.id_mmfr0 = cp15_id_mmfr0_get(); + cpuinfo.id_mmfr1 = cp15_id_mmfr1_get(); + cpuinfo.id_mmfr2 = cp15_id_mmfr2_get(); + cpuinfo.id_mmfr3 = cp15_id_mmfr3_get(); + cpuinfo.id_isar0 = cp15_id_isar0_get(); + cpuinfo.id_isar1 = cp15_id_isar1_get(); + cpuinfo.id_isar2 = cp15_id_isar2_get(); + cpuinfo.id_isar3 = cp15_id_isar3_get(); + cpuinfo.id_isar4 = cp15_id_isar4_get(); + cpuinfo.id_isar5 = cp15_id_isar5_get(); + +/* Not yet - CBAR only exist on ARM SMP Cortex A CPUs + cpuinfo.cbar = cp15_cbar_get(); +*/ + + /* Test if revidr is implemented */ + if (cpuinfo.revidr == cpuinfo.midr) + cpuinfo.revidr = 0; + + /* parsed bits of above registers */ + /* id_mmfr0 */ + cpuinfo.outermost_shareability = (cpuinfo.id_mmfr0 >> 8) & 0xF; + cpuinfo.shareability_levels = (cpuinfo.id_mmfr0 >> 12) & 0xF; + cpuinfo.auxiliary_registers = (cpuinfo.id_mmfr0 >> 20) & 0xF; + cpuinfo.innermost_shareability = (cpuinfo.id_mmfr0 >> 28) & 0xF; + /* id_mmfr2 */ + cpuinfo.mem_barrier = (cpuinfo.id_mmfr2 >> 20) & 0xF; + /* id_mmfr3 */ + cpuinfo.coherent_walk = (cpuinfo.id_mmfr3 >> 20) & 0xF; + cpuinfo.maintenance_broadcast =(cpuinfo.id_mmfr3 >> 12) & 0xF; + /* id_pfr1 */ + cpuinfo.generic_timer_ext = (cpuinfo.id_pfr1 >> 16) & 0xF; + cpuinfo.virtualization_ext = (cpuinfo.id_pfr1 >> 12) & 0xF; + cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; +} Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 21:10:24 2015 (r278635) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1058,6 +1059,8 @@ initarm(struct arm_boot_params *abp) arm_physmem_kernaddr = abp->abp_physaddr; memsize = 0; + + cpuinfo_init(); set_cpufuncs(); /* Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 21:10:24 2015 (r278635) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #include #define _C_LABEL(x) x Copied and modified: stable/10/sys/arm/include/cpu-v6.h (from r276333, head/sys/arm/include/cpu-v6.h) ============================================================================== --- head/sys/arm/include/cpu-v6.h Sun Dec 28 18:12:56 2014 (r276333, copy source) +++ stable/10/sys/arm/include/cpu-v6.h Thu Feb 12 21:10:24 2015 (r278635) @@ -155,4 +155,242 @@ _RF0(cp15_cbar_get, CP15_CBAR(%0)) #undef _WF0 #undef _WF1 +/* + * TLB maintenance operations. + */ + +/* Local (i.e. not broadcasting ) operations. */ + +/* Flush all TLB entries (even global). */ +static __inline void +tlb_flush_all_local(void) +{ + + dsb(); + _CP15_TLBIALL(); + dsb(); +} + +/* Flush all not global TLB entries. */ +static __inline void +tlb_flush_all_ng_local(void) +{ + + dsb(); + _CP15_TLBIASID(CPU_ASID_KERNEL); + dsb(); +} + +/* Flush single TLB entry (even global). */ +static __inline void +tlb_flush_local(vm_offset_t sva) +{ + + dsb(); + _CP15_TLBIMVA((sva & ~PAGE_MASK ) | CPU_ASID_KERNEL); + dsb(); +} + +/* Flush range of TLB entries (even global). */ +static __inline void +tlb_flush_range_local(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA((va & ~PAGE_MASK ) | CPU_ASID_KERNEL); + dsb(); +} + +/* Broadcasting operations. */ +#ifndef SMP + +#define tlb_flush_all() tlb_flush_all_local() +#define tlb_flush_all_ng() tlb_flush_all_ng_local() +#define tlb_flush(sva) tlb_flush_local(sva) +#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) + +#else /* SMP */ + +static __inline void +tlb_flush_all(void) +{ + + dsb(); + _CP15_TLBIALLIS(); + dsb(); +} + +static __inline void +tlb_flush_all_ng(void) +{ + + dsb(); + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + dsb(); +} + +static __inline void +tlb_flush(vm_offset_t sva) +{ + + dsb(); + _CP15_TLBIMVAAIS(sva); + dsb(); +} + +static __inline void +tlb_flush_range(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + dsb(); +} +#endif /* SMP */ + +/* + * Cache maintenance operations. + */ + +/* Sync I and D caches to PoU */ +static __inline void +icache_sync(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += arm_dcache_align) { +#ifdef SMP + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif + } + dsb(); +#ifdef SMP + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); +#endif + dsb(); + isb(); +} + +/* Invalidate I cache */ +static __inline void +icache_inv_all(void) +{ +#ifdef SMP + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); +#endif + dsb(); + isb(); +} + +/* Write back D-cache to PoU */ +static __inline void +dcache_wb_pou(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += arm_dcache_align) { +#ifdef SMP + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif + } + dsb(); +} + +/* Invalidate D-cache to PoC */ +static __inline void +dcache_inv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + /* invalidate L1 first */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); + + /* then L2 */ + cpu_l2cache_inv_range(pa, size); + dsb(); + + /* then L1 again */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); +} + +/* Write back D-cache to PoC */ +static __inline void +dcache_wb_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCCMVAC(va); + } + dsb(); + + cpu_l2cache_wb_range(pa, size); +} + +/* Write back and invalidate D-cache to PoC */ +static __inline void +dcache_wbinv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + + /* write back L1 first */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCCMVAC(va); + } + dsb(); + + /* then write back and invalidate L2 */ + cpu_l2cache_wbinv_range(pa, size); + + /* then invalidate L1 */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); +} + +/* Set TTB0 register */ +static __inline void +cp15_ttbr_set(uint32_t reg) +{ + dsb(); + _CP15_TTB_SET(reg); + dsb(); + _CP15_BPIALL(); + dsb(); + isb(); + tlb_flush_all_ng_local(); +} + #endif /* !MACHINE_CPU_V6_H */ Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/include/cpufunc.h Thu Feb 12 21:10:24 2015 (r278635) @@ -572,7 +572,6 @@ void xscalec3_context_switch (void); #endif /* CPU_XSCALE_81342 */ -#define tlb_flush cpu_tlb_flushID #define setttb cpu_setttb #define drain_writebuf cpu_drain_writebuf Copied: stable/10/sys/arm/include/cpuinfo.h (from r276333, head/sys/arm/include/cpuinfo.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/include/cpuinfo.h Thu Feb 12 21:10:24 2015 (r278635, copy of r276333, head/sys/arm/include/cpuinfo.h) @@ -0,0 +1,91 @@ +/*- + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * All rights reserved. + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CPUINFO_H_ +#define _MACHINE_CPUINFO_H_ + +#include + +struct cpuinfo { + /* raw id registers */ + uint32_t midr; + uint32_t ctr; + uint32_t tcmtr; + uint32_t tlbtr; + uint32_t mpidr; + uint32_t revidr; + uint32_t id_pfr0; + uint32_t id_pfr1; + uint32_t id_dfr0; + uint32_t id_afr0; + uint32_t id_mmfr0; + uint32_t id_mmfr1; + uint32_t id_mmfr2; + uint32_t id_mmfr3; + uint32_t id_isar0; + uint32_t id_isar1; + uint32_t id_isar2; + uint32_t id_isar3; + uint32_t id_isar4; + uint32_t id_isar5; + uint32_t cbar; + + /* Parsed bits of above registers... */ + + /* midr */ + int implementer; + int revision; + int architecture; + int part_number; + int patch; + + /* id_mmfr0 */ + int outermost_shareability; + int shareability_levels; + int auxiliary_registers; + int innermost_shareability; + + /* id_mmfr1 */ + int mem_barrier; + + /* id_mmfr3 */ + int coherent_walk; + int maintenance_broadcast; + + /* id_pfr1 */ + int generic_timer_ext; + int virtualization_ext; + int security_ext; +}; + +extern struct cpuinfo cpuinfo; + +void cpuinfo_init(void); + +#endif /* _MACHINE_CPUINFO_H_ */ Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/conf/files.arm Thu Feb 12 21:10:24 2015 (r278635) @@ -11,6 +11,8 @@ arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_armv4.S standard +arm/arm/cpuinfo.c standard +arm/arm/cpu_asm-v6.S optional armv6 arm/arm/db_disasm.c optional ddb arm/arm/db_interface.c optional ddb arm/arm/db_trace.c optional ddb From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:10:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81AAC1CD; Thu, 12 Feb 2015 21:10:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D54D07; Thu, 12 Feb 2015 21:10:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CLAXZq004555; Thu, 12 Feb 2015 21:10:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLAX0g004554; Thu, 12 Feb 2015 21:10:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502122110.t1CLAX0g004554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 12 Feb 2015 21:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278636 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:10:33 -0000 Author: ngie Date: Thu Feb 12 21:10:32 2015 New Revision: 278636 URL: https://svnweb.freebsd.org/changeset/base/278636 Log: Parameterize out the amount of sleep done in each test Set the value in each test to a different amount to avoid potential side-effects with other instances of the test (or lingering processes) still being present on the system Modified: head/bin/pkill/tests/pgrep-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 21:10:24 2015 (r278635) +++ head/bin/pkill/tests/pgrep-j_test.sh Thu Feb 12 21:10:32 2015 (r278636) @@ -30,16 +30,17 @@ sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep name="pgrep -j " +sleep_amount=5 jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & jid1=$(jail_name_to_jid ${base}_1_1) jid2=$(jail_name_to_jid ${base}_1_2) jid="${jid1},${jid2}" -pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" +pid1="$(pgrep -f -x -j $jid "$sleep $sleep_amount" | sort)" pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ $(cat ${PWD}/${base}_1_2.pid) | sort) if [ "$pid1" = "$pid2" ]; then @@ -51,14 +52,15 @@ fi [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) name="pgrep -j any" +sleep_amount=6 jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & sleep 2 -pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" +pid1="$(pgrep -f -x -j any "$sleep $sleep_amount" | sort)" pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ $(cat ${PWD}/${base}_2_2.pid) | sort) if [ "$pid1" = "$pid2" ]; then @@ -70,11 +72,12 @@ fi [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) name="pgrep -j none" -daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & +sleep_amount=7 +daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount & jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & + command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount & sleep 2 -pid="$(pgrep -f -x -j none "$sleep 5")" +pid="$(pgrep -f -x -j none "$sleep $sleep_amount")" if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then echo "ok 3 - $name" else From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:12:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF18D33C; Thu, 12 Feb 2015 21:12:36 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 981E8D25; Thu, 12 Feb 2015 21:12:36 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id h15so6564844igd.4; Thu, 12 Feb 2015 13:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=9gAItp56aNt5gwvRMfLqPifFdvexFEJ+Ywvb8nRD37I=; b=x5W15BUgCXlLfMjlwZaU+fC5rQ5Q2oMnO1l6XcV1+znAvGd9e1Nbmp6tQ1lMFhYnrj mGXgZnMAUPBQvqMSLwoTVOuGzcPM4Xgi1/ne3skJT9o48IhleIuL2Y4/MYmfWU3I5YIi EdE3Vv4jzS+F3d5VMJaAnDf5GmMbjSQzz/Ym5A0RvSGwPUhql8pOBPO+0hHBFsYvotkm bakPCH8VEXykLDkr20sJUmlvZ1MmQAl43SHwaxaed5PxAN5i4s4+Ar1s8uLDioB794mu OZCFmem8CodmclXt3+OvBsdP8Y/slH1KLJ9gFv8MjptuGVQmQZjc7pBH1kxXxvNpFPOa Z5jQ== X-Received: by 10.42.77.9 with SMTP id g9mr10917405ick.78.1423775556112; Thu, 12 Feb 2015 13:12:36 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:5de4:da0f:932c:57df? ([2601:8:ab80:7d6:5de4:da0f:932c:57df]) by mx.google.com with ESMTPSA id sd7sm1894115igb.20.2015.02.12.13.12.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 13:12:35 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_2D9F087C-03E5-4A8D-AC83-1C2FBCA6D12D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278323 - in head: etc/rc.d usr.sbin/jail From: Garrett Cooper In-Reply-To: Date: Thu, 12 Feb 2015 13:12:33 -0800 Message-Id: References: <201502061754.t16HssXU042750@svn.freebsd.org> <343803A3-CFA3-4766-8294-139A6D8C0235@gmail.com> To: James Gritton X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , jenkins-admin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:12:37 -0000 --Apple-Mail=_2D9F087C-03E5-4A8D-AC83-1C2FBCA6D12D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Feb 9, 2015, at 18:51, James Gritton wrote: > On 2015-02-06 22:23, Garrett Cooper wrote: >> On Feb 6, 2015, at 18:38, James Gritton wrote: >>> On 2015-02-06 19:23, Garrett Cooper wrote: >>>> I think you broke the Jenkins tests runs, and potentially jail = support >>>> in some edgecases: >>>> https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/651/ >>> Where do I go from here? There error you refer to certainly seems = jail-related, which leads me to guess at something disconnected between = the matching rc.d/jail and jail(8) change (i.e. using the new rc file = with the old jail program). But that's really just a wild guess. Is = there somewhere I look for more information? For example, where does = Jenkins actually do its thing? >>> Sorry for being so stupid in this - Jenkins has only been on the = very edge of my awareness until now. >> I honestly don=92t think it=92s Jenkins because Jenkins runs in = bhyve. I >> think you accidentally broke option handling in the jail = configuration >> (please see my other reply about added =93break;=94 statements). >> ... >> You can verify your changes by doing: >> % (cd /usr/tests/bin/pkill; sudo kyua test) >=20 > After some testing and looking around, I've decided the problem = definitely isn't in rc.d where I thought it might be. I've also decided = it's probably not in my patch either. >=20 > I've run this kyua test on a 10 system (don't have current handy for = such things at the moment), and sometimes I would see a failure and = sometimes I wouldn't. This was whether I was using the new or old jail = code. Later in the day, when the box was less loaded, it seemed to = always pass. Looking at the pkill-j_test script, I see jails being = created with sleep commands both inside and outside the jail around its = creation. I'm guessing this script is very sensitive to timing issues = that could be cause by (among other things) system load. The jail = commands in this script were also very simple, with the only parameters = used being: path, name, ip4.addr, and command. This isn't some kind of = esoteric exercising of the jail(8) options, and I would expect if it = works at one time it would work at another. I've "hand-run" these = particular jail commands and couldn't get them to fail (and the actual = content of the jail(8) changes were tests already). >=20 > I looked at the freebsd-current (I think) list where the Jenkins = errors are posted, and it's true it started failing the pkill-j test at = the time I made my change. But it's also true that it had failed that = test once the day before my change, and then started passing it again. = This particular test just seems to be fragile. >=20 > So I don't have anywhere else to go with this. I'm going to assume = jail(8) isn't the problem here. The tests are racy and make some interesting assumptions. It appears = that WITNESS plays a part in it, and I bet VIMAGE (something that I = don=92t have in my kernel config) plays a part in it too. I say this = because I just ran into the issue when running the tests in a tight loop = on my VMware workstation 7 instance with code from r278636. Doesn=92t surprise me because before r272305, it was failing = consistently on head, so what Craig did in that commit helped, but it = didn=92t fully fix the raciness of the tests. I=92m going to recompile my system with VIMAGE and see if that impacts = performance of the tests, and if so, I=92ll adjust the sleep between = setting up the jailed instances, and waiting for them to be fully = formed. Thanks! $ while : ; do sudo prove -rv pgrep-j_test.sh || break; done pgrep-j_test.sh ..=20 1..3 usage: pgrep [-LSfilnoqvx] [-d delim] [-F pidfile] [-G gid] [-M core] = [-N system] [-P ppid] [-U uid] [-c class] [-g pgrp] [-j jid] [-s sid] [-t tty] [-u euid] pattern ... not ok 1 - pgrep -j # pgrep output: '', pidfile output: '74275 = 74278' ok 2 - pgrep -j any ok 3 - pgrep -j none Failed 1/3 subtests=20 Test Summary Report ------------------- pgrep-j_test.sh (Wstat: 0 Tests: 3 Failed: 1) Failed test: 1 Files=3D1, Tests=3D3, 5 wallclock secs ( 0.04 usr 0.02 sys + 0.02 = cusr 0.55 csys =3D 0.63 CPU) Result: FAIL --Apple-Mail=_2D9F087C-03E5-4A8D-AC83-1C2FBCA6D12D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3RdBAAoJEMZr5QU6S73eKkUH/2HVmt2Mrte77j6J5Fj5fLsa VxbF+QHPmEhhLShRfJ7XC166WMZdt5Weh2sDbHJ8FgMVny6yYvAbCms5+eoPXgZp /6niDYG8maeUEczCY9PY6gqImmL4EXn1YpQgP4s+Mu5m44HIIZLL5MnZvrbaWFOw WZll/O6eIXow/NRpw+ra6G3mmkC7eDg8IVq0kA2vIjI0c0WdZM53rIf0RQs/5txX GLxyWIWVU6VzNO6jGlLFFDa1dzJE4otNqLJuOTHtHWLmdT0lEnCqntUizPdFL9Gh q/2VG+jptijtOqaGLCompp5hICAoL240WmXnmWhU8xDsshO5ZcHo17Nidb0GCIY= =q2EA -----END PGP SIGNATURE----- --Apple-Mail=_2D9F087C-03E5-4A8D-AC83-1C2FBCA6D12D-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:15:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A38C5B4; Thu, 12 Feb 2015 21:15:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D84D51; Thu, 12 Feb 2015 21:15:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CLFSC1008869; Thu, 12 Feb 2015 21:15:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLFSTJ008868; Thu, 12 Feb 2015 21:15:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122115.t1CLFSTJ008868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278637 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:15:29 -0000 Author: ian Date: Thu Feb 12 21:15:28 2015 New Revision: 278637 URL: https://svnweb.freebsd.org/changeset/base/278637 Log: MFC r276306: Use proper markup for quotes. Modified: stable/10/sys/boot/common/loader.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/loader.8 ============================================================================== --- stable/10/sys/boot/common/loader.8 Thu Feb 12 21:10:32 2015 (r278636) +++ stable/10/sys/boot/common/loader.8 Thu Feb 12 21:15:28 2015 (r278637) @@ -671,8 +671,9 @@ Overrides the compile-time set value of or the preset default of 512. Must be a power of 2. .It Va twiddle_divisor -Throttles the output of the `twiddle' I/O progress indicator displayed -while loading the kernel and modules. +Throttles the output of the +.Sq twiddle +I/O progress indicator displayed while loading the kernel and modules. This is useful on slow serial consoles where the time spent waiting for these characters to be written can add up to many seconds. The default is 1 (full speed); a value of 2 spins half as fast, and so on. From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:20:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 652F9867; Thu, 12 Feb 2015 21:20:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E92FE14; Thu, 12 Feb 2015 21:20:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CLKU1D009775; Thu, 12 Feb 2015 21:20:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLKTU0009765; Thu, 12 Feb 2015 21:20:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122120.t1CLKTU0009765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278639 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:20:30 -0000 Author: ian Date: Thu Feb 12 21:20:28 2015 New Revision: 278639 URL: https://svnweb.freebsd.org/changeset/base/278639 Log: MFC r276395, r276396: Rename locore.S to locore-v4.S and add a new locore-v6.S. Added: stable/10/sys/arm/arm/locore-v4.S - copied unchanged from r276396, head/sys/arm/arm/locore-v4.S stable/10/sys/arm/arm/locore-v6.S - copied unchanged from r276396, head/sys/arm/arm/locore-v6.S Modified: stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu Feb 12 21:17:50 2015 (r278638) +++ stable/10/sys/arm/arm/genassym.c Thu Feb 12 21:20:28 2015 (r278639) @@ -143,5 +143,6 @@ ASSYM(P_PROFIL, P_PROFIL); ASSYM(TRAPFRAMESIZE, sizeof(struct trapframe)); ASSYM(MAXCOMLEN, MAXCOMLEN); +ASSYM(MAXCPU, MAXCPU); ASSYM(NIRQ, NIRQ); ASSYM(PCPU_SIZE, sizeof(struct pcpu)); Copied: stable/10/sys/arm/arm/locore-v4.S (from r276396, head/sys/arm/arm/locore-v4.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore-v4.S Thu Feb 12 21:20:28 2015 (r278639, copy of r276396, head/sys/arm/arm/locore-v4.S) @@ -0,0 +1,596 @@ +/* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */ + +/*- + * Copyright 2011 Semihalf + * Copyright (C) 1994-1997 Mark Brinicombe + * Copyright (C) 1994 Brini + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Brini. + * 4. The name of Brini may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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 "assym.s" +#include +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +/* + * Sanity check the configuration. + * FLASHADDR and LOADERRAMADDR depend on PHYSADDR in some cases. + * ARMv4 and ARMv5 make assumptions on where they are loaded. + * + * TODO: Fix the ARMv4/v5 case. + */ +#if (defined(FLASHADDR) || defined(LOADERRAMADDR) || !defined(_ARM_ARCH_6)) && \ + !defined(PHYSADDR) +#error PHYSADDR must be defined for this configuration +#endif + +/* What size should this really be ? It is only used by initarm() */ +#define INIT_ARM_STACK_SIZE (2048 * 4) + +#define CPWAIT_BRANCH \ + sub pc, pc, #4 + +#define CPWAIT(tmp) \ + mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ + mov tmp, tmp /* wait for it to complete */ ;\ + CPWAIT_BRANCH /* branch to next insn */ + +/* + * This is for libkvm, and should be the address of the beginning + * of the kernel text segment (not necessarily the same as kernbase). + * + * These are being phased out. Newer copies of libkvm don't need these + * values as the information is added to the core file by inspecting + * the running kernel. + */ + .text + .align 0 +#ifdef PHYSADDR +.globl kernbase +.set kernbase,KERNBASE +.globl physaddr +.set physaddr,PHYSADDR +#endif + +/* + * On entry for FreeBSD boot ABI: + * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r1 - if (r0 == 0) then metadata pointer + * On entry for Linux boot ABI: + * r0 - 0 + * r1 - machine type (passed as arg2 to initarm) + * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) + * + * For both types of boot we gather up the args, put them in a struct arm_boot_params + * structure and pass that to initarm. + */ + .globl btext +btext: +ASENTRY_NP(_start) + STOP_UNWINDING /* Can't unwind into the bootloader! */ + + mov r9, r0 /* 0 or boot mode from boot2 */ + mov r8, r1 /* Save Machine type */ + mov ip, r2 /* Save meta data */ + mov fp, r3 /* Future expansion */ + + /* Make sure interrupts are disabled. */ + mrs r7, cpsr + orr r7, r7, #(PSR_I | PSR_F) + msr cpsr_c, r7 + +#if defined (FLASHADDR) && defined(LOADERRAMADDR) + /* Check if we're running from flash. */ + ldr r7, =FLASHADDR + /* + * If we're running with MMU disabled, test against the + * physical address instead. + */ + mrc p15, 0, r2, c1, c0, 0 + ands r2, r2, #CPU_CONTROL_MMU_ENABLE + ldreq r6, =PHYSADDR + ldrne r6, =LOADERRAMADDR + cmp r7, r6 + bls flash_lower + cmp r7, pc + bhi from_ram + b do_copy + +flash_lower: + cmp r6, pc + bls from_ram +do_copy: + ldr r7, =KERNBASE + adr r1, _start + ldr r0, Lreal_start + ldr r2, Lend + sub r2, r2, r0 + sub r0, r0, r7 + add r0, r0, r6 + mov r4, r0 + bl memcpy + ldr r0, Lram_offset + add pc, r4, r0 +Lram_offset: .word from_ram-_C_LABEL(_start) +from_ram: + nop +#endif + +disable_mmu: + /* Disable MMU for a while */ + mrc p15, 0, r2, c1, c0, 0 + bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + bic r2, r2, #(CPU_CONTROL_IC_ENABLE) + bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r2, c1, c0, 0 + + nop + nop + nop + CPWAIT(r0) + +Lunmapped: + /* + * Build page table from scratch. + */ + + /* Find the delta between VA and PA */ + adr r0, Lpagetable + bl translate_va_to_pa + +#ifndef _ARM_ARCH_6 + /* + * Some of the older ports (the various XScale, mostly) assume + * that the memory before the kernel is mapped, and use it for + * the various stacks, page tables, etc. For those CPUs, map the + * 64 first MB of RAM, as it used to be. + */ + /* + * Map PA == VA + */ + ldr r5, =PHYSADDR + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNBASE) + bl build_pagetables + ldr r5, =(KERNPHYSADDR) +#else + /* + * Map PA == VA + */ + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(L1_S_OFFSET) + bic r5, r2 + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNVIRTADDR) + bl build_pagetables +#endif + +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + /* Create the custom map */ + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA + bl build_pagetables +#endif + +#if defined(SMP) + orr r0, r0, #2 /* Set TTB shared memory flag */ +#endif + mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ + mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) + mov r0, #0 + mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ +#endif + + /* Set the Domain Access register. Very important! */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr p15, 0, r0, c3, c0, 0 + /* + * Enable MMU. + * On armv6 enable extended page tables, and set alignment checking + * to modulo-4 (CPU_CONTROL_UNAL_ENABLE) for the ldrd/strd + * instructions emitted by clang. + */ + mrc p15, 0, r0, c1, c0, 0 +#ifdef _ARM_ARCH_6 + orr r0, r0, #(CPU_CONTROL_V6_EXTPAGE | CPU_CONTROL_UNAL_ENABLE) + orr r0, r0, #(CPU_CONTROL_AFLT_ENABLE) + orr r0, r0, #(CPU_CONTROL_AF_ENABLE) +#endif + orr r0, r0, #(CPU_CONTROL_MMU_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + +mmu_done: + nop + adr r1, .Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + sub r2, r2, r1 /* get zero init data */ + mov r3, #0 +.L1: + str r3, [r1], #0x0004 /* get zero init data */ + subs r2, r2, #4 + bgt .L1 + ldr pc, .Lvirt_done + +virt_done: + mov r1, #28 /* loader info size is 28 bytes also second arg */ + subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ + mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ + str r1, [r0] /* Store length of loader info */ + str r9, [r0, #4] /* Store r0 from boot loader */ + str r8, [r0, #8] /* Store r1 from boot loader */ + str ip, [r0, #12] /* store r2 from boot loader */ + str fp, [r0, #16] /* store r3 from boot loader */ + str r5, [r0, #20] /* store the physical address */ + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] + str r5, [r0, #24] /* store the pagetable address */ + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(initarm) /* Off we go */ + + /* init arm will return the new stack pointer. */ + mov sp, r0 + + bl _C_LABEL(mi_startup) /* call mi_startup()! */ + + adr r0, .Lmainreturned + b _C_LABEL(panic) + /* NOTREACHED */ +END(_start) + +#define VA_TO_PA_POINTER(name, table) \ +name: ;\ + .word . ;\ + .word table + +/* + * Returns the physical address of a magic va to pa pointer. + * r0 - The pagetable data pointer. This must be built using the + * VA_TO_PA_POINTER macro. + * e.g. + * VA_TO_PA_POINTER(Lpagetable, pagetable) + * ... + * adr r0, Lpagetable + * bl translate_va_to_pa + * r0 will now contain the physical address of pagetable + * r1, r2 - Trashed + */ +translate_va_to_pa: + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] + sub r0, r1, r2 + RET + +/* + * Builds the page table + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed + * + * Addresses must be 1MiB aligned + */ +build_pagetables: + /* Set the required page attributed */ + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#if defined(SMP) + orr r4, #(L1_SHARED) +#endif + orr r1, r4 + + /* Move the virtual address to the correct bit location */ + lsr r2, #(L1_S_SHIFT - 2) + + mov r4, r3 +1: + str r1, [r0, r2] + add r2, r2, #4 + add r1, r1, #(L1_S_SIZE) + adds r4, r4, #-1 + bhi 1b + + RET + +VA_TO_PA_POINTER(Lpagetable, pagetable) + +Lreal_start: + .word _start +Lend: + .word _edata + +.Lstart: + .word _edata + .word _ebss + .word svcstk + INIT_ARM_STACK_SIZE + +.Lvirt_done: + .word virt_done + +.Lmainreturned: + .asciz "main() returned" + .align 0 + + .bss +svcstk: + .space INIT_ARM_STACK_SIZE + +/* + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. + */ + .section ".init_pagetable" + .align 14 /* 16KiB aligned */ +pagetable: + .space L1_TABLE_SIZE + + .text + .align 0 + +.Lcpufuncs: + .word _C_LABEL(cpufuncs) + +#if defined(SMP) + +.Lmpvirt_done: + .word mpvirt_done +VA_TO_PA_POINTER(Lstartup_pagetable_secondary, temp_pagetable) + +ASENTRY_NP(mpentry) + + /* Make sure interrupts are disabled. */ + mrs r7, cpsr + orr r7, r7, #(PSR_I | PSR_F) + msr cpsr_c, r7 + + /* Disable MMU. It should be disabled already, but make sure. */ + mrc p15, 0, r2, c1, c0, 0 + bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + bic r2, r2, #(CPU_CONTROL_IC_ENABLE) + bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r2, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + +#if ARM_MMU_V6 + bl armv6_idcache_inv_all /* Modifies r0 only */ +#elif ARM_MMU_V7 + bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ +#endif + + /* Load the page table physical address */ + adr r0, Lstartup_pagetable_secondary + bl translate_va_to_pa + /* Load the address the secondary page table */ + ldr r0, [r0] + + orr r0, r0, #2 /* Set TTB shared memory flag */ + mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ + mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + + mov r0, #0 + mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ + + /* Set the Domain Access register. Very important! */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr p15, 0, r0, c3, c0, 0 + /* Enable MMU */ + mrc p15, 0, r0, c1, c0, 0 + orr r0, r0, #CPU_CONTROL_V6_EXTPAGE + orr r0, r0, #CPU_CONTROL_AF_ENABLE + orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + orr r0, r0, #(CPU_CONTROL_IC_ENABLE) + orr r0, r0, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + + adr r1, .Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + mrc p15, 0, r0, c0, c0, 5 + and r0, r0, #15 + mov r1, #2048 + mul r2, r1, r0 + sub sp, sp, r2 + str r1, [sp] + ldr pc, .Lmpvirt_done + +mpvirt_done: + + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(init_secondary) /* Off we go */ + + adr r0, .Lmpreturned + b _C_LABEL(panic) + /* NOTREACHED */ + +.Lmpreturned: + .asciz "init_secondary() returned" + .align 0 +END(mpentry) +#endif + +ENTRY_NP(cpu_halt) + mrs r2, cpsr + bic r2, r2, #(PSR_MODE) + orr r2, r2, #(PSR_SVC32_MODE) + orr r2, r2, #(PSR_I | PSR_F) + msr cpsr_fsxc, r2 + + ldr r4, .Lcpu_reset_address + ldr r4, [r4] + + ldr r0, .Lcpufuncs + mov lr, pc + ldr pc, [r0, #CF_IDCACHE_WBINV_ALL] + mov lr, pc + ldr pc, [r0, #CF_L2CACHE_WBINV_ALL] + + /* + * Load the cpu_reset_needs_v4_MMU_disable flag to determine if it's + * necessary. + */ + + ldr r1, .Lcpu_reset_needs_v4_MMU_disable + ldr r1, [r1] + cmp r1, #0 + mov r2, #0 + + /* + * MMU & IDC off, 32 bit program & data space + * Hurl ourselves into the ROM + */ + mov r0, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + mcrne p15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ + mov pc, r4 + + /* + * _cpu_reset_address contains the address to branch to, to complete + * the cpu reset after turning the MMU off + * This variable is provided by the hardware specific code + */ +.Lcpu_reset_address: + .word _C_LABEL(cpu_reset_address) + + /* + * cpu_reset_needs_v4_MMU_disable contains a flag that signals if the + * v4 MMU disable instruction needs executing... it is an illegal instruction + * on f.e. ARM6/7 that locks up the computer in an endless illegal + * instruction / data-abort / reset loop. + */ +.Lcpu_reset_needs_v4_MMU_disable: + .word _C_LABEL(cpu_reset_needs_v4_MMU_disable) +END(cpu_halt) + + +/* + * setjump + longjmp + */ +ENTRY(setjmp) + stmia r0, {r4-r14} + mov r0, #0x00000000 + RET +END(setjmp) + +ENTRY(longjmp) + ldmia r0, {r4-r14} + mov r0, #0x00000001 + RET +END(longjmp) + + .data + .global _C_LABEL(esym) +_C_LABEL(esym): .word _C_LABEL(end) + +ENTRY_NP(abort) + b _C_LABEL(abort) +END(abort) + +ENTRY_NP(sigcode) + mov r0, sp + add r0, r0, #SIGF_UC + + /* + * Call the sigreturn system call. + * + * We have to load r7 manually rather than using + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * correct. Using the alternative places esigcode at the address + * of the data rather than the address one past the data. + */ + + ldr r7, [pc, #12] /* Load SYS_sigreturn */ + swi SYS_sigreturn + + /* Well if that failed we better exit quick ! */ + + ldr r7, [pc, #8] /* Load SYS_exit */ + swi SYS_exit + + /* Branch back to retry SYS_sigreturn */ + b . - 16 +END(sigcode) + .word SYS_sigreturn + .word SYS_exit + + .align 0 + .global _C_LABEL(esigcode) + _C_LABEL(esigcode): + + .data + .global szsigcode +szsigcode: + .long esigcode-sigcode + +/* End of locore.S */ Copied: stable/10/sys/arm/arm/locore-v6.S (from r276396, head/sys/arm/arm/locore-v6.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore-v6.S Thu Feb 12 21:20:28 2015 (r278639, copy of r276396, head/sys/arm/arm/locore-v6.S) @@ -0,0 +1,537 @@ +/*- + * Copyright 2004-2014 Olivier Houchard + * Copyright 2012-2014 Ian Lepore + * Copyright 2013-2014 Andrew Turner + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * All rights reserved. + * + * 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 "assym.s" +#include +#include +#include +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +#ifndef ARM_NEW_PMAP +#define PTE1_OFFSET L1_S_OFFSET +#define PTE1_SHIFT L1_S_SHIFT +#define PTE1_SIZE L1_S_SIZE +#endif + +/* A small statically-allocated stack used only during initarm() and AP startup. */ +#define INIT_ARM_STACK_SIZE 2048 + + .text + .align 0 + +/* + * On entry for FreeBSD boot ABI: + * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r1 - if (r0 == 0) then metadata pointer + * On entry for Linux boot ABI: + * r0 - 0 + * r1 - machine type (passed as arg2 to initarm) + * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) + * + * For both types of boot we gather up the args, put them in a struct arm_boot_params + * structure and pass that to initarm. + */ + .globl btext +btext: +ASENTRY_NP(_start) + STOP_UNWINDING /* Can't unwind into the bootloader! */ + + /* Make sure interrupts are disabled. */ + cpsid ifa + + mov r8, r0 /* 0 or boot mode from boot2 */ + mov r9, r1 /* Save Machine type */ + mov r10, r2 /* Save meta data */ + mov r11, r3 /* Future expansion */ + + /* + * Check whether data cache is enabled. If it is, then we know + * current tags are valid (not power-on garbage values) and there + * might be dirty lines that need cleaning. Disable cache to prevent + * new lines being allocated, then call wbinv_poc_all to clean it. + */ + mrc CP15_SCTLR(r7) + tst r7, #CPU_CONTROL_DC_ENABLE + beq 1f + bic r7, #CPU_CONTROL_DC_ENABLE + mcr CP15_SCTLR(r7) + ISB + bl dcache_wbinv_poc_all + + /* + * Now there are no dirty lines, but there may still be lines marked + * valid. Disable all caches and the MMU, and invalidate everything + * before setting up new page tables and re-enabling the mmu. + */ +1: + bic r7, #CPU_CONTROL_MMU_ENABLE + bic r7, #CPU_CONTROL_IC_ENABLE + bic r7, #CPU_CONTROL_UNAL_ENABLE + bic r7, #CPU_CONTROL_BPRD_ENABLE + bic r7, #CPU_CONTROL_SW_ENABLE + orr r7, #CPU_CONTROL_AFLT_ENABLE + orr r7, #CPU_CONTROL_VECRELOC + mcr CP15_SCTLR(r7) + ISB + bl dcache_inv_poc_all + mcr CP15_ICIALLU + ISB + + /* + * Build page table from scratch. + */ + + /* Calculate the physical address of the startup pagetable. */ + adr r0, Lpagetable + bl translate_va_to_pa + + /* + * Map PA == VA + */ + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(PTE1_OFFSET) + bic r5, r2 + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNVIRTADDR) + bl build_pagetables + +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + /* Create the custom map used for early_printf(). */ + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA + bl build_pagetables +#endif + bl init_mmu + + /* Switch to virtual addresses. */ + ldr pc, =1f +1: + + /* Setup stack, clear BSS */ + ldr r1, =.Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + add sp, sp, #INIT_ARM_STACK_SIZE + sub r2, r2, r1 /* get zero init data */ + mov r3, #0 +2: + str r3, [r1], #0x0004 /* get zero init data */ + subs r2, r2, #4 + bgt 2b + + mov r1, #28 /* loader info size is 28 bytes also second arg */ + subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ + mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ + str r1, [r0] /* Store length of loader info */ + str r8, [r0, #4] /* Store r0 from boot loader */ + str r9, [r0, #8] /* Store r1 from boot loader */ + str r10, [r0, #12] /* store r2 from boot loader */ + str r11, [r0, #16] /* store r3 from boot loader */ + str r5, [r0, #20] /* store the physical address */ + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] + str r5, [r0, #24] /* store the pagetable address */ + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(initarm) /* Off we go */ + + /* init arm will return the new stack pointer. */ + mov sp, r0 + + bl _C_LABEL(mi_startup) /* call mi_startup()! */ + + ldr r0, =.Lmainreturned + b _C_LABEL(panic) + /* NOTREACHED */ +END(_start) + +#define VA_TO_PA_POINTER(name, table) \ +name: ;\ + .word . ;\ + .word table + +/* + * Returns the physical address of a magic va to pa pointer. + * r0 - The pagetable data pointer. This must be built using the + * VA_TO_PA_POINTER macro. + * e.g. + * VA_TO_PA_POINTER(Lpagetable, pagetable) + * ... + * adr r0, Lpagetable + * bl translate_va_to_pa + * r0 will now contain the physical address of pagetable + * r1, r2 - Trashed + */ +translate_va_to_pa: + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] + sub r0, r1, r2 + mov pc, lr + +/* + * Init MMU + * r0 - The table base address + */ + +ASENTRY_NP(init_mmu) + + /* Setup TLB and MMU registers */ + mcr CP15_TTBR0(r0) /* Set TTB */ + mov r0, #0 + mcr CP15_CONTEXTIDR(r0) /* Set ASID to 0 */ + + /* Set the Domain Access register */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr CP15_DACR(r0) + +#ifdef ARM_NEW_PMAP + /* + * Set TEX remap registers + * - All is set to uncacheable memory + */ + ldr r0, =0xAAAAA + mrc CP15_PRRR(r0) + mov r0, #0 + mcr CP15_NMRR(r0) +#endif + mcr CP15_TLBIALL /* Flush TLB */ + DSB + ISB + + /* Enable MMU */ + mrc CP15_SCTLR(r0) + orr r0, r0, #CPU_CONTROL_MMU_ENABLE + orr r0, r0, #CPU_CONTROL_V6_EXTPAGE +#ifdef ARM_NEW_PMAP + orr r0, r0, #CPU_CONTROL_TR_ENABLE +#endif + orr r0, r0, #CPU_CONTROL_AF_ENABLE + mcr CP15_SCTLR(r0) + DSB + ISB + mcr CP15_TLBIALL /* Flush TLB */ + mcr CP15_BPIALL /* Flush Branch predictor */ + ISB + mov pc, lr +END(init_mmu) + + +/* + * Init SMP coherent mode, enable caching and switch to final MMU table. + * Called with disabled caches + * r0 - The table base address + * r1 - clear bits for aux register + * r2 - set bits for aux register + */ +ASENTRY_NP(reinit_mmu) + push {r4-r11, lr} + mov r4, r0 + mov r5, r1 + mov r6, r2 + + /* !! Be very paranoid here !! */ + /* !! We cannot write single bit here !! */ + +#if 0 /* XXX writeback shouldn't be necessary */ + /* Write back and invalidate all integrated caches */ + bl dcache_wbinv_poc_all +#else + bl dcache_inv_pou_all +#endif + mcr CP15_ICIALLU + ISB + + /* Set auxiliary register */ + mrc CP15_ACTLR(r7) + bic r8, r7, r5 /* Mask bits */ + eor r8, r8, r6 /* Set bits */ + teq r7, r8 + mcrne CP15_ACTLR(r8) + ISB + + /* Enable caches. */ + mrc CP15_SCTLR(r7) + orr r7, #CPU_CONTROL_DC_ENABLE + orr r7, #CPU_CONTROL_IC_ENABLE + orr r7, #CPU_CONTROL_BPRD_ENABLE + mcr CP15_SCTLR(r7) + DSB + + mcr CP15_TTBR0(r4) /* Set new TTB */ + DSB + ISB + + /* Flush all TLBs */ + mcr CP15_TLBIALL + DSB + ISB + +#if 0 /* XXX writeback shouldn't be necessary */ + /* Write back and invalidate all integrated caches */ + bl dcache_wbinv_poc_all +#else + bl dcache_inv_pou_all +#endif + mcr CP15_ICIALLU + ISB + + pop {r4-r11, pc} +END(reinit_mmu) + + +/* + * Builds the page table + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed + * + * Addresses must be 1MiB aligned + */ +ASENTRY_NP(build_pagetables) + /* Set the required page attributed */ +#if defined(ARM_NEW_PMAP) + ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 +#elif defined(SMP) + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)|L1_SHARED) +#else + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#endif + orr r1, r4 + + /* Move the virtual address to the correct bit location */ + lsr r2, #(PTE1_SHIFT - 2) + + mov r4, r3 +1: + str r1, [r0, r2] + add r2, r2, #4 + add r1, r1, #(PTE1_SIZE) + adds r4, r4, #-1 + bhi 1b + + mov pc, lr + +VA_TO_PA_POINTER(Lpagetable, boot_pt1) + + +.Lstart: + .word _edata + .word _ebss + .word svcstk + +.Lmainreturned: + .asciz "main() returned" + .align 0 + + .bss +svcstk: + .space INIT_ARM_STACK_SIZE * MAXCPU + +/* + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. + */ + .section ".init_pagetable" + .align 14 /* 16KiB aligned */ + .globl boot_pt1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 21:57:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 874AE14F; Thu, 12 Feb 2015 21:57:36 +0000 (UTC) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 517261B2; Thu, 12 Feb 2015 21:57:36 +0000 (UTC) Received: by pdbfl12 with SMTP id fl12so14801662pdb.2; Thu, 12 Feb 2015 13:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=3xXYgmKBLDu4oSr5u//CnIZUej2MDHyXyweSpqNhRcI=; b=jCvKHfqPJwqcPWlFBTKHTzgtGxWiMVA197H7m6HjpZTB5tsRZY0Z3vKMyNrf85LePf 8KIT87ABrfl35zdEvDjdUSQACi9zmpieP955BbjZ5J3pE06ujZUX0+ioV5ec0b3InQ90 +zhJwQycj5reudxrxJfhNBuOIb2KAiGsWzX6OHz0BwGmZ2G3n0UZM//faczeWoGKehn8 k+loxcms2gjKvwYkySYCUzR9k6wcuFxSbmSjFlQZet2xg0QEGZE3k6LGD805Y4gksmqq frnCpKePHsJ+zn4uQiUmiH83ua37hsABWcRjXUO0nLROJT5OZG+MODCkMwMA+2FJzmgW yxoA== X-Received: by 10.70.37.202 with SMTP id a10mr10071444pdk.108.1423778255187; Thu, 12 Feb 2015 13:57:35 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:5de4:da0f:932c:57df? ([2601:8:ab80:7d6:5de4:da0f:932c:57df]) by mx.google.com with ESMTPSA id n8sm4668376pdm.62.2015.02.12.13.57.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 13:57:34 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_178185C1-3F5E-47FB-8470-97460255EB0C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278323 - in head: etc/rc.d usr.sbin/jail From: Garrett Cooper In-Reply-To: Date: Thu, 12 Feb 2015 13:57:31 -0800 Message-Id: <42AB9765-E63E-494B-A3FE-D9FF696921D9@gmail.com> References: <201502061754.t16HssXU042750@svn.freebsd.org> <343803A3-CFA3-4766-8294-139A6D8C0235@gmail.com> To: James Gritton X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , jenkins-admin@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:57:36 -0000 --Apple-Mail=_178185C1-3F5E-47FB-8470-97460255EB0C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Feb 12, 2015, at 13:12, Garrett Cooper wrote: > On Feb 9, 2015, at 18:51, James Gritton wrote: >=20 >> On 2015-02-06 22:23, Garrett Cooper wrote: >>> On Feb 6, 2015, at 18:38, James Gritton wrote: >>>> On 2015-02-06 19:23, Garrett Cooper wrote: >>>>> I think you broke the Jenkins tests runs, and potentially jail = support >>>>> in some edgecases: >>>>> https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/651/ >>>> Where do I go from here? There error you refer to certainly seems = jail-related, which leads me to guess at something disconnected between = the matching rc.d/jail and jail(8) change (i.e. using the new rc file = with the old jail program). But that's really just a wild guess. Is = there somewhere I look for more information? For example, where does = Jenkins actually do its thing? >>>> Sorry for being so stupid in this - Jenkins has only been on the = very edge of my awareness until now. >>> I honestly don=92t think it=92s Jenkins because Jenkins runs in = bhyve. I >>> think you accidentally broke option handling in the jail = configuration >>> (please see my other reply about added =93break;=94 statements). >>> ... >>> You can verify your changes by doing: >>> % (cd /usr/tests/bin/pkill; sudo kyua test) >>=20 >> After some testing and looking around, I've decided the problem = definitely isn't in rc.d where I thought it might be. I've also decided = it's probably not in my patch either. >>=20 >> I've run this kyua test on a 10 system (don't have current handy for = such things at the moment), and sometimes I would see a failure and = sometimes I wouldn't. This was whether I was using the new or old jail = code. Later in the day, when the box was less loaded, it seemed to = always pass. Looking at the pkill-j_test script, I see jails being = created with sleep commands both inside and outside the jail around its = creation. I'm guessing this script is very sensitive to timing issues = that could be cause by (among other things) system load. The jail = commands in this script were also very simple, with the only parameters = used being: path, name, ip4.addr, and command. This isn't some kind of = esoteric exercising of the jail(8) options, and I would expect if it = works at one time it would work at another. I've "hand-run" these = particular jail commands and couldn't get them to fail (and the actual = content of the jail(8) changes were tests already). >>=20 >> I looked at the freebsd-current (I think) list where the Jenkins = errors are posted, and it's true it started failing the pkill-j test at = the time I made my change. But it's also true that it had failed that = test once the day before my change, and then started passing it again. = This particular test just seems to be fragile. >>=20 >> So I don't have anywhere else to go with this. I'm going to assume = jail(8) isn't the problem here. >=20 > The tests are racy and make some interesting assumptions. It appears = that WITNESS plays a part in it, and I bet VIMAGE (something that I = don=92t have in my kernel config) plays a part in it too. I say this = because I just ran into the issue when running the tests in a tight loop = on my VMware workstation 7 instance with code from r278636. >=20 > Doesn=92t surprise me because before r272305, it was failing = consistently on head, so what Craig did in that commit helped, but it = didn=92t fully fix the raciness of the tests. >=20 > I=92m going to recompile my system with VIMAGE and see if that impacts = performance of the tests, and if so, I=92ll adjust the sleep between = setting up the jailed instances, and waiting for them to be fully = formed. >=20 > Thanks! >=20 > $ while : ; do sudo prove -rv pgrep-j_test.sh || break; done > pgrep-j_test.sh ..=20 > 1..3 > usage: pgrep [-LSfilnoqvx] [-d delim] [-F pidfile] [-G gid] [-M core] = [-N system] > [-P ppid] [-U uid] [-c class] [-g pgrp] [-j jid] > [-s sid] [-t tty] [-u euid] pattern ... > not ok 1 - pgrep -j # pgrep output: '', pidfile output: '74275 = 74278' > ok 2 - pgrep -j any > ok 3 - pgrep -j none > Failed 1/3 subtests=20 >=20 > Test Summary Report > ------------------- > pgrep-j_test.sh (Wstat: 0 Tests: 3 Failed: 1) > Failed test: 1 > Files=3D1, Tests=3D3, 5 wallclock secs ( 0.04 usr 0.02 sys + 0.02 = cusr 0.55 csys =3D 0.63 CPU) > Result: FAIL This Jenkins run is interesting: = https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/686/testReport/junit/b= in.pkill/pgrep-j_test/main/ . The first run passed, but the second one = didn=92t (more output than expected). This error shouldn=92t occur after = r278636, but it definitely confirms the fact that the test is racy, in = other ways. --Apple-Mail=_178185C1-3F5E-47FB-8470-97460255EB0C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3SHMAAoJEMZr5QU6S73eKSQH/06dNtSuW9SPvq4rTTwfQi9o UnPDeG5F4FUaPYaD0o6J5NKs+6GGcJy03cMBhThbHlJo3TUJU7bZCOUlSX25s4V8 BaR65UonwhkiqUh1GarUMHS1kCAWIwhGTfrx5A23pSt6EHA7CjDv9qxaLnGRwhln i9xWFcDl1yo1/ihxYF/gT1KBhA7GMr1f0ZmqpXGDR6bSplPN2y5INJKuRQ+fXexg rQbDFxoVSmk7A/2W1ln8k6x/TNHhW78KO8mdyvd5Fixw0vt8jfnALS8giHoNW6my RFSqnvytXtrFw98O+Cl1FerCa5RcFBhT7s+WfV+Rgj+HGzgZACGAyt851e6gAGk= =cjq3 -----END PGP SIGNATURE----- --Apple-Mail=_178185C1-3F5E-47FB-8470-97460255EB0C-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:06:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E94CB386; Thu, 12 Feb 2015 22:06:05 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5EE32EA; Thu, 12 Feb 2015 22:06:05 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id b16so6946587igk.1; Thu, 12 Feb 2015 14:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=5jWkIe7qc4a6BOQX2dDyE2lljVbcQVxUHxmQh7qqsj0=; b=qfmu75iQNlmWopWFKC3IL7pp6uA2oHH8gUNQkAyOjEVI3H47bSOVAwUBvAbDCn6DMN 7vjTmdaD6Qe/CJsXRrAW1VTs062ECoxAhLQJwcIkcv22nX/w4DarkD0EdaaXi95QK4Wk GYSwVhFAitw/3yEHhtRvTJXb4UOhntnh993hPeYUOU0S4F3WQ5oUCEbMAAROfzFFuZ5o S1tyTMPYc/45KrW3b07sKhRRArTWRj+kRoRzEufSVoctw1i6+t8IwmO/vW9PCQFUqKyA gHCPNg2kI+GFMRoQoE2o5uwmLYNB/ln2lPEVAhHz5oufiaeO7wiyT5zKqpoSrj81e/yN o2Lw== X-Received: by 10.107.158.146 with SMTP id h140mr7536225ioe.27.1423778765031; Thu, 12 Feb 2015 14:06:05 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:5de4:da0f:932c:57df? ([2601:8:ab80:7d6:5de4:da0f:932c:57df]) by mx.google.com with ESMTPSA id sd7sm1982425igb.20.2015.02.12.14.06.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 14:06:04 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_400BC6BF-32A8-4232-B469-38FA9E43C759"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278475 - head/usr.sbin/pw/tests From: Garrett Cooper In-Reply-To: <201502092115.t19LFrEk019578@svn.freebsd.org> Date: Thu, 12 Feb 2015 14:06:02 -0800 Message-Id: <39C8D48F-1962-4393-8FF3-C96DDBF6721E@gmail.com> References: <201502092115.t19LFrEk019578@svn.freebsd.org> To: Brad Davis X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , oneil.rs@gmail.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:06:06 -0000 --Apple-Mail=_400BC6BF-32A8-4232-B469-38FA9E43C759 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi Brad, On Feb 9, 2015, at 13:15, Brad Davis wrote: > Author: brd (doc committer) > Date: Mon Feb 9 21:15:52 2015 > New Revision: 278475 > URL: https://svnweb.freebsd.org/changeset/base/278475 >=20 > Log: > Add tests for `pw usernext'. >=20 > PR: 197120 > Submitted by: Robert O'Neil > Approved by: will >=20 > Added: > head/usr.sbin/pw/tests/pw_usernext.sh (contents, props changed) > Modified: > head/usr.sbin/pw/tests/Makefile =85 > + var0=3D1 > + LIMIT=3D`jot -r 1 2 10` > + while [ "$var0" -lt "$LIMIT" ] > + do > + atf_check -s exit:0 ${PW} useradd -n test$var0 -g 0 > + var0=3D`expr $var0 + 1` > + done > + atf_check -s exit:0 -o match:"100${LIMIT}:1001}=94 \ This line is incorrect (there=92s a trailing `}` after 1001). Removing it will fix the test, but is assuming that 1001 will always be = the next group correct (it=92s correct in the default install, but IIRC = it wasn=92t correct if you started groups at gid=3D500)? Wouldn=92t it be safer to create a bogus group, get the gid for the = group, then test to ensure that that god is matched? Thanks! --Apple-Mail=_400BC6BF-32A8-4232-B469-38FA9E43C759 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3SPKAAoJEMZr5QU6S73e/6QH/1HgIs9AuzdL/Ehvh/XI8YL7 pgbLjBYbwm4S/sZt7cMaMhU+idyy54el3Lka5RRccPutdoF+AbG0uQ2FPLzMafoW 26lTVlRNXT7kpc0HWIAhY/z6ru8HG1Hd/Cxs2pLOI1LvEBKiLrDgrb0rnTMAt3hD Yvrk5wsAHR6nCUmNEYzH6s1QSGrOVwKNjMRl5A1O6mlGhPoogH3cLHkinU+dVHzK Ckv/d+ZmAiZHJq1YJ5E51Bd8+xSOGYD+xwQU2CFHdAwycu/2p8OkxIj5DbtccUDl Cpc2Ccykzw3XMZMk/O1KTjeYcA1g1UZdQ9OQJvMEfDGK1MJesrsoJ/biXSFYRPg= =PTxS -----END PGP SIGNATURE----- --Apple-Mail=_400BC6BF-32A8-4232-B469-38FA9E43C759-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:20:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BF625D7; Thu, 12 Feb 2015 22:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB30068E; Thu, 12 Feb 2015 22:20:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CMKYr2040499; Thu, 12 Feb 2015 22:20:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CMKY8t040498; Thu, 12 Feb 2015 22:20:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201502122220.t1CMKY8t040498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 12 Feb 2015 22:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278640 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:20:35 -0000 Author: glebius Date: Thu Feb 12 22:20:34 2015 New Revision: 278640 URL: https://svnweb.freebsd.org/changeset/base/278640 Log: Revise default limit for maximum of netgraph data items. With modern internet speeds the limit can be reached even on a single L2TP link. Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Thu Feb 12 21:20:28 2015 (r278639) +++ head/sys/netgraph/ng_base.c Thu Feb 12 22:20:34 2015 (r278640) @@ -2952,7 +2952,7 @@ uma_zone_t ng_qzone; uma_zone_t ng_qdzone; static int numthreads = 0; /* number of queue threads */ static int maxalloc = 4096;/* limit the damage of a leak */ -static int maxdata = 512; /* limit the damage of a DoS */ +static int maxdata = 4096; /* limit the damage of a DoS */ SYSCTL_INT(_net_graph, OID_AUTO, threads, CTLFLAG_RDTUN, &numthreads, 0, "Number of queue processing threads"); From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:28:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FC3086D; Thu, 12 Feb 2015 22:28:15 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B5F8D6DA; Thu, 12 Feb 2015 22:28:14 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A286925D3A92; Thu, 12 Feb 2015 22:28:04 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D69E3C770A1; Thu, 12 Feb 2015 22:28:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 0aNImd3SHO0O; Thu, 12 Feb 2015 22:28:02 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:ccda:6447:f:a] (unknown [IPv6:fde9:577b:c1a9:4410:ccda:6447:f:a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 67B96C7709E; Thu, 12 Feb 2015 22:28:01 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278634 - head/lib/libc/gen From: "Bjoern A. Zeeb" In-Reply-To: <201502122107.t1CL7gaO004041@svn.freebsd.org> Date: Thu, 12 Feb 2015 22:27:41 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201502122107.t1CL7gaO004041@svn.freebsd.org> To: "Pedro F. Giffuni" X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:28:15 -0000 > On 12 Feb 2015, at 21:07 , Pedro F. Giffuni wrote: >=20 > Author: pfg > Date: Thu Feb 12 21:07:42 2015 > New Revision: 278634 > URL: https://svnweb.freebsd.org/changeset/base/278634 >=20 > Log: > ulimit(3): Fix broken check. >=20 > The existing implementation had a broken comparison that could = overflow. > Replace this with a check that avoids the overflow before it happens. >=20 > Consistently return a maximum value also on the case of negative > arguments since negative is considered an overflow and means > infinity for our current setrlimit(). >=20 > Discussed with: bde (rather extensively) >=20 Did this compile? > CID: 1199295 > MFC after: 1 week >=20 > Modified: > head/lib/libc/gen/ulimit.c >=20 > Modified: head/lib/libc/gen/ulimit.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libc/gen/ulimit.c Thu Feb 12 20:57:57 2015 = (r278633) > +++ head/lib/libc/gen/ulimit.c Thu Feb 12 21:07:42 2015 = (r278634) > @@ -53,13 +53,13 @@ ulimit(int cmd, ...) > va_start(ap, cmd); > arg =3D va_arg(ap, long); > va_end(ap); > + if (arg > RLIM_INFINITY / 512 || arg < 0) > + arg =3D RLIM_INFINITY / 512; > limit.rlim_max =3D limit.rlim_cur =3D (rlim_t)arg * 512; >=20 > /* The setrlimit() function sets errno to EPERM if = needed. */ > if (setrlimit(RLIMIT_FSIZE, &limit) =3D=3D -1) > return (-1); > - if (arg * 512 > LONG_MAX) > - return (LONG_MAX); > return (arg); > } else { > errno =3D EINVAL; >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:36:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B7D3A78; Thu, 12 Feb 2015 22:36:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 86BA1814; Thu, 12 Feb 2015 22:36:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1CMaNPD025278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Feb 2015 01:36:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1CMaNZO025277; Fri, 13 Feb 2015 01:36:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 13 Feb 2015 01:36:23 +0300 From: Gleb Smirnoff To: Vsevolod Stakhov Subject: Re: svn commit: r278080 - head/sbin/ifconfig Message-ID: <20150212223623.GC15484@FreeBSD.org> References: <201502021303.t12D35Nf059543@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502021303.t12D35Nf059543@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:36:27 -0000 On Mon, Feb 02, 2015 at 01:03:05PM +0000, Vsevolod Stakhov wrote: V> Author: vsevolod (ports committer) V> Date: Mon Feb 2 13:03:04 2015 V> New Revision: 278080 V> URL: https://svnweb.freebsd.org/changeset/base/278080 V> V> Log: V> Reorganize the list of addresses associated with an interface and group them V> based on the address family. This should help to recognize interfaces with V> multiple AF (e.g. ipv4 and ipv6) with many aliases or additional addresses. The V> order of addresses inside a single group is strictly preserved. V> V> Improve the scope_id output for AF_INET6 families, as the V> current approach uses hexadecimal string that is basically the ID of an V> interface, whilst this information is already depicted by getnameinfo(3) call. V> Therefore, now ifconfig just prints the scope of address as it is defined in V> 2.4 of RFC 2373. V> V> PR: 197270 V> Approved by: bapt V> MFC after: 2 weeks What about getifaddrs(3) sorting addresses? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:41:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A05CDFC for ; Thu, 12 Feb 2015 22:41:12 +0000 (UTC) Received: from nm35-vm3.bullet.mail.bf1.yahoo.com (nm35-vm3.bullet.mail.bf1.yahoo.com [72.30.238.75]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681C285C for ; Thu, 12 Feb 2015 22:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423780477; bh=27PcWVplcwiHSJBN0fn7sBBIWZ2Vjvgk8ZYfv3sMzUg=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=L3z/Won4b+EtyEok2u3ZbNHDOOCjTaclKEOcyK7NMuuj7F+oOyeVH666psA2T0YxPwEJofzrWItMLnV0qQFaiGmKEwZhlJy2rsYLzle2m8w63TIzZvzekWkIPJtIpR7hIyOA99ORcAeU7qR4VFLAZg8a80+3i6P9PPZe7dLDRlpK8Fp3y1WqTytQceZuReMw1bn+rECVDOA58scrK0kVyH04+kxeGaySJkNjDea5aathbIYg9RggUws8fvFU2xKo0oDKvzpnXyGsEQ/tQul3PqyPkBg2DSukqNPLbc3CC0v1+x5soHIddgbLkcvOxMIMyOZYi7z9WTaY6WH0eOz+OA== Received: from [66.196.81.174] by nm35.bullet.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 22:34:37 -0000 Received: from [68.142.230.65] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 22:34:37 -0000 Received: from [127.0.0.1] by smtp222.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 22:34:37 -0000 X-Yahoo-Newman-Id: 765987.7100.bm@smtp222.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: cjZ4zaEVM1mRcM1DFQ.ilBd8GX7v0.LW6BNayqKB6HDcB_I Pcvnv2cXdTL1.x05FEAFm6sAz3vIJea7BerqmHTWWepUjNKyJbskrKtXnKE3 288XY77VBQXXNyB4C0TYTb.cczWVQX7XeGs5lYKJ990LFdbnajkHKUWkYToH fbhFTr0vi2PgHCkBUy9yb6KceRoRVjmhJmVI59Z8hH7Cyx300ju_TJId5vK5 lVHvihYo5PbBFlu8tWCDGIst1CoBV4Yzbzq.nZGqCmiGmnqvWXSr7AsNU02k 7W0NlvlMbfxrCv0CLr2T6H5NGGSKliiuBsRoQNq5kVsgQYxadVOzUkIaQxvO itbulE0OJLakPfbuT9I31KTUslv6tQR_jG7dNQ2kvE2GcdK6ADVDxuaWIS6p GtLBfgnQ4ud2svFNxXm87OOxb16E7qehKTguMZDJ2T5TQDg6z91ShMcejUji hERXS.v2cmpRJPJbj4tWhTTGrerBuLRtoLX.0CbwU2ZdDW7LIMrMLJuGdxYa gutHmiOaRblWaRZm7Cfs1ZazX1g-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DD2A87.2050008@FreeBSD.org> Date: Thu, 12 Feb 2015 17:34:47 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:41:12 -0000 On 02/12/15 17:27, Bjoern A. Zeeb wrote: >> On 12 Feb 2015, at 21:07 , Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Thu Feb 12 21:07:42 2015 >> New Revision: 278634 >> URL: https://svnweb.freebsd.org/changeset/base/278634 >> >> Log: >> ulimit(3): Fix broken check. >> >> The existing implementation had a broken comparison that could overflow. >> Replace this with a check that avoids the overflow before it happens. >> >> Consistently return a maximum value also on the case of negative >> arguments since negative is considered an overflow and means >> infinity for our current setrlimit(). >> >> Discussed with: bde (rather extensively) >> > Did this compile? > Yes! Any log message to share? Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 22:44:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A03C6FA; Thu, 12 Feb 2015 22:44:33 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 306C2910; Thu, 12 Feb 2015 22:44:33 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D01EA25D3A92; Thu, 12 Feb 2015 22:44:27 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 23D4EC7709E; Thu, 12 Feb 2015 22:44:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id PqrZB4NLu9XP; Thu, 12 Feb 2015 22:44:25 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:ccda:6447:f:a] (unknown [IPv6:fde9:577b:c1a9:4410:ccda:6447:f:a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B81ACC770A0; Thu, 12 Feb 2015 22:44:23 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278634 - head/lib/libc/gen From: "Bjoern A. Zeeb" In-Reply-To: <54DD2A87.2050008@FreeBSD.org> Date: Thu, 12 Feb 2015 22:44:13 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 22:44:33 -0000 > On 12 Feb 2015, at 22:34 , Pedro Giffuni wrote: >=20 >=20 > On 02/12/15 17:27, Bjoern A. Zeeb wrote: >>> On 12 Feb 2015, at 21:07 , Pedro F. Giffuni wrote: >>>=20 >>> Author: pfg >>> Date: Thu Feb 12 21:07:42 2015 >>> New Revision: 278634 >>> URL: https://svnweb.freebsd.org/changeset/base/278634 >>>=20 >>> Log: >>> ulimit(3): Fix broken check. >>>=20 >>> The existing implementation had a broken comparison that could = overflow. >>> Replace this with a check that avoids the overflow before it = happens. >>>=20 >>> Consistently return a maximum value also on the case of negative >>> arguments since negative is considered an overflow and means >>> infinity for our current setrlimit(). >>>=20 >>> Discussed with: bde (rather extensively) >>>=20 >> Did this compile? >>=20 >=20 > Yes! Any log message to share? Now I do again; had lost them due to buildworld starting over again: =3D=3D=3D> lib/libc_nonshared (obj,depend,all,install) cc1: warnings being treated as errors /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c: In function 'ulimit': /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:56: warning: comparison = is always false due to limited range of data type /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:57: warning: overflow in = implicit constant conversion --- ulimit.So --- *** [ulimit.So] Error code 1 mips.mipsn32 buildworld failed, check _.mips.mipsn32.buildworld for = details mips.mips buildworld failed, check _.mips.mips.buildworld for details powerpc.powerpc buildworld failed, check _.powerpc.powerpc.buildworld = for details mips.mipsel buildworld failed, check _.mips.mipsel.buildworld for = details arm.armeb buildworld failed, check _.arm.armeb.buildworld for details arm.armv6hf buildworld failed, check _.arm.armv6hf.buildworld for = details arm.arm buildworld failed, check _.arm.arm.buildworld for details arm.armv6 buildworld failed, check _.arm.armv6.buildworld for details pc98.i386 buildworld failed, check _.pc98.i386.buildworld for details i386.i386 buildworld failed, check _.i386.i386.buildworld for details powerpc.powerpc64 buildworld failed, check = _.powerpc.powerpc64.buildworld for details amd64.amd64 buildworld failed, check _.amd64.amd64.buildworld for = details From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 23:00:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF1D4A9; Thu, 12 Feb 2015 23:00:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85D2BA34; Thu, 12 Feb 2015 23:00:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CN0W9a060098; Thu, 12 Feb 2015 23:00:32 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CN0WXK060079; Thu, 12 Feb 2015 23:00:32 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201502122300.t1CN0WXK060079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 12 Feb 2015 23:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278641 - head/tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 23:00:32 -0000 Author: gnn Date: Thu Feb 12 23:00:31 2015 New Revision: 278641 URL: https://svnweb.freebsd.org/changeset/base/278641 Log: Silence a warning. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Thu Feb 12 22:20:34 2015 (r278640) +++ head/tools/tools/netmap/pkt-gen.c Thu Feb 12 23:00:31 2015 (r278641) @@ -1817,7 +1817,7 @@ main(int arc, char **argv) } - if (g.ifname == NULL) { + if (strlen(g.ifname) <=0 ) { D("missing ifname"); usage(); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 23:08:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC7E473E; Thu, 12 Feb 2015 23:08:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D84EB20; Thu, 12 Feb 2015 23:08:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CN8So8062442; Thu, 12 Feb 2015 23:08:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CN8Sg0062438; Thu, 12 Feb 2015 23:08:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502122308.t1CN8Sg0062438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 12 Feb 2015 23:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278642 - in head/usr.bin: chpass passwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 23:08:28 -0000 Author: bapt Date: Thu Feb 12 23:08:27 2015 New Revision: 278642 URL: https://svnweb.freebsd.org/changeset/base/278642 Log: Use PRECIOUSPROG instead of custom code to handle schg This allows to preserve schg when installed with -DNO_ROOT MFC after: 1 week Modified: head/usr.bin/chpass/Makefile head/usr.bin/passwd/Makefile Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Thu Feb 12 23:00:31 2015 (r278641) +++ head/usr.bin/chpass/Makefile Thu Feb 12 23:08:27 2015 (r278642) @@ -9,6 +9,7 @@ PROG= chpass SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c BINOWN= root BINMODE=4555 +PRECIOUSPROG= .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif @@ -34,16 +35,4 @@ MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1 .endif -beforeinstall: -.for i in chpass chfn chsh ypchpass ypchfn ypchsh -.if exists(${DESTDIR}${BINDIR}/$i) - -chflags noschg ${DESTDIR}${BINDIR}/$i -.endif -.endfor - -.if !defined(NO_FSCHG) -afterinstall: - -chflags schg ${DESTDIR}${BINDIR}/chpass -.endif - .include Modified: head/usr.bin/passwd/Makefile ============================================================================== --- head/usr.bin/passwd/Makefile Thu Feb 12 23:00:31 2015 (r278641) +++ head/usr.bin/passwd/Makefile Thu Feb 12 23:08:27 2015 (r278642) @@ -7,20 +7,10 @@ PROG = passwd BINOWN = root BINMODE = 4555 LIBADD = pam +PRECIOUSPROG= .if ${MK_NIS} != "no" LINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd MLINKS = passwd.1 yppasswd.1 .endif -beforeinstall: -.for i in passwd yppasswd - [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ - chflags noschg ${DESTDIR}${BINDIR}/$i || true -.endfor - -.if !defined(NO_FSCHG) -afterinstall: - -chflags schg ${DESTDIR}${BINDIR}/passwd -.endif - .include From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 23:14:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7923391A for ; Thu, 12 Feb 2015 23:14:01 +0000 (UTC) Received: from nm25-vm1.bullet.mail.bf1.yahoo.com (nm25-vm1.bullet.mail.bf1.yahoo.com [98.139.212.155]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D778C2C for ; Thu, 12 Feb 2015 23:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423782833; bh=XYgtnwpxqbZxGkQUuEsQje6PfmwZVJD1W/dfPZ0G5lM=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=QGTaOAX8ajrbLrjNCVFKlO4IMBrXER75bz9au/hN7QDCdgs/o7Lz3Ym4GYl4icddZ5NPtCTbcdF/dQtH6cux/cFtpd7fH1k3Zyr3Tj4w8KWd/1P9owyHWBwd3po/c4hfatkn5U0atUJiKQttaMojdtghFkbHYkNhh+Q7N6GnV/eC84BoqcI8RSda7bqMfRpZJQNqYJaDqp+Pk2fWpgHePVLpPeVD7ci3kNvJew8X/UwzJ3kvDORQkDKhq4/CCNAJ/rno+eL5DR6diVR2OT1Yf/Mcrn98GlLt7502KdBi50klsB2hsSVnDKD83YObAusFfSREsOmetk8qKKTxJizqJg== Received: from [66.196.81.171] by nm25.bullet.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 23:13:53 -0000 Received: from [98.139.213.15] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 23:13:53 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 12 Feb 2015 23:13:53 -0000 X-Yahoo-Newman-Id: 294654.33387.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: lyhNNCgVM1lO.1UYedRSOCxDz73sDM1x3UdfPhpNxYSc7iz eQjYqG2p..4plhOL3TaiyP1VMfVcjWbZxD5w0Air8lofGRyS52fte6MeR6qW eDU8_UtkYvbBJ2jzElVbTp3mah8ruhzN1CYbM2c2gLaJdA2Hz4B6POebxaH8 iWnwQEubbDEXNMPwEDZu1bzGG_4rKGYZxz23r4bfgnZBFklVNd92VYdDZnpB WlB5spUiluGzkpXL81suoeA3MhjOQXR3jZz_Ecp.TX2KvN1BXPXBZ8NjY2sQ NtcmbcYPGN.b_Irgk_R9bKGwbBmPpuY5M752mHnszCpsxDtH94dGMsB9.B8m IlSEpu1vaqfqIZaeMAXcokL6DMWf_KCiVuMFjr6o1.HEDf0iKsdMcYsQ4tTB XxRScpwWnWnKHOkz0bjSp.xfWRxw93V41AY8f4za7W.HDpIusoe344PddDyf X0P3A.Ps6D3Y.JFUUDiSUxEGCtTSedyUc6wr3X8.upO3UVNWmoKJ2rrltFPY Iq_t9jaYnem0HkUuWXLQWfq3kvig9pJoEci2LB_rjF7ZBc.wSxh1bKFffl.B PznO1lpvrSlNOeNmaP6k6eg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DD33B9.3000804@FreeBSD.org> Date: Thu, 12 Feb 2015 18:14:01 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> In-Reply-To: <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 23:14:01 -0000 On 02/12/15 17:44, Bjoern A. Zeeb wrote: >> On 12 Feb 2015, at 22:34 , Pedro Giffuni wrote: >> >> >> On 02/12/15 17:27, Bjoern A. Zeeb wrote: >>>> On 12 Feb 2015, at 21:07 , Pedro F. Giffuni wrote: >>>> >>>> Author: pfg >>>> Date: Thu Feb 12 21:07:42 2015 >>>> New Revision: 278634 >>>> URL: https://svnweb.freebsd.org/changeset/base/278634 >>>> >>>> Log: >>>> ulimit(3): Fix broken check. >>>> >>>> The existing implementation had a broken comparison that could overflow. >>>> Replace this with a check that avoids the overflow before it happens. >>>> >>>> Consistently return a maximum value also on the case of negative >>>> arguments since negative is considered an overflow and means >>>> infinity for our current setrlimit(). >>>> >>>> Discussed with: bde (rather extensively) >>>> >>> Did this compile? >>> >> Yes! Any log message to share? > Now I do again; had lost them due to buildworld starting over again: > > ===> lib/libc_nonshared (obj,depend,all,install) > cc1: warnings being treated as errors > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c: In function 'ulimit': > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:56: warning: comparison is always false due to limited range of data type > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:57: warning: overflow in implicit constant conversion > --- ulimit.So --- > *** [ulimit.So] Error code 1 > > > mips.mipsn32 buildworld failed, check _.mips.mipsn32.buildworld for details > mips.mips buildworld failed, check _.mips.mips.buildworld for details > powerpc.powerpc buildworld failed, check _.powerpc.powerpc.buildworld for details > mips.mipsel buildworld failed, check _.mips.mipsel.buildworld for details > arm.armeb buildworld failed, check _.arm.armeb.buildworld for details > arm.armv6hf buildworld failed, check _.arm.armv6hf.buildworld for details > arm.arm buildworld failed, check _.arm.arm.buildworld for details > arm.armv6 buildworld failed, check _.arm.armv6.buildworld for details > pc98.i386 buildworld failed, check _.pc98.i386.buildworld for details > i386.i386 buildworld failed, check _.i386.i386.buildworld for details > powerpc.powerpc64 buildworld failed, check _.powerpc.powerpc64.buildworld for details > amd64.amd64 buildworld failed, check _.amd64.amd64.buildworld for details > > Thank you! This will sound strange but I can't confirm, and I can't see anything obviously wrong. I have the revert ready but let me wait for jenkins to catch the failure first. Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Feb 12 23:54:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AA5B1BD; Thu, 12 Feb 2015 23:54:21 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45B23FD9; Thu, 12 Feb 2015 23:54:21 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id b16so7428484igk.1; Thu, 12 Feb 2015 15:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=7l+EC5YncqI28qlryYUemzMTg2oSNXPnQZlcTG13DMU=; b=0NhOqmWvCWT2TT2kPadgb7+O6vCseFt7ionBzUj1HRFS7zSk2UrX3M+2iKbGMb0hN9 Xjt79YH+gouYjxTchG2RBmNEiMpKbAln96W8pTqcsfy+Yp4fKJ3pnQ1Z/z78hTWNoeaK Hoxm9ZaNnv5udPBk3xqbT25rnIMoByr5ot8fQGFTthycYXoPPqypJPbmKF2JI9h7SX5e dRM3DzlD/E2ywm7KIJMym7TrrqMH65AftBmg/Vf9j0BA6G2swiW8caH/FSlxGey2v/fm HF54BhBipPi2MpEEZbRU3be7SA/ed7N2NiiLCoNcsen1pN17qf96r2DSRbquJmc75GiH RlKQ== X-Received: by 10.50.25.225 with SMTP id f1mr96935igg.29.1423785260758; Thu, 12 Feb 2015 15:54:20 -0800 (PST) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id c8sm2179024igx.9.2015.02.12.15.54.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 15:54:20 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_96D1A091-68C3-4CF9-9988-2DCF91D6A0B3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278634 - head/lib/libc/gen From: Garrett Cooper In-Reply-To: <54DD33B9.3000804@FreeBSD.org> Date: Thu, 12 Feb 2015 15:54:17 -0800 Message-Id: <46E33B5A-CCE9-4A17-9E5C-7DD0A0339227@gmail.com> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <54DD33B9.3000804@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 23:54:21 -0000 --Apple-Mail=_96D1A091-68C3-4CF9-9988-2DCF91D6A0B3 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=windows-1252 On Feb 12, 2015, at 15:14, Pedro Giffuni wrote: > On 02/12/15 17:44, Bjoern A. Zeeb wrote: >>> On 12 Feb 2015, at 22:34 , Pedro Giffuni wrote: ... > Thank you! > > This will sound strange but I can't confirm, and I can't see anything > obviously wrong. > > I have the revert ready but let me wait for jenkins to catch the > failure first. it broke the Jenkins build as well: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2364/console Thanks! --Apple-Mail=_96D1A091-68C3-4CF9-9988-2DCF91D6A0B3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3T0pAAoJEMZr5QU6S73e9nQIAJ9YfD6MYjVhNvApYmkgM/SH OyVuIdAzqv6GvX38wIyOQphA2Xjq1bUuafBrmkrKf9dZ/NQm0nQsRGUDejq6hGFR 7D08lEb9tWytKx3gt1acteawZfYknG/7GloCmoF6Y5gngN9xi0kMhQCJrRlFRLyk 5wx4RToNQ17qsrgB/JfG2krxt+fkH3eLaysbodfvDVVbNz0IaGixwmyemz+1pciX hxDoiCspwhfVKOmZoLbDbCcpMfU0XS1eTme/Du/QcJBTPcsS3luwoI6eCAWPu7CN P34lV7RiJB1vrsVYygGWhw7eIOa2sZziaxH8Eg8AGnOmd+Gh5qOLqEEDUegX4nk= =7VMK -----END PGP SIGNATURE----- --Apple-Mail=_96D1A091-68C3-4CF9-9988-2DCF91D6A0B3-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:06:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3963FD; Fri, 13 Feb 2015 00:06:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2519511C; Fri, 13 Feb 2015 00:06:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D069de091656; Fri, 13 Feb 2015 00:06:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D068sZ091654; Fri, 13 Feb 2015 00:06:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130006.t1D068sZ091654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278643 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:06:09 -0000 Author: ian Date: Fri Feb 13 00:06:07 2015 New Revision: 278643 URL: https://svnweb.freebsd.org/changeset/base/278643 Log: MFC r276394, r276397: Add armv6 implementations of the startup-time cache maintenence functions. Create a new locore.S that includes locore-v4 or locore-v6 as needed. Replaced: stable/10/sys/arm/arm/locore.S - copied unchanged from r276397, head/sys/arm/arm/locore.S Modified: stable/10/sys/arm/arm/cpu_asm-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- stable/10/sys/arm/arm/cpu_asm-v6.S Thu Feb 12 23:08:27 2015 (r278642) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:06:07 2015 (r278643) @@ -33,8 +33,6 @@ #include #include -#if __ARM_ARCH >= 7 - /* * Define cache functions used by startup code, which counts on the fact that * only r0-r3,r12 (ip) are modified and no stack space is used. These functions @@ -47,12 +45,18 @@ /* Invalidate D cache to PoC. (aka all cache levels)*/ ASENTRY_NP(dcache_inv_poc_all) +#if __ARM_ARCH == 6 + mcr CP15_DCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 - mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ - beq 4f + mov r0, r0, lsr #23 /* Get LoC 'naturally' aligned for */ + beq 4f /* use in the CSSELR register below */ -1: mcr CP15_CSSELR(r0) /* set cache level */ +1: sub r0, #2 + mcr CP15_CSSELR(r0) /* set cache level */ isb mrc CP15_CCSIDR(r0) /* read CCSIDR */ @@ -83,28 +87,31 @@ ASENTRY_NP(dcache_inv_poc_all) 3: mrc CP15_CSSELR(r0) /* get cache level */ - add r0, r0, #2 /* next level */ - mrc CP15_CLIDR(r1) - ands r1, r1, #0x07000000 - mov r1, r1, lsr #23 /* Get LoC (naturally aligned) */ - cmp r1, r0 - bgt 1b + teq r0, #0 + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) isb bx lr +#endif /* __ARM_ARCH == 6 */ END(dcache_inv_poc_all) /* Invalidate D cache to PoU. (aka L1 cache only)*/ ASENTRY_NP(dcache_inv_pou_all) +#if __ARM_ARCH == 6 + mcr CP15_DCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ beq 4f -1: mcr CP15_CSSELR(r0) /* set cache level */ +1: sub r0, #2 + mcr CP15_CSSELR(r0) /* set cache level */ isb mrc CP15_CCSIDR(r0) /* read CCSIDR */ @@ -125,7 +132,7 @@ ASENTRY_NP(dcache_inv_pou_all) mov r2, ip /* r2 now contains set way decr */ /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -2: mcr CP15_DCISW(r3) /* clean & invalidate line */ +2: mcr CP15_DCISW(r3) /* invalidate line */ movs r0, r3 /* get current way/set */ beq 3f /* at 0 means we are done */ movs r0, r0, lsl #10 /* clear way bits leaving only set bits*/ @@ -135,25 +142,27 @@ ASENTRY_NP(dcache_inv_pou_all) 3: mrc CP15_CSSELR(r0) /* get cache level */ - add r0, r0, #2 /* next level */ - mrc CP15_CLIDR(r1) - ands r1, r1, #0x07000000 - mov r1, r1, lsr #26 /* Get LoUU (naturally aligned) */ - cmp r1, r0 - bgt 1b + teq r0, #0 + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) bx lr +#endif END(dcache_inv_pou_all) /* Write back and Invalidate D cache to PoC. */ ASENTRY_NP(dcache_wbinv_poc_all) +#if __ARM_ARCH == 6 + mcr CP15_DCCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 - mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ beq 4f + mov r0, #0 /* Clean from inner to outer levels */ 1: mcr CP15_CSSELR(r0) /* set cache level */ isb @@ -176,7 +185,7 @@ ASENTRY_NP(dcache_wbinv_poc_all) mov r2, ip /* r2 now contains set way decr */ /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -2: mcr CP15_DCCISW(r3) /* clean & invalidate line */ +2: mcr CP15_DCCISW(r3) /* clean and invalidate line */ movs r0, r3 /* get current way/set */ beq 3f /* at 0 means we are done */ movs r0, r0, lsl #10 /* clear way bits leaving only set bits*/ @@ -191,12 +200,11 @@ ASENTRY_NP(dcache_wbinv_poc_all) ands r1, r1, #0x07000000 mov r1, r1, lsr #23 /* Get LoC (naturally aligned) */ cmp r1, r0 - bgt 1b + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) bx lr +#endif /* __ARM_ARCH == 6 */ END(dcache_wbinv_poc_all) - -#endif /* __ARM_ARCH >= 7 */ Copied: stable/10/sys/arm/arm/locore.S (from r276397, head/sys/arm/arm/locore.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore.S Fri Feb 13 00:06:07 2015 (r278643, copy of r276397, head/sys/arm/arm/locore.S) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights excluded. + * + * 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. + * + * $FreeBSD$ + */ + +/* + * The kernel build machinery wants the file containing the entry point to be + * named locore.S, but we want separate files for v4 and v6 builds, so just + * include the arch-appropriate file from this properly-named file. + */ + +#include + +#if __ARM_ARCH >= 6 +#include "locore-v6.S" +#else +#include "locore-v4.S" +#endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:12:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE0A07E7; Fri, 13 Feb 2015 00:12:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F9AD234; Fri, 13 Feb 2015 00:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0CMcx096077; Fri, 13 Feb 2015 00:12:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0CMlA096066; Fri, 13 Feb 2015 00:12:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130012.t1D0CMlA096066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278645 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:12:22 -0000 Author: ian Date: Fri Feb 13 00:12:21 2015 New Revision: 278645 URL: https://svnweb.freebsd.org/changeset/base/278645 Log: MFC r276444, r276445, r276470: Fix a paste-o in dcache_inv_pou_all(). Change the order of operations for the initial cache setup. A couple small fixes to make clang 3.5 happy... Move END(sigcode) and other misplace ENTRY/END macros. Modified: stable/10/sys/arm/arm/cpu_asm-v6.S stable/10/sys/arm/arm/locore-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:08:32 2015 (r278644) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:12:21 2015 (r278645) @@ -106,7 +106,7 @@ ASENTRY_NP(dcache_inv_pou_all) bx lr #else mrc CP15_CLIDR(r0) - ands r0, r0, #0x07000000 + ands r0, r0, #0x38000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ beq 4f Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:08:32 2015 (r278644) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:12:21 2015 (r278645) @@ -84,11 +84,9 @@ ASENTRY_NP(_start) */ mrc CP15_SCTLR(r7) tst r7, #CPU_CONTROL_DC_ENABLE - beq 1f - bic r7, #CPU_CONTROL_DC_ENABLE - mcr CP15_SCTLR(r7) - ISB - bl dcache_wbinv_poc_all + blne dcache_wbinv_poc_all + + /* ! Do not write to memory between wbinv and disabling cache ! */ /* * Now there are no dirty lines, but there may still be lines marked @@ -96,6 +94,7 @@ ASENTRY_NP(_start) * before setting up new page tables and re-enabling the mmu. */ 1: + bic r7, #CPU_CONTROL_DC_ENABLE bic r7, #CPU_CONTROL_MMU_ENABLE bic r7, #CPU_CONTROL_IC_ENABLE bic r7, #CPU_CONTROL_UNAL_ENABLE @@ -340,7 +339,7 @@ END(reinit_mmu) * * Addresses must be 1MiB aligned */ -ASENTRY_NP(build_pagetables) +build_pagetables: /* Set the required page attributed */ #if defined(ARM_NEW_PMAP) ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 @@ -521,6 +520,7 @@ ENTRY_NP(sigcode) /* Branch back to retry SYS_sigreturn */ b . - 16 +END(sigcode) .word SYS_sigreturn .word SYS_exit @@ -533,5 +533,5 @@ ENTRY_NP(sigcode) .global szsigcode szsigcode: .long esigcode-sigcode -END(sigcode) + /* End of locore.S */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:15:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40CAD97E; Fri, 13 Feb 2015 00:15:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4B724D; Fri, 13 Feb 2015 00:15:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0FEJ7096545; Fri, 13 Feb 2015 00:15:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0FEu7096544; Fri, 13 Feb 2015 00:15:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130015.t1D0FEu7096544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278646 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:15:14 -0000 Author: ian Date: Fri Feb 13 00:15:13 2015 New Revision: 278646 URL: https://svnweb.freebsd.org/changeset/base/278646 Log: MFC r276518: Rework vfp code so it will compile on clang 3.4 and 3.5. Modified: stable/10/sys/arm/arm/vfp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Fri Feb 13 00:12:21 2015 (r278645) +++ stable/10/sys/arm/arm/vfp.c Fri Feb 13 00:15:13 2015 (r278646) @@ -51,30 +51,35 @@ static struct undefined_handler vfp10_uh /* If true the VFP unit has 32 double registers, otherwise it has 16 */ static int is_d32; -/* The VFMXR command using coprocessor commands */ +/* + * About .fpu directives in this file... + * + * We should need simply .fpu vfpv3, but clang 3.5 has a quirk where setting + * vfpv3 doesn't imply that vfp2 features are also available -- both have to be + * explicitly set to get all the features of both. This is probably a bug in + * clang, so it may get fixed and require changes here some day. Other changes + * are probably coming in clang too, because there is email and open PRs + * indicating they want to completely disable the ability to use .fpu and + * similar directives in inline asm. That would be catastrophic for us, + * hopefully they come to their senses. There was also some discusion of a new + * syntax such as .push fpu=vfpv3; ...; .pop fpu; and that would be ideal for + * us, better than what we have now really. + * + * For gcc, each .fpu directive completely overrides the prior directive, unlike + * with clang, but luckily on gcc saying v3 implies all the v2 features as well. + */ + #define fmxr(reg, val) \ - __asm __volatile("mcr p10, 7, %0, " __STRING(reg) " , c0, 0" :: "r"(val)); + __asm __volatile(" .fpu vfpv2\n .fpu vfpv3\n" \ + " vmsr " __STRING(reg) ", %0" :: "r"(val)); -/* The VFMRX command using coprocessor commands */ #define fmrx(reg) \ ({ u_int val = 0;\ - __asm __volatile("mrc p10, 7, %0, " __STRING(reg) " , c0, 0" : "=r"(val));\ + __asm __volatile(" .fpu vfpv2\n .fpu vfpv3\n" \ + " vmrs %0, " __STRING(reg) : "=r"(val)); \ val; \ }) -/* - * Work around an issue with GCC where the asm it generates is not unified - * syntax and fails to assemble because it expects the ldcleq instruction in the - * form ldcl, not in the UAL form ldcl, and similar for stcleq. - */ -#ifdef __clang__ -#define LDCLNE "ldclne " -#define STCLNE "stclne " -#else -#define LDCLNE "ldcnel " -#define STCLNE "stcnel " -#endif - static u_int get_coprocessorACR(void) { @@ -103,25 +108,25 @@ vfp_init(void) coproc |= COPROC10 | COPROC11; set_coprocessorACR(coproc); - fpsid = fmrx(VFPSID); /* read the vfp system id */ - fpexc = fmrx(VFPEXC); /* read the vfp exception reg */ + fpsid = fmrx(fpsid); /* read the vfp system id */ + fpexc = fmrx(fpexc); /* read the vfp exception reg */ if (!(fpsid & VFPSID_HARDSOFT_IMP)) { vfp_exists = 1; is_d32 = 0; - PCPU_SET(vfpsid, fpsid); /* save the VFPSID */ + PCPU_SET(vfpsid, fpsid); /* save the fpsid */ vfp_arch = (fpsid & VFPSID_SUBVERSION2_MASK) >> VFPSID_SUBVERSION_OFF; if (vfp_arch >= VFP_ARCH3) { - tmp = fmrx(VMVFR0); + tmp = fmrx(mvfr0); PCPU_SET(vfpmvfr0, tmp); if ((tmp & VMVFR0_RB_MASK) == 2) is_d32 = 1; - tmp = fmrx(VMVFR1); + tmp = fmrx(mvfr1); PCPU_SET(vfpmvfr1, tmp); } @@ -161,10 +166,10 @@ vfp_bounce(u_int addr, u_int insn, struc * something tried to executate a truly invalid instruction that maps to * the VFP. */ - fpexc = fmrx(VFPEXC); + fpexc = fmrx(fpexc); if (fpexc & VFPEXC_EN) { /* Clear any exceptions */ - fmxr(VFPEXC, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); + fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); /* kill the process - we do not handle emulation */ critical_exit(); @@ -192,7 +197,7 @@ vfp_bounce(u_int addr, u_int insn, struc * the last thread to use the VFP on this core was this thread, then the * VFP state is valid, otherwise restore this thread's state to the VFP. */ - fmxr(VFPEXC, fpexc | VFPEXC_EN); + fmxr(fpexc, fpexc | VFPEXC_EN); curpcb = curthread->td_pcb; cpu = PCPU_GET(cpu); if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { @@ -213,22 +218,26 @@ vfp_restore(struct vfp_state *vfpsave) { uint32_t fpexc; - /* On VFPv2 we may need to restore FPINST and FPINST2 */ + /* On vfpv3 we may need to restore FPINST and FPINST2 */ fpexc = vfpsave->fpexec; if (fpexc & VFPEXC_EX) { - fmxr(VFPINST, vfpsave->fpinst); + fmxr(fpinst, vfpsave->fpinst); if (fpexc & VFPEXC_FP2V) - fmxr(VFPINST2, vfpsave->fpinst2); + fmxr(fpinst2, vfpsave->fpinst2); } - fmxr(VFPSCR, vfpsave->fpscr); + fmxr(fpscr, vfpsave->fpscr); - __asm __volatile("ldc p10, c0, [%0], #128\n" /* d0-d15 */ - "cmp %1, #0\n" /* -D16 or -D32? */ - LDCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ - "addeq %0, %0, #128\n" /* skip missing regs */ - : : "r" (vfpsave), "r" (is_d32) : "cc"); + __asm __volatile( + " .fpu vfpv2\n" + " .fpu vfpv3\n" + " vldmia %0!, {d0-d15}\n" /* d0-d15 */ + " cmp %1, #0\n" /* -D16 or -D32? */ + " vldmiane %0!, {d16-d31}\n" /* d16-d31 */ + " addeq %0, %0, #128\n" /* skip missing regs */ + : "+&r" (vfpsave) : "r" (is_d32) : "cc" + ); - fmxr(VFPEXC, fpexc); + fmxr(fpexc, fpexc); } /* @@ -241,28 +250,31 @@ vfp_store(struct vfp_state *vfpsave, boo { uint32_t fpexc; - fpexc = fmrx(VFPEXC); /* Is the vfp enabled? */ + fpexc = fmrx(fpexc); /* Is the vfp enabled? */ if (fpexc & VFPEXC_EN) { vfpsave->fpexec = fpexc; - vfpsave->fpscr = fmrx(VFPSCR); + vfpsave->fpscr = fmrx(fpscr); - /* On VFPv2 we may need to save FPINST and FPINST2 */ + /* On vfpv3 we may need to save FPINST and FPINST2 */ if (fpexc & VFPEXC_EX) { - vfpsave->fpinst = fmrx(VFPINST); + vfpsave->fpinst = fmrx(fpinst); if (fpexc & VFPEXC_FP2V) - vfpsave->fpinst2 = fmrx(VFPINST2); + vfpsave->fpinst2 = fmrx(fpinst2); fpexc &= ~VFPEXC_EX; } __asm __volatile( - "stc p11, c0, [%0], #128\n" /* d0-d15 */ - "cmp %1, #0\n" /* -D16 or -D32? */ - STCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ - "addeq %0, %0, #128\n" /* skip missing regs */ - : : "r" (vfpsave), "r" (is_d32) : "cc"); + " .fpu vfpv2\n" + " .fpu vfpv3\n" + " vstmia %0!, {d0-d15}\n" /* d0-d15 */ + " cmp %1, #0\n" /* -D16 or -D32? */ + " vstmiane r0!, {d16-d31}\n" /* d16-d31 */ + " addeq %0, %0, #128\n" /* skip missing regs */ + : "+&r" (vfpsave) : "r" (is_d32) : "cc" + ); if (disable_vfp) - fmxr(VFPEXC , fpexc & ~VFPEXC_EN); + fmxr(fpexc , fpexc & ~VFPEXC_EN); } } @@ -281,9 +293,9 @@ vfp_discard(struct thread *td) if (PCPU_GET(fpcurthread) == td) PCPU_SET(fpcurthread, NULL); - tmp = fmrx(VFPEXC); + tmp = fmrx(fpexc); if (tmp & VFPEXC_EN) - fmxr(VFPEXC, tmp & ~VFPEXC_EN); + fmxr(fpexc, tmp & ~VFPEXC_EN); } #endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:17:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C589DBB2; Fri, 13 Feb 2015 00:17:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966D5266; Fri, 13 Feb 2015 00:17:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0HN3J096936; Fri, 13 Feb 2015 00:17:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0HMDl096930; Fri, 13 Feb 2015 00:17:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130017.t1D0HMDl096930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278648 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:17:23 -0000 Author: ian Date: Fri Feb 13 00:17:22 2015 New Revision: 278648 URL: https://svnweb.freebsd.org/changeset/base/278648 Log: MFC r276519: Define a WFI macro that expands to the right form of wait-for-interrupt depending on the architecture. Modified: stable/10/sys/arm/arm/locore-v6.S stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/sysreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:17:22 2015 (r278648) @@ -461,7 +461,7 @@ ENTRY_NP(cpu_halt) teq r4, #0 movne pc, r4 1: - wfi + WFI b 1b /* Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:17:22 2015 (r278648) @@ -227,14 +227,17 @@ #define ISB isb #define DSB dsb #define DMB dmb +#define WFI wfi #elif __ARM_ARCH == 6 #define ISB mcr CP15_CP15ISB #define DSB mcr CP15_CP15DSB #define DMB mcr CP15_CP15DMB +#define WFI mcr CP15_CP15WFI #else #define ISB mcr CP15_CP15ISB #define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ #define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +/* No form of WFI available on v4, define nothing to get an error on use. */ #endif #endif /* !_MACHINE_ASM_H_ */ Modified: stable/10/sys/arm/include/sysreg.h ============================================================================== --- stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:17:22 2015 (r278648) @@ -166,6 +166,7 @@ /* Only ARMv6: */ #define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */ #define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */ +#define CP15_CP15WFI p15, 0, r0, c7, c0, 4 /* WFI */ #endif #if __ARM_ARCH >= 7 From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:21:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C81CEEAB; Fri, 13 Feb 2015 00:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2657344; Fri, 13 Feb 2015 00:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0Ltfq001130; Fri, 13 Feb 2015 00:21:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0LtAc001129; Fri, 13 Feb 2015 00:21:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201502130021.t1D0LtAc001129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 13 Feb 2015 00:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278649 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:21:55 -0000 Author: pfg Date: Fri Feb 13 00:21:54 2015 New Revision: 278649 URL: https://svnweb.freebsd.org/changeset/base/278649 Log: Revert 278634: This broke the build due to the compiler being too clever. Will be back, with proper compiler workarounds. Modified: head/lib/libc/gen/ulimit.c Modified: head/lib/libc/gen/ulimit.c ============================================================================== --- head/lib/libc/gen/ulimit.c Fri Feb 13 00:17:22 2015 (r278648) +++ head/lib/libc/gen/ulimit.c Fri Feb 13 00:21:54 2015 (r278649) @@ -53,13 +53,13 @@ ulimit(int cmd, ...) va_start(ap, cmd); arg = va_arg(ap, long); va_end(ap); - if (arg > RLIM_INFINITY / 512 || arg < 0) - arg = RLIM_INFINITY / 512; limit.rlim_max = limit.rlim_cur = (rlim_t)arg * 512; /* The setrlimit() function sets errno to EPERM if needed. */ if (setrlimit(RLIMIT_FSIZE, &limit) == -1) return (-1); + if (arg * 512 > LONG_MAX) + return (LONG_MAX); return (arg); } else { errno = EINVAL; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:27:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB4F27D for ; Fri, 13 Feb 2015 00:27:26 +0000 (UTC) Received: from nm30-vm0.bullet.mail.bf1.yahoo.com (nm30-vm0.bullet.mail.bf1.yahoo.com [98.139.213.126]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8A1390 for ; Fri, 13 Feb 2015 00:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423787243; bh=RytAHeBAdaYvuReDUlf1HF3F27c73MnVpjtBPfCDbTA=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=oW4uZHr7W817DSquAiX8avUYda8AZcsEFUsHfMVetfTQDSS0t64H4xwoeFoceQ0ffCXq4V3m2rKAHbmgCN/Lb6MxuFUtKdsyEcYi9zMXmrb6s1OF5lRVwHc0gJuFWiZaB3gF/nUOCFCL722nEcnMYdbFhRXQ6+t+3v2oPcKYTGKSiS1GKOjfMpa1lPJyR/FUpPKbpl2qpdog3miErTWnSWie92w8Rw+0xQltAeMiEJ+SiDSTdBbxNKgjfAm1PpF0lDQ14IHE8nyFnAiMKjokU28vQWAV/k+gq5eKakAURl5t6dqKRzLud0EijbkzioS0Ddz0hQGQPRYd8KY83gbWYg== Received: from [98.139.215.140] by nm30.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 00:27:23 -0000 Received: from [98.139.213.8] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 00:27:23 -0000 Received: from [127.0.0.1] by smtp108.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 00:27:23 -0000 X-Yahoo-Newman-Id: 200040.69148.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .nY_OWIVM1nmoOh4N6SjmDgMxnbQ19NFDby4pnrz1b.u6jq 18INr8TLuPKVAg.6iiA5CkJ4GMH78LwdIkiBMRU7cs95AO_hNOeoz6zqSqWi GdXhq5PiEjQqKvPv1u17_pdyZVsxM48YN7pUWsmYA_caVnwj6Ft9A_M3gP1R ZFqhSykSgIsJGY3j5vVAClFtRHH.aMYYPqNk4JlBHv_CpmRyaAB3BuATeNYg 0_C2mI84WwWeUoCd6JO33VXsPv3tfD9vcjNCeM_dnuOBFzK4HqZK_f3jrsba AfUnyj6mmKZs5NZN0Nnj408USanE9_Fsv8hZSr1cgCrZtahf.K_a4ex8YmzL KdmRAvRIb7c4vtO2i70PBWKJcNR.J_hHrLsPFBxDoyLM_qROeUOW2pHmgsJT 8tiEyT5_aUQ_F90EfVRsQKOfX0Y4Ie8UR3Rd2klFoXX.kI3MvhD9ksKY0MXz PCli61XO6iY8xYbPpFQtg.8pIQTkT7fN7PY1z_BnJjoL4rsOvJqJpxOouHxQ OXVQYu6GJoOcr7WMCYnCVraGQ8TQQQuLy X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DD44F3.9030108@FreeBSD.org> Date: Thu, 12 Feb 2015 19:27:31 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <54DD33B9.3000804@FreeBSD.org> <46E33B5A-CCE9-4A17-9E5C-7DD0A0339227@gmail.com> In-Reply-To: <46E33B5A-CCE9-4A17-9E5C-7DD0A0339227@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:27:26 -0000 On 02/12/15 18:54, Garrett Cooper wrote: > On Feb 12, 2015, at 15:14, Pedro Giffuni wrote: > >> On 02/12/15 17:44, Bjoern A. Zeeb wrote: >>>> On 12 Feb 2015, at 22:34 , Pedro Giffuni wrote: > ... > >> Thank you! >> >> This will sound strange but I can't confirm, and I can't see anything >> obviously wrong. >> >> I have the revert ready but let me wait for jenkins to catch the >> failure first. > it broke the Jenkins build as well: > > https://jenkins.freebsd.org/job/FreeBSD_HEAD/2364/console > > Thanks! Thank you ... I can reproduce it now. Pedro. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:30:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957E345F; Fri, 13 Feb 2015 00:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA883BB; Fri, 13 Feb 2015 00:30:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0U0Cq002333; Fri, 13 Feb 2015 00:30:00 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0TwbR002255; Fri, 13 Feb 2015 00:29:58 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502130029.t1D0TwbR002255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 00:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278650 - in stable/10: sys/kern tools/sched usr.bin/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:30:00 -0000 Author: sbruno Date: Fri Feb 13 00:29:57 2015 New Revision: 278650 URL: https://svnweb.freebsd.org/changeset/base/278650 Log: MFC 272315 272757 274091 274902 r272315 Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. r272757 Add schedgraph traces for callout handlers. Specifically, a callwheel logs a running event each time it executes a callout function. The event includes the function pointer, argument, and whether or not it was run from hardware interrupt context. The callwheel is marked idle when each handler completes. This effectively logs the duration of each callout routine in the graph. r274091 Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. r274902 Add a new thread state "spinning" to schedgraph and add tracepoints at the start and stop of spinning waits in lock primitives. Reviewed by: jhb Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 00:29:57 2015 (r278650) @@ -583,6 +583,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -598,11 +601,16 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -620,6 +628,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -815,6 +825,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -830,6 +843,8 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -839,6 +854,9 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -855,6 +873,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 00:29:57 2015 (r278650) @@ -436,6 +436,10 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", + m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -443,6 +447,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "running"); continue; } } @@ -579,6 +586,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -604,6 +613,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 00:29:57 2015 (r278650) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -423,6 +424,9 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -430,16 +434,23 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i != rowner_loops) continue; } @@ -759,6 +770,9 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -766,6 +780,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -777,11 +793,16 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 00:29:57 2015 (r278650) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -560,6 +561,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", + sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -568,9 +573,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -587,6 +597,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -849,6 +861,9 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -857,6 +872,8 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 00:29:57 2015 (r278650) @@ -150,6 +150,7 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; + char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -188,7 +189,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc); +static void callout_cpu_init(struct callout_cpu *cc, int cpu); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -283,7 +284,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc); + callout_cpu_init(cc, timeout_cpu); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -291,7 +292,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc) +callout_cpu_init(struct callout_cpu *cc, int cpu) { struct callout *c; int i; @@ -306,6 +307,8 @@ callout_cpu_init(struct callout_cpu *cc) cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); + snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), + "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -367,7 +370,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc); + callout_cpu_init(cc, cpu); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -674,6 +677,8 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } + KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", + "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -696,6 +701,7 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif + KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 00:29:57 2015 (r278650) @@ -70,6 +70,7 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), + ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -80,8 +81,6 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), - ("callwheel idle", "grey"), - ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -856,7 +855,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) @@ -903,7 +902,6 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} - self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/usr.bin/man/man.sh Fri Feb 13 00:29:57 2015 (r278650) @@ -276,11 +276,8 @@ man_check_for_so() { return 0 } -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable man_display_page() { - local EQN NROFF PIC TBL TROFF REFER VGRIND - local IFS l nroff_dev pipeline preproc_arg tool + local IFS pipeline preconv_enc testline # We are called with IFS set to colon. This causes really weird # things to happen for the variables that have spaces in them. @@ -312,6 +309,49 @@ man_display_page() { return fi + case "${manpage}" in + *.${man_charset}/*) + case "$man_charset" in + ISO8859-1) preconv_enc="latin-1" ;; + ISO8859-15) preconv_enc="latin-1" ;; + UTF-8) preconv_enc="utf-8" ;; + esac + ;; + esac + + if [ -n "$preconv_enc" ]; then + pipeline="preconv -e $preconv_enc |" + fi + testline="$pipeline mandoc -Tlint -Werror 2>/dev/null" + pipeline="$pipeline mandoc -Tlocale | $MANPAGER" + + if ! eval "$cattool $manpage | $testline" ;then + if which -s groff2; then + man_display_page_groff + else + echo "This manpage needs groff(1) to be rendered" >&2 + echo "First install groff(1): " >&2 + echo "pkg install groff " >&2 + ret=1 + fi + return + fi + + if [ $debug -gt 0 ]; then + decho "Command: $cattool $manpage | $pipeline" + ret=0 + else + eval "$cattool $manpage | $pipeline" + ret=$? + fi +} + +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable +man_display_page_groff() { + local EQN NROFF PIC TBL TROFF REFER VGRIND + local IFS l nroff_dev pipeline preproc_arg tool + # So, we really do need to parse the manpage. First, figure out the # device flag (-T) we have to pass to eqn(1) and groff(1). Then, # setup the pipeline of commands based on the user's request. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:41:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A2B7895; Fri, 13 Feb 2015 00:41:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74DCF77C; Fri, 13 Feb 2015 00:41:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0f4VR008625; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0f4N6008624; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502130041.t1D0f4N6008624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 13 Feb 2015 00:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278651 - in stable: 10/share/man/man5 9/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:41:04 -0000 Author: gjb Date: Fri Feb 13 00:41:03 2015 New Revision: 278651 URL: https://svnweb.freebsd.org/changeset/base/278651 Log: MFC r278526: Fix a rendering issue in the nullfs(5) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/nullfs.5 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/share/man/man5/nullfs.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/10/share/man/man5/nullfs.5 ============================================================================== --- stable/10/share/man/man5/nullfs.5 Fri Feb 13 00:29:57 2015 (r278650) +++ stable/10/share/man/man5/nullfs.5 Fri Feb 13 00:41:03 2015 (r278651) @@ -24,15 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd February 10, 2015 .Dt NULLFS 5 .Os .Sh NAME .Nm nullfs .Nd "null file system" .Sh SYNOPSIS -To enable support for -.Nm , +To enable support for this driver, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "options NULLFS" From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:41:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F029896; Fri, 13 Feb 2015 00:41:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A1277D; Fri, 13 Feb 2015 00:41:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0f4Vd008634; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0f4mR008633; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502130041.t1D0f4mR008633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 13 Feb 2015 00:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278651 - in stable: 10/share/man/man5 9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:41:05 -0000 Author: gjb Date: Fri Feb 13 00:41:03 2015 New Revision: 278651 URL: https://svnweb.freebsd.org/changeset/base/278651 Log: MFC r278526: Fix a rendering issue in the nullfs(5) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man5/nullfs.5 Directory Properties: stable/9/share/man/man5/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man5/nullfs.5 Directory Properties: stable/10/ (props changed) Modified: stable/9/share/man/man5/nullfs.5 ============================================================================== --- stable/9/share/man/man5/nullfs.5 Fri Feb 13 00:29:57 2015 (r278650) +++ stable/9/share/man/man5/nullfs.5 Fri Feb 13 00:41:03 2015 (r278651) @@ -24,15 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd February 10, 2015 .Dt NULLFS 5 .Os .Sh NAME .Nm nullfs .Nd "null file system" .Sh SYNOPSIS -To enable support for -.Nm , +To enable support for this driver, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "options NULLFS" From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 00:49:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E1BCCED; Fri, 13 Feb 2015 00:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 774D77CD; Fri, 13 Feb 2015 00:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D0nq1v012190; Fri, 13 Feb 2015 00:49:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0nmk5012173; Fri, 13 Feb 2015 00:49:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130049.t1D0nmk5012173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278652 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:49:52 -0000 Author: ian Date: Fri Feb 13 00:49:47 2015 New Revision: 278652 URL: https://svnweb.freebsd.org/changeset/base/278652 Log: MFC r276525, r276596: Put in a workaround for bug 196407 (arm modules cause crashes & panics). (Don't allow movw/movt insn in modules.) Fix alignment directives in arm asm code after clang 3.5 import. Modified: stable/10/sys/arm/arm/bcopyinout.S stable/10/sys/arm/arm/bcopyinout_xscale.S stable/10/sys/arm/arm/copystr.S stable/10/sys/arm/arm/cpufunc_asm.S stable/10/sys/arm/arm/cpufunc_asm_arm10.S stable/10/sys/arm/arm/cpufunc_asm_arm9.S stable/10/sys/arm/arm/cpufunc_asm_armv5.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fusu.S stable/10/sys/arm/arm/locore-v4.S stable/10/sys/arm/arm/locore-v6.S stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/profile.h stable/10/sys/conf/kmod.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/bcopyinout.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:49:47 2015 (r278652) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #else .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ Modified: stable/10/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:49:47 2015 (r278652) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); .syntax unified .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ Modified: stable/10/sys/arm/arm/copystr.S ============================================================================== --- stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:49:47 2015 (r278652) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ @@ -210,5 +210,5 @@ END(copyoutstr) Lcopystrpcbfaulttext: .asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n" - .align 0 + .align 2 #endif Modified: stable/10/sys/arm/arm/cpufunc_asm.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:49:47 2015 (r278652) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 ENTRY(cpufunc_nullop) RET @@ -138,7 +138,7 @@ ENTRY(cpufunc_control) RET .Lglou: .asciz "plop %p\n" - .align 0 + .align 2 END(cpufunc_control) /* Modified: stable/10/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:49:47 2015 (r278652) @@ -265,7 +265,7 @@ END(arm10_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm10_dcache_sets_max) .space 4 C_OBJECT(arm10_dcache_index_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:49:47 2015 (r278652) @@ -252,7 +252,7 @@ END(arm9_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm9_dcache_sets_max) .space 4 C_OBJECT(arm9_dcache_index_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv5.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:49:47 2015 (r278652) @@ -236,7 +236,7 @@ END(armv5_idcache_wbinv_all) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(armv5_dcache_sets_max) .space 4 C_OBJECT(armv5_dcache_index_max) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/exception.S Fri Feb 13 00:49:47 2015 (r278652) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 /* * ASM macros for pushing and pulling trapframes from the stack Modified: stable/10/sys/arm/arm/fusu.S ============================================================================== --- stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:49:47 2015 (r278652) @@ -204,7 +204,7 @@ Lblock_userspace_access: .word _C_LABEL(block_userspace_access) .data - .align 0 + .align 2 .global _C_LABEL(block_userspace_access) _C_LABEL(block_userspace_access): .word 0 Modified: stable/10/sys/arm/arm/locore-v4.S ============================================================================== --- stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:49:47 2015 (r278652) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); * the running kernel. */ .text - .align 0 + .align 2 #ifdef PHYSADDR .globl kernbase .set kernbase,KERNBASE @@ -373,7 +373,7 @@ Lend: .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -389,7 +389,7 @@ pagetable: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -476,7 +476,7 @@ mpvirt_done: .Lmpreturned: .asciz "init_secondary() returned" - .align 0 + .align 2 END(mpentry) #endif @@ -584,7 +584,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:49:47 2015 (r278652) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define INIT_ARM_STACK_SIZE 2048 .text - .align 0 + .align 2 /* * On entry for FreeBSD boot ABI: @@ -373,7 +373,7 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -390,7 +390,7 @@ boot_pt1: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -443,11 +443,11 @@ ASENTRY_NP(mpentry) adr r0, .Lmpreturned b _C_LABEL(panic) /* NOTREACHED */ +END(mpentry) .Lmpreturned: .asciz "init_secondary() returned" - .align 0 -END(mpentry) + .align 2 #endif ENTRY_NP(cpu_halt) @@ -525,7 +525,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:49:47 2015 (r278652) @@ -46,7 +46,7 @@ #define _ASM_LABEL(x) x #ifndef _ALIGN_TEXT -# define _ALIGN_TEXT .align 0 +# define _ALIGN_TEXT .align 2 #endif #if defined(__ARM_EABI__) && !defined(_STANDALONE) @@ -129,11 +129,11 @@ pclabel: add got, got, pc #ifdef __thumb__ #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4) #else #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8) #endif Modified: stable/10/sys/arm/include/profile.h ============================================================================== --- stable/10/sys/arm/include/profile.h Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/include/profile.h Fri Feb 13 00:49:47 2015 (r278652) @@ -60,7 +60,7 @@ typedef u_long fptrdiff_t; #define MCOUNT \ __asm__(".text"); \ - __asm__(".align 0"); \ + __asm__(".align 2"); \ __asm__(".type __mcount ,%function"); \ __asm__(".global __mcount"); \ __asm__("__mcount:"); \ Modified: stable/10/sys/conf/kmod.mk ============================================================================== --- stable/10/sys/conf/kmod.mk Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/conf/kmod.mk Fri Feb 13 00:49:47 2015 (r278652) @@ -125,6 +125,11 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +# Temporary workaround for PR 196407, which contains the fascinating details. +.if ${MACHINE_CPUARCH} == arm +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.endif + .if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 01:07:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0C0D4A3; Fri, 13 Feb 2015 01:07:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC48A977; Fri, 13 Feb 2015 01:07:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D17DJL021790; Fri, 13 Feb 2015 01:07:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D17D3q021789; Fri, 13 Feb 2015 01:07:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502130107.t1D17D3q021789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 01:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278653 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 01:07:14 -0000 Author: ngie Date: Fri Feb 13 01:07:12 2015 New Revision: 278653 URL: https://svnweb.freebsd.org/changeset/base/278653 Log: Call wait to ensure that background processes have died This is being done to establish parity with pgrep-j_test Modified: head/bin/pkill/tests/pgrep-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Fri Feb 13 00:49:47 2015 (r278652) +++ head/bin/pkill/tests/pgrep-j_test.sh Fri Feb 13 01:07:12 2015 (r278653) @@ -50,6 +50,7 @@ else fi [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) +wait name="pgrep -j any" sleep_amount=6 @@ -70,6 +71,7 @@ else fi [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) +wait name="pgrep -j none" sleep_amount=7 From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 01:07:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9E265E2; Fri, 13 Feb 2015 01:07:51 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9B5297F; Fri, 13 Feb 2015 01:07:51 +0000 (UTC) Received: by pdjy10 with SMTP id y10so15653309pdj.13; Thu, 12 Feb 2015 17:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=tAKPtvvrGdICZaukQ0QrJusYdUBFWU8ZXBJyZpF63uE=; b=GKvEW+xZzTtEUD/xfWKaS65AlW1Ylu0nWl648tcdkwI5m6GmGgICWtaL7SAyrcrCca bgCt2VTWsf3fH41SSOsiERqPzND5jJxULzcTNcjgdyA4UyBNYt4l3XGriQEHEVMZLtV8 hnQJuTqWUbYPwYqeuVJFxmM7ItsgqJAwqRfYl49WJRU5pSgqTNPGNXygSNvABjAdcYWM Uj2LdWgyiYstOSte7H36QNsnjntrlPYFq3xoGdFwZY5M5NwbrPPrBuhWoQSFdsg9P6Bh 03oOyp+3OHZ2dzKTNBqEdpfz6yT/PjOeCarfzPVQSvLKOemBRX8OlmgbQyXkSpodebYU 3B5g== X-Received: by 10.68.57.228 with SMTP id l4mr10920336pbq.43.1423789665388; Thu, 12 Feb 2015 17:07:45 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:5de4:da0f:932c:57df? ([2601:8:ab80:7d6:5de4:da0f:932c:57df]) by mx.google.com with ESMTPSA id uy8sm4917541pbc.31.2015.02.12.17.07.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 17:07:44 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_A2D93F56-ACC3-4CF3-BBF2-9BFF6155836B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278653 - head/bin/pkill/tests From: Garrett Cooper In-Reply-To: <201502130107.t1D17D3q021789@svn.freebsd.org> Date: Thu, 12 Feb 2015 17:07:41 -0800 Message-Id: References: <201502130107.t1D17D3q021789@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 01:07:52 -0000 --Apple-Mail=_A2D93F56-ACC3-4CF3-BBF2-9BFF6155836B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Feb 12, 2015, at 17:07, Garrett Cooper wrote: > Author: ngie > Date: Fri Feb 13 01:07:12 2015 > New Revision: 278653 > URL: https://svnweb.freebsd.org/changeset/base/278653 > > Log: > Call wait to ensure that background processes have died > > This is being done to establish parity with pgrep-j_test I meant pkill-j_test. --Apple-Mail=_A2D93F56-ACC3-4CF3-BBF2-9BFF6155836B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3U5eAAoJEMZr5QU6S73eHAAH/1zauBohtUd9gz6gvpv/rgIX CJaEJJ/JQYkBZEHXBClZk6qyyehpDWMFzbOYNNWb09JU4LLkFEZY1Bl3jJyatMzl DmrOtlITpnGtKyPGhIG87lqraPwFESQwbb5uVKqUGh1N6WJJyE1SCNh5V21sj4xA pXG0wyxuQZd24su9vN+G1TyllCEPdry0GbE4go1m2kJlL0VCbGVUffqgQYD/n1nj KuSOwAb5kTOZoR9CwwkBvPtBdDCBvEzHlwSYH/zhoKUhfWptKpY7Y+6DVFxwaI7K ep5VANqY62Frtff9h3JpX8WA83Ji9aen2IrcoZqS7F3vfySy0m3qQmJ9MPszlOA= =oRPn -----END PGP SIGNATURE----- --Apple-Mail=_A2D93F56-ACC3-4CF3-BBF2-9BFF6155836B-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 01:20:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16307CE1; Fri, 13 Feb 2015 01:20:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01D08A80; Fri, 13 Feb 2015 01:20:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D1KcOW026986; Fri, 13 Feb 2015 01:20:38 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D1KceQ026984; Fri, 13 Feb 2015 01:20:38 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201502130120.t1D1KceQ026984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Fri, 13 Feb 2015 01:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278654 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 01:20:39 -0000 Author: jmg Date: Fri Feb 13 01:20:37 2015 New Revision: 278654 URL: https://svnweb.freebsd.org/changeset/base/278654 Log: add support for specifying an initial buffer size when fetching a sysctl... This is useful for kern.arandom which (without -B) will happily return 0 bytes, which isn't too useful or random... fix spelling (thanks igor!) of settable while I'm here... Modified: head/sbin/sysctl/sysctl.8 head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Fri Feb 13 01:07:12 2015 (r278653) +++ head/sbin/sysctl/sysctl.8 Fri Feb 13 01:20:37 2015 (r278654) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 13, 2012 +.Dd February 12, 2015 .Dt SYSCTL 8 .Os .Sh NAME @@ -37,11 +37,13 @@ .Sh SYNOPSIS .Nm .Op Fl bdehiNnoRTqx +.Op Fl B Ar bufsize .Op Fl f Ar filename .Ar name Ns Op = Ns Ar value .Ar ... .Nm .Op Fl bdehNnoRTqx +.Op Fl B Ar bufsize .Fl a .Sh DESCRIPTION The @@ -68,6 +70,15 @@ the command line. Force the value of the variable(s) to be output in raw, binary format. No names are printed and no terminating newlines are output. This is mostly useful with a single variable. +.It Fl B Ar bufsize +Set the buffer size to read from the +.Nm +to +.Ar bufsize . +This is necessary for a +.Nm +that has variable length, and the probe value of 0 is a valid length, such as +.Va kern.arandom . .It Fl d Print the description of the variable instead of its value. .It Fl e @@ -128,7 +139,7 @@ Suppress some warnings generated by .Nm to standard error. .It Fl T -Display only variables that are setable via loader (CTLFLAG_TUN). +Display only variables that are settable via loader (CTLFLAG_TUN). .It Fl W Display only writable variables that are not statistical. Useful for determining the set of runtime tunable sysctls. Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Fri Feb 13 01:07:12 2015 (r278653) +++ head/sbin/sysctl/sysctl.c Fri Feb 13 01:20:37 2015 (r278654) @@ -71,7 +71,7 @@ static const char rcsid[] = static const char *conffile; -static int aflag, bflag, dflag, eflag, hflag, iflag; +static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag; static int Nflag, nflag, oflag, qflag, Tflag, Wflag, xflag; static int oidfmt(int *, int, char *, u_int *); @@ -112,8 +112,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehiNnoqTWx] [-f filename] name[=value] ...", - " sysctl [-bdehNnoqTWx] -a"); + "usage: sysctl [-bdehiNnoqTWx] [ -B ] [-f filename] name[=value] ...", + " sysctl [-bdehNnoqTWx] [ -B ] -a"); exit(1); } @@ -127,7 +127,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxX")) != -1) { + while ((ch = getopt(argc, argv, "AabB:def:hiNnoqTwWxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -139,6 +139,9 @@ main(int argc, char **argv) case 'b': bflag = 1; break; + case 'B': + Bflag = strtol(optarg, NULL, 0); + break; case 'd': dflag = 1; break; @@ -222,7 +225,7 @@ parse(const char *string, int lineno) unsigned int uintval; long longval; unsigned long ulongval; - size_t newsize = 0; + size_t newsize = Bflag; int64_t i64val; uint64_t u64val; int mib[CTL_MAXNAME]; @@ -815,9 +818,13 @@ show_var(int *oid, int nlen) return (0); } /* find an estimate of how much we need for this var */ - j = 0; - i = sysctl(oid, nlen, 0, &j, 0, 0); - j += j; /* we want to be sure :-) */ + if (Bflag) + j = Bflag; + else { + j = 0; + i = sysctl(oid, nlen, 0, &j, 0, 0); + j += j; /* we want to be sure :-) */ + } val = oval = malloc(j + 1); if (val == NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 01:35:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E1163B0; Fri, 13 Feb 2015 01:35:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECFEAC62; Fri, 13 Feb 2015 01:35:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D1Zsq7035827; Fri, 13 Feb 2015 01:35:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D1Zs6x035825; Fri, 13 Feb 2015 01:35:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201502130135.t1D1Zs6x035825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 13 Feb 2015 01:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278655 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 01:35:55 -0000 Author: markj Date: Fri Feb 13 01:35:53 2015 New Revision: 278655 URL: https://svnweb.freebsd.org/changeset/base/278655 Log: Add support for decoding multibyte NOPs. Differential Revision: https://reviews.freebsd.org/D1830 Reviewed by: jhb, kib MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Modified: head/sys/amd64/amd64/db_disasm.c head/sys/i386/i386/db_disasm.c Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Fri Feb 13 01:20:37 2015 (r278654) +++ head/sys/amd64/amd64/db_disasm.c Fri Feb 13 01:35:53 2015 (r278655) @@ -250,6 +250,26 @@ static const struct inst db_inst_0f0x[] /*0f*/ { "", FALSE, NONE, 0, 0 }, }; +static const struct inst db_inst_0f1x[] = { +/*10*/ { "", FALSE, NONE, 0, 0 }, +/*11*/ { "", FALSE, NONE, 0, 0 }, +/*12*/ { "", FALSE, NONE, 0, 0 }, +/*13*/ { "", FALSE, NONE, 0, 0 }, +/*14*/ { "", FALSE, NONE, 0, 0 }, +/*15*/ { "", FALSE, NONE, 0, 0 }, +/*16*/ { "", FALSE, NONE, 0, 0 }, +/*17*/ { "", FALSE, NONE, 0, 0 }, + +/*18*/ { "", FALSE, NONE, 0, 0 }, +/*19*/ { "", FALSE, NONE, 0, 0 }, +/*1a*/ { "", FALSE, NONE, 0, 0 }, +/*1b*/ { "", FALSE, NONE, 0, 0 }, +/*1c*/ { "", FALSE, NONE, 0, 0 }, +/*1d*/ { "", FALSE, NONE, 0, 0 }, +/*1e*/ { "", FALSE, NONE, 0, 0 }, +/*1f*/ { "nopl", TRUE, SDEP, 0, "nopw" }, +}; + static const struct inst db_inst_0f2x[] = { /*20*/ { "mov", TRUE, LONG, op2(CR,El), 0 }, /*21*/ { "mov", TRUE, LONG, op2(DR,El), 0 }, @@ -431,7 +451,7 @@ static const struct inst db_inst_0fcx[] static const struct inst * const db_inst_0f[] = { db_inst_0f0x, - 0, + db_inst_0f1x, db_inst_0f2x, db_inst_0f3x, db_inst_0f4x, Modified: head/sys/i386/i386/db_disasm.c ============================================================================== --- head/sys/i386/i386/db_disasm.c Fri Feb 13 01:20:37 2015 (r278654) +++ head/sys/i386/i386/db_disasm.c Fri Feb 13 01:35:53 2015 (r278655) @@ -195,6 +195,26 @@ static const struct inst db_inst_0f0x[] /*0f*/ { "", FALSE, NONE, 0, 0 }, }; +static const struct inst db_inst_0f1x[] = { +/*10*/ { "", FALSE, NONE, 0, 0 }, +/*11*/ { "", FALSE, NONE, 0, 0 }, +/*12*/ { "", FALSE, NONE, 0, 0 }, +/*13*/ { "", FALSE, NONE, 0, 0 }, +/*14*/ { "", FALSE, NONE, 0, 0 }, +/*15*/ { "", FALSE, NONE, 0, 0 }, +/*16*/ { "", FALSE, NONE, 0, 0 }, +/*17*/ { "", FALSE, NONE, 0, 0 }, + +/*18*/ { "", FALSE, NONE, 0, 0 }, +/*19*/ { "", FALSE, NONE, 0, 0 }, +/*1a*/ { "", FALSE, NONE, 0, 0 }, +/*1b*/ { "", FALSE, NONE, 0, 0 }, +/*1c*/ { "", FALSE, NONE, 0, 0 }, +/*1d*/ { "", FALSE, NONE, 0, 0 }, +/*1e*/ { "", FALSE, NONE, 0, 0 }, +/*1f*/ { "nopl", TRUE, SDEP, 0, "nopw" }, +}; + static const struct inst db_inst_0f2x[] = { /*20*/ { "mov", TRUE, LONG, op2(CR,El), 0 }, /*21*/ { "mov", TRUE, LONG, op2(DR,El), 0 }, @@ -356,7 +376,7 @@ static const struct inst db_inst_0fcx[] static const struct inst * const db_inst_0f[] = { db_inst_0f0x, - 0, + db_inst_0f1x, db_inst_0f2x, db_inst_0f3x, db_inst_0f4x, From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 02:02:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 396E8DDF; Fri, 13 Feb 2015 02:02:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 228A4F25; Fri, 13 Feb 2015 02:02:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D22Fdi049827; Fri, 13 Feb 2015 02:02:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D22DhW049813; Fri, 13 Feb 2015 02:02:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130202.t1D22DhW049813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 02:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278656 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 02:02:15 -0000 Author: ian Date: Fri Feb 13 02:02:12 2015 New Revision: 278656 URL: https://svnweb.freebsd.org/changeset/base/278656 Log: MFC r272356, r275639, r276638: Split syscall handling out to a separate file. Include sys/kernel.h to pick up the definition of hz in syscall.c Add a new trap-v6.c which has support for all armv7 exceptions. Added: stable/10/sys/arm/arm/syscall.c - copied, changed from r272356, head/sys/arm/arm/syscall.c stable/10/sys/arm/arm/trap-v6.c - copied unchanged from r276638, head/sys/arm/arm/trap-v6.c Modified: stable/10/sys/arm/arm/trap.c stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/proc.h stable/10/sys/conf/files.arm Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/arm/syscall.c (from r272356, head/sys/arm/arm/syscall.c) ============================================================================== --- head/sys/arm/arm/syscall.c Wed Oct 1 12:44:16 2014 (r272356, copy source) +++ stable/10/sys/arm/arm/syscall.c Fri Feb 13 02:02:12 2015 (r278656) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Copied: stable/10/sys/arm/arm/trap-v6.c (from r276638, head/sys/arm/arm/trap-v6.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 02:02:12 2015 (r278656, copy of r276638, head/sys/arm/arm/trap-v6.c) @@ -0,0 +1,655 @@ +/*- + * Copyright 2014 Olivier Houchard + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * Copyright 2014 Andrew Turner + * All rights reserved. + * + * 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 "opt_ktrace.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef KTRACE +#include +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef KDB +#include +#include +#endif + +extern char fusubailout[]; + +struct ksig { + int sig; + u_long code; + vm_offset_t addr; +}; + +typedef int abort_func_t(struct trapframe *, u_int, u_int, u_int, u_int, + struct thread *, struct ksig *); + +static abort_func_t abort_fatal; +static abort_func_t abort_align; +static abort_func_t abort_icache; + +struct abort { + abort_func_t *func; + const char *desc; +}; + +/* + * How are the aborts handled? + * + * Undefined Code: + * - Always fatal as we do not know what does it mean. + * Imprecise External Abort: + * - Always fatal, but can be handled somehow in the future. + * Now, due to PCIe buggy harware, ignored. + * Precise External Abort: + * - Always fatal, but who knows in the future??? + * Debug Event: + * - Special handling. + * External Translation Abort (L1 & L2) + * - Always fatal as something is screwed up in page tables or harware. + * Domain Fault (L1 & L2): + * - Always fatal as we do not play game with domains. + * Alignment Fault: + * - Everything should be aligned in kernel including user to kernel and + * vice versa data copying, so we ignore pcb_onfault, and it's always fatal. + * We generate signal in case of abort from user mode. + * Instruction cache maintenance: + * - According to manual, this is translation fault during cache maintenance + * operation. So, it could be really complex in SMP case and fuzzy too + * for cache operations working on virtual addresses. For now, we will + * consider this abort as fatal. In fact, no cache maintenance on + * not mapped virtual addresses should be called. As cache maintenance + * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * the abort is fatal for user mode as well for now. (This is good place to + * note that cache maintenance on virtual address fill TLB.) + * Acces Bit (L1 & L2): + * - Fast hardware emulation for kernel and user mode. + * Translation Fault (L1 & L2): + * - Standard fault mechanism is held including vm_fault(). + * Permission Fault (L1 & L2): + * - Fast harware emulation of modify bits and in other cases, standard + * fault mechanism is held including vm_fault(). + */ + +static const struct abort aborts[] = { + {abort_fatal, "Undefined Code (0x000)"}, + {abort_align, "Alignment Fault"}, + {abort_fatal, "Debug Event"}, + {NULL, "Access Bit (L1)"}, + {abort_icache, "Instruction cache maintenance"}, + {NULL, "Translation Fault (L1)"}, + {NULL, "Access Bit (L2)"}, + {NULL, "Translation Fault (L2)"}, + + {abort_fatal, "External Abort"}, + {abort_fatal, "Domain Fault (L1)"}, + {abort_fatal, "Undefined Code (0x00A)"}, + {abort_fatal, "Domain Fault (L2)"}, + {abort_fatal, "External Translation Abort (L1)"}, + {NULL, "Permission Fault (L1)"}, + {abort_fatal, "External Translation Abort (L2)"}, + {NULL, "Permission Fault (L2)"}, + + {abort_fatal, "TLB Conflict Abort"}, + {abort_fatal, "Undefined Code (0x401)"}, + {abort_fatal, "Undefined Code (0x402)"}, + {abort_fatal, "Undefined Code (0x403)"}, + {abort_fatal, "Undefined Code (0x404)"}, + {abort_fatal, "Undefined Code (0x405)"}, + {abort_fatal, "Asynchronous External Abort"}, + {abort_fatal, "Undefined Code (0x407)"}, + + {abort_fatal, "Asynchronous Parity Error on Memory Access"}, + {abort_fatal, "Parity Error on Memory Access"}, + {abort_fatal, "Undefined Code (0x40A)"}, + {abort_fatal, "Undefined Code (0x40B)"}, + {abort_fatal, "Parity Error on Translation (L1)"}, + {abort_fatal, "Undefined Code (0x40D)"}, + {abort_fatal, "Parity Error on Translation (L2)"}, + {abort_fatal, "Undefined Code (0x40F)"} +}; + + +static __inline void +call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr) +{ + ksiginfo_t ksi; + + CTR4(KTR_TRAP, "%s: addr: %#x, sig: %d, code: %d", + __func__, addr, sig, code); + + /* + * TODO: some info would be nice to know + * if we are serving data or prefetch abort. + */ + + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = sig; + ksi.ksi_code = code; + ksi.ksi_addr = (void *)addr; + trapsignal(td, &ksi); +} + +/* + * abort_imprecise() handles the following abort: + * + * FAULT_EA_IMPREC - Imprecise External Abort + * + * The imprecise means that we don't know where the abort happened, + * thus FAR is undefined. The abort should not never fire, but hot + * plugging or accidental harware failure can be the cause of it. + * If the abort happens, it can even be on different (thread) context. + * Without any additional support, the abort is fatal, as we do not + * know what really happened. + * + * QQQ: Some additional functionality, like pcb_onfault but global, + * can be implemented. Imprecise handlers could be registered + * which tell us if the abort is caused by something they know + * about. They should return one of three codes like: + * FAULT_IS_MINE, + * FAULT_CAN_BE_MINE, + * FAULT_IS_NOT_MINE. + * The handlers should be called until some of them returns + * FAULT_IS_MINE value or all was called. If all handlers return + * FAULT_IS_NOT_MINE value, then the abort is fatal. + */ +static __inline void +abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) +{ + /* XXXX We can got imprecise abort as result of access + * to not-present PCI/PCIe configuration space. + */ +#if 0 + goto out; +#endif + abort_fatal(tf, FAULT_EA_IMPREC, fsr, 0, prefetch, curthread, NULL); + + /* + * Returning from this function means that we ignore + * the abort for good reason. Note that imprecise abort + * could fire any time even in user mode. + */ + +#if 0 +out: + if (usermode) + userret(curthread, tf); +#endif +} + +/* + * abort_debug() handles the following abort: + * + * FAULT_DEBUG - Debug Event + * + */ +static __inline void +abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode, + u_int far) +{ + if (usermode) { + struct thread *td; + + td = curthread; + call_trapsignal(td, SIGTRAP, TRAP_BRKPT, far); + userret(td, tf); + } else { +#ifdef KDB + kdb_trap(T_BREAKPOINT, 0, tf); +#else + printf("No debugger in kernel.\n"); +#endif + } +} + +/* + * Abort handler. + * + * FAR, FSR, and everything what can be lost after enabling + * interrupts must be grabbed before the interrupts will be + * enabled. Note that when interrupts will be enabled, we + * could even migrate to another CPU ... + * + * TODO: move quick cases to ASM + */ +void +abort_handler(struct trapframe *tf, int prefetch) +{ + struct thread *td; + vm_offset_t far, va; + int idx, usermode; + uint32_t fsr; + struct ksig ksig; + struct proc *p; + struct pcb *pcb; + struct vm_map *map; + struct vmspace *vm; + vm_prot_t ftype; + int rv; +#ifdef INVARIANTS + void *onfault; +#endif + td = curthread; + fsr = (prefetch) ? cp15_ifsr_get(): cp15_dfsr_get(); + far = (prefetch) ? TRAPF_PC(tf) : cp15_dfar_get(); + + idx = FSR_TO_FAULT(fsr); + usermode = TRAPF_USERMODE(tf); /* Abort came from user mode? */ + if (usermode) + td->td_frame = tf; + + CTR4(KTR_TRAP, "abort_handler: fsr %#x (idx %u) far %#x prefetch %u", + fsr, idx, far, prefetch); + + /* + * Firstly, handle aborts that are not directly related to mapping. + */ + if (__predict_false(idx == FAULT_EA_IMPREC)) { + abort_imprecise(tf, fsr, prefetch, usermode); + return; + } + + if (__predict_false(idx == FAULT_DEBUG)) { + abort_debug(tf, fsr, prefetch, usermode, far); + return; + } + +#ifdef ARM_NEW_PMAP + rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode); + if (rv == 0) { + return; + } else if (rv == EFAULT) { + + call_trapsignal(td, SIGSEGV, SEGV_MAPERR, far); + userret(td, tf); + return; + } +#endif + /* + * Now, when we handled imprecise and debug aborts, the rest of + * aborts should be really related to mapping. + * + */ + + PCPU_INC(cnt.v_trap); + +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + goto out; + } +#endif + if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { + /* + * Due to both processor errata and lazy TLB invalidation when + * access restrictions are removed from virtual pages, memory + * accesses that are allowed by the physical mapping layer may + * nonetheless cause one spurious page fault per virtual page. + * When the thread is executing a "no faulting" section that + * is bracketed by vm_fault_{disable,enable}_pagefaults(), + * every page fault is treated as a spurious page fault, + * unless it accesses the same virtual address as the most + * recent page fault within the same "no faulting" section. + */ + if (td->td_md.md_spurflt_addr != far || + (td->td_pflags & TDP_RESETSPUR) != 0) { + td->td_md.md_spurflt_addr = far; + td->td_pflags &= ~TDP_RESETSPUR; + + tlb_flush_local(far & ~PAGE_MASK); + return; + } + } else { + /* + * If we get a page fault while in a critical section, then + * it is most likely a fatal kernel page fault. The kernel + * is already going to panic trying to get a sleep lock to + * do the VM lookup, so just consider it a fatal trap so the + * kernel can print out a useful trap message and even get + * to the debugger. + * + * If we get a page fault while holding a non-sleepable + * lock, then it is most likely a fatal kernel page fault. + * If WITNESS is enabled, then it's going to whine about + * bogus LORs with various VM locks, so just skip to the + * fatal trap handling directly. + */ + if (td->td_critnest != 0 || + WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, + "Kernel page fault") != 0) { + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + } + + /* Re-enable interrupts if they were enabled previously. */ + if (td->td_md.md_spinlock_count == 0) { + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); + } + + p = td->td_proc; + if (usermode) { + td->td_pticks = 0; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + } + + /* Invoke the appropriate handler, if necessary. */ + if (__predict_false(aborts[idx].func != NULL)) { + if ((aborts[idx].func)(tf, idx, fsr, far, prefetch, td, &ksig)) + goto do_trapsignal; + goto out; + } + + /* + * At this point, we're dealing with one of the following aborts: + * + * FAULT_TRAN_xx - Translation + * FAULT_PERM_xx - Permission + * + * These are the main virtual memory-related faults signalled by + * the MMU. + */ + + /* fusubailout is used by [fs]uswintr to avoid page faulting */ + pcb = td->td_pcb; + if (__predict_false(pcb->pcb_onfault == fusubailout)) { + tf->tf_r0 = EFAULT; + tf->tf_pc = (register_t)pcb->pcb_onfault; + return; + } + + /* + * QQQ: ARM has a set of unprivileged load and store instructions + * (LDRT/LDRBT/STRT/STRBT ...) which are supposed to be used + * in other than user mode and OS should recognize their + * aborts and behaved appropriately. However, there is no way + * how to do that reasonably in general unless we restrict + * the handling somehow. One way is to limit the handling for + * aborts which come from undefined mode only. + * + * Anyhow, we do not use these instructions and do not implement + * any special handling for them. + */ + + va = trunc_page(far); + if (va >= KERNBASE) { + /* + * Don't allow user-mode faults in kernel address space. + */ + if (usermode) + goto nogo; + + map = kernel_map; + } else { + /* + * This is a fault on non-kernel virtual memory. If curproc + * is NULL or curproc->p_vmspace is NULL the fault is fatal. + */ + vm = (p != NULL) ? p->p_vmspace : NULL; + if (vm == NULL) + goto nogo; + + map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + pcb->pcb_onfault == NULL)) { + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + } + + ftype = (fsr & FSR_WNR) ? VM_PROT_WRITE : VM_PROT_READ; + if (prefetch) + ftype |= VM_PROT_EXECUTE; + +#ifndef ARM_NEW_PMAP + if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, + usermode)) { + goto out; + } +#endif + +#ifdef INVARIANTS + onfault = pcb->pcb_onfault; + pcb->pcb_onfault = NULL; +#endif + if (map != kernel_map) { + /* + * Keep swapout from messing with us during this + * critical time. + */ + PROC_LOCK(p); + ++p->p_lock; + PROC_UNLOCK(p); + + /* Fault in the user page: */ + rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); + + PROC_LOCK(p); + --p->p_lock; + PROC_UNLOCK(p); + } else { + /* + * Don't have to worry about process locking or stacks in the + * kernel. + */ + rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); + } + +#ifdef INVARIANTS + pcb->pcb_onfault = onfault; +#endif + + if (__predict_true(rv == KERN_SUCCESS)) + goto out; +nogo: + if (!usermode) { + if (td->td_intr_nesting_level == 0 && + pcb->pcb_onfault != NULL) { + tf->tf_r0 = rv; + tf->tf_pc = (int)pcb->pcb_onfault; + return; + } + CTR2(KTR_TRAP, "%s: vm_fault() failed with %d", __func__, rv); + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + + ksig.sig = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV; + ksig.code = 0; + ksig.addr = far; + +do_trapsignal: + call_trapsignal(td, ksig.sig, ksig.code, ksig.addr); +out: + if (usermode) + userret(td, tf); +} + +/* + * abort_fatal() handles the following data aborts: + + * FAULT_DEBUG - Debug Event + * FAULT_ACCESS_xx - Acces Bit + * FAULT_EA_PREC - Precise External Abort + * FAULT_DOMAIN_xx - Domain Fault + * FAULT_EA_TRAN_xx - External Translation Abort + * FAULT_EA_IMPREC - Imprecise External Abort + * + all undefined codes for ABORT + * + * We should never see these on a properly functioning system. + * + * This function is also called by the other handlers if they + * detect a fatal problem. + * + * Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. + */ +static int +abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + u_int usermode; + const char *mode; + const char *rw_mode; + + usermode = TRAPF_USERMODE(tf); + mode = usermode ? "user" : "kernel"; + rw_mode = fsr & FSR_WNR ? "write" : "read"; + disable_interrupts(PSR_I|PSR_F); + + if (td != NULL) { + printf("Fatal %s mode data abort: '%s' on %s\n", mode, + aborts[idx].desc, rw_mode); + printf("trapframe: %p\nFSR=%08x, FAR=", tf, fsr); + if (idx != FAULT_EA_IMPREC) + printf("%08x, ", far); + else + printf("Invalid, "); + printf("spsr=%08x\n", tf->tf_spsr); + } else { + printf("Fatal %s mode prefetch abort at 0x%08x\n", + mode, tf->tf_pc); + printf("trapframe: %p, spsr=%08x\n", tf, tf->tf_spsr); + } + + printf("r0 =%08x, r1 =%08x, r2 =%08x, r3 =%08x\n", + tf->tf_r0, tf->tf_r1, tf->tf_r2, tf->tf_r3); + printf("r4 =%08x, r5 =%08x, r6 =%08x, r7 =%08x\n", + tf->tf_r4, tf->tf_r5, tf->tf_r6, tf->tf_r7); + printf("r8 =%08x, r9 =%08x, r10=%08x, r11=%08x\n", + tf->tf_r8, tf->tf_r9, tf->tf_r10, tf->tf_r11); + printf("r12=%08x, ", tf->tf_r12); + + if (usermode) + printf("usp=%08x, ulr=%08x", + tf->tf_usr_sp, tf->tf_usr_lr); + else + printf("ssp=%08x, slr=%08x", + tf->tf_svc_sp, tf->tf_svc_lr); + printf(", pc =%08x\n\n", tf->tf_pc); + +#ifdef KDB + if (debugger_on_panic || kdb_active) + kdb_trap(fsr, 0, tf); +#endif + panic("Fatal abort"); + /*NOTREACHED*/ +} + +/* + * abort_align() handles the following data abort: + * + * FAULT_ALIGN - Alignment fault + * + * Every memory access should be correctly aligned in kernel including + * user to kernel and vice versa data copying, so we ignore pcb_onfault, + * and it's always fatal. We generate a signal in case of abort from user mode. + */ +static int +abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + u_int usermode; + + usermode = TRAPF_USERMODE(tf); + + /* + * Alignment faults are always fatal if they occur in any but user mode. + * + * XXX The old trap code handles pcb fault even for alignment traps. + * Unfortunately, we don't known why and if is this need. + */ + if (!usermode) { + if (td->td_intr_nesting_level == 0 && td != NULL && + td->td_pcb->pcb_onfault != NULL) { + printf("%s: Got alignment fault with pcb_onfault set" + ", please report this issue\n", __func__); + tf->tf_r0 = EFAULT;; + tf->tf_pc = (int)td->td_pcb->pcb_onfault; + return (0); + } + abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); + } + /* Deliver a bus error signal to the process */ + ksig->code = 0; + ksig->sig = SIGBUS; + ksig->addr = far; + return (1); +} + +/* + * abort_icache() handles the following data abort: + * + * FAULT_ICACHE - Instruction cache maintenance + * + * According to manual, FAULT_ICACHE is translation fault during cache + * maintenance operation. In fact, no cache maintenance operation on + * not mapped virtual addresses should be called. As cache maintenance + * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * the abort is concider as fatal for now. However, all the matter with + * cache maintenance operation on virtual addresses could be really complex + * and fuzzy in SMP case, so maybe in future standard fault mechanism + * should be held here including vm_fault() calling. + */ +static int +abort_icache(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); + return(0); +} Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/arm/trap.c Fri Feb 13 02:02:12 2015 (r278656) @@ -79,28 +79,15 @@ */ -#include "opt_ktrace.h" - #include __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include -#include -#include #include -#include -#ifdef KTRACE -#include -#include -#endif -#include -#include #include #include @@ -108,28 +95,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include #include -#include +#include +#include #include -#include -#include - -#include +#include #ifdef KDB #include #endif - -void swi_handler(struct trapframe *); - -#include -#include - extern char fusubailout[]; #ifdef DEBUG @@ -773,106 +748,4 @@ badaddr_read(void *addr, size_t size, vo /* Return EFAULT if the address was invalid, else zero */ return (rv); -} - -int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) -{ - struct proc *p; - register_t *ap; - int error; - -#ifdef __ARM_EABI__ - sa->code = td->td_frame->tf_r7; -#else - sa->code = sa->insn & 0x000fffff; -#endif - ap = &td->td_frame->tf_r0; - if (sa->code == SYS_syscall) { - sa->code = *ap++; - sa->nap--; - } else if (sa->code == SYS___syscall) { - sa->code = ap[_QUAD_LOWWORD]; - sa->nap -= 2; - ap += 2; - } - p = td->td_proc; - if (p->p_sysent->sv_mask) - sa->code &= p->p_sysent->sv_mask; - if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; - else - sa->callp = &p->p_sysent->sv_table[sa->code]; - sa->narg = sa->callp->sy_narg; - error = 0; - memcpy(sa->args, ap, sa->nap * sizeof(register_t)); - if (sa->narg > sa->nap) { - error = copyin((void *)td->td_frame->tf_usr_sp, sa->args + - sa->nap, (sa->narg - sa->nap) * sizeof(register_t)); - } - if (error == 0) { - td->td_retval[0] = 0; - td->td_retval[1] = 0; - } - return (error); -} - -#include "../../kern/subr_syscall.c" - -static void -syscall(struct thread *td, struct trapframe *frame) -{ - struct syscall_args sa; - int error; - -#ifndef __ARM_EABI__ - sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); - switch (sa.insn & SWI_OS_MASK) { - case 0: /* XXX: we need our own one. */ - break; - default: - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } -#endif - sa.nap = 4; - - error = syscallenter(td, &sa); - KASSERT(error != 0 || td->td_ar == NULL, - ("returning from syscall with td_ar set!")); - syscallret(td, error, &sa); -} - -void -swi_handler(struct trapframe *frame) -{ - struct thread *td = curthread; - - td->td_frame = frame; - - td->td_pticks = 0; - /* - * Make sure the program counter is correctly aligned so we - * don't take an alignment fault trying to read the opcode. - */ - if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) { - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } - /* - * Enable interrupts if they were enabled before the exception. - * Since all syscalls *should* come from user mode it will always - * be safe to enable them, but check anyway. - */ - if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & PSR_I) == 0) - enable_interrupts(PSR_I); - if (__predict_true(frame->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); - } - - syscall(td, frame); -} - +} \ No newline at end of file Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/include/armreg.h Fri Feb 13 02:02:12 2015 (r278656) @@ -41,6 +41,8 @@ #ifndef MACHINE_ARMREG_H #define MACHINE_ARMREG_H +#include + #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ @@ -350,10 +352,10 @@ #define CACHE_UNI_CACHE 4 /* Fault status register definitions */ - -#define FAULT_TYPE_MASK 0x0f #define FAULT_USER 0x10 +#if __ARM_ARCH < 6 +#define FAULT_TYPE_MASK 0x0f #define FAULT_WRTBUF_0 0x00 /* Vector Exception */ #define FAULT_WRTBUF_1 0x02 /* Terminal Exception */ #define FAULT_BUSERR_0 0x04 /* External Abort on Linefetch -- Section */ @@ -376,14 +378,36 @@ #define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ #define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ -/* Fault status register definitions - v6+ */ -#define FSR_STATUS_TO_IDX(fsr) (((fsr) & 0xF) | \ - (((fsr) & (1 << 10)>> (10 - 4)))) -#define FSR_LPAE (1 << 9) /* LPAE indicator */ -#define FSR_WNR (1 << 11) /* Write-not-Read access */ -#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ -#define FSR_CM (1 << 13) /* Cache maintenance fault */ +#else /* __ARM_ARCH < 6 */ +#define FAULT_ALIGN 0x001 /* Alignment Fault */ +#define FAULT_DEBUG 0x002 /* Debug Event */ +#define FAULT_ACCESS_L1 0x003 /* Access Bit (L1) */ +#define FAULT_ICACHE 0x004 /* Instruction cache maintenance */ +#define FAULT_TRAN_L1 0x005 /* Translation Fault (L1) */ +#define FAULT_ACCESS_L2 0x006 /* Access Bit (L2) */ +#define FAULT_TRAN_L2 0x007 /* Translation Fault (L2) */ +#define FAULT_EA_PREC 0x008 /* External Abort */ +#define FAULT_DOMAIN_L1 0x009 /* Domain Fault (L1) */ +#define FAULT_DOMAIN_L2 0x00B /* Domain Fault (L2) */ +#define FAULT_EA_TRAN_L1 0x00C /* External Translation Abort (L1) */ +#define FAULT_PERM_L1 0x00D /* Permission Fault (L1) */ +#define FAULT_EA_TRAN_L2 0x00E /* External Translation Abort (L2) */ +#define FAULT_PERM_L2 0x00F /* Permission Fault (L2) */ +#define FAULT_TLB_CONFLICT 0x010 /* Permission Fault (L2) */ +#define FAULT_EA_IMPREC 0x016 /* Asynchronous External Abort */ +#define FAULT_PE_IMPREC 0x018 /* Asynchronous Parity Error */ +#define FAULT_PARITY 0x019 /* Parity Error */ +#define FAULT_PE_TRAN_L1 0x01C /* Parity Error on Translation (L1) */ +#define FAULT_PE_TRAN_L2 0x01E /* Parity Error on Translation (L2) */ + +#define FSR_TO_FAULT(fsr) (((fsr) & 0xF) | \ + ((((fsr) & (1 << 10)) >> (10 - 4)))) +#define FSR_LPAE (1 << 9) /* LPAE indicator */ +#define FSR_WNR (1 << 11) /* Write-not-Read access */ +#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ +#define FSR_CM (1 << 13) /* Cache maintenance fault */ +#endif /* !__ARM_ARCH < 6 */ /* * Address of the vector page, low and high versions. Modified: stable/10/sys/arm/include/proc.h ============================================================================== --- stable/10/sys/arm/include/proc.h Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/include/proc.h Fri Feb 13 02:02:12 2015 (r278656) @@ -48,6 +48,7 @@ struct md_utrap { struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_cspr; /* (k) */ + register_t md_spurflt_addr; /* (k) Spurious page fault address. */ int md_ptrace_instr; int md_ptrace_addr; register_t md_tp; Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/conf/files.arm Fri Feb 13 02:02:12 2015 (r278656) @@ -49,7 +49,9 @@ arm/arm/stdatomic.c standard \ arm/arm/support.S standard arm/arm/swtch.S standard arm/arm/sys_machdep.c standard -arm/arm/trap.c standard +arm/arm/syscall.c standard +arm/arm/trap.c optional !armv6 +arm/arm/trap-v6.c optional armv6 arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/vm_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 02:10:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EC48181; Fri, 13 Feb 2015 02:10:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1DEF95; Fri, 13 Feb 2015 02:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D2AAYT050872; Fri, 13 Feb 2015 02:10:10 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D2AAIG050871; Fri, 13 Feb 2015 02:10:10 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201502130210.t1D2AAIG050871@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 13 Feb 2015 02:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278657 - head/sys/contrib/vchiq/interface/compat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 02:10:10 -0000 Author: gonzo Date: Fri Feb 13 02:10:09 2015 New Revision: 278657 URL: https://svnweb.freebsd.org/changeset/base/278657 Log: Fix build without INVARIANTS/INVARIANT_SUPPORT: - Replace "emulation" of return in lmutex_lock_interruptible macros by proper static/inline function. Submitted by: Guy Yur Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.h ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Fri Feb 13 02:02:12 2015 (r278656) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Fri Feb 13 02:10:09 2015 (r278657) @@ -151,10 +151,16 @@ struct mutex { #define lmutex_init(lock) mtx_init(&(lock)->mtx, #lock, NULL, MTX_DEF) #define lmutex_lock(lock) mtx_lock(&(lock)->mtx) -#define lmutex_lock_interruptible(lock) (mtx_lock(&(lock)->mtx),0) #define lmutex_unlock(lock) mtx_unlock(&(lock)->mtx) #define lmutex_destroy(lock) mtx_destroy(&(lock)->mtx) +static __inline int +lmutex_lock_interruptible(struct mutex *lock) +{ + mtx_lock(&(lock)->mtx); + return 0; +} + /* * Rwlock API */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 02:24:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6338B8E0; Fri, 13 Feb 2015 02:24:57 +0000 (UTC) Received: from mx0.deglitch.com (unknown [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 10F8F19E; Fri, 13 Feb 2015 02:24:57 +0000 (UTC) Received: from dhcp-250-37.sj.pi-coral.com (unknown [12.218.212.178]) by mx0.deglitch.com (Postfix) with ESMTPSA id 1AAD08FC27; Fri, 13 Feb 2015 06:24:42 +0400 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... From: Stanislav Sedov In-Reply-To: Date: Thu, 12 Feb 2015 18:24:39 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <583B4182-BDCA-48C6-BEFA-6D0C09268CB1@freebsd.org> References: <201502120535.t1C5Z0el061979@svn.freebsd.org> To: Devin Teske X-Mailer: Apple Mail (2.2070.6) Cc: "svn-src-head@freebsd.org" , Devin Teske , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Colin Percival X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 02:24:57 -0000 > On Feb 11, 2015, at 10:17 PM, Devin Teske wrote: >=20 > PLEASE! Do NOT remove the grand digital clock (grdc). >=20 > So many of us over the years have used it as a terminal keeper-aliver = :) (and as a clock, to boot). >=20 > I will be very sad if you remove grdc. >=20 +1 I=E2=80=99d also vote for keeping rot13 and caesar as it is routinely = useful. They are quite small and does not require a lot of maintaining work to keep around. Just my 0.02. -- ST4096-RIPE From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 03:18:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65D9D227; Fri, 13 Feb 2015 03:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 521DA970; Fri, 13 Feb 2015 03:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D3IUYX083843; Fri, 13 Feb 2015 03:18:30 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D3IUDc083842; Fri, 13 Feb 2015 03:18:30 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502130318.t1D3IUDc083842@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Fri, 13 Feb 2015 03:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278658 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 03:18:30 -0000 Author: rpaulo Date: Fri Feb 13 03:18:29 2015 New Revision: 278658 URL: https://svnweb.freebsd.org/changeset/base/278658 Log: Teach libproc how to find debugging symbols in /usr/lib/debug. MFC after: 1 week Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Fri Feb 13 02:10:09 2015 (r278657) +++ head/lib/libproc/proc_sym.c Fri Feb 13 03:18:29 2015 (r278658) @@ -82,6 +82,21 @@ fail: strlcpy(buf, symbol, len); } +static int +find_dbg_obj(const char *path) +{ + int fd; + char dbg_path[PATH_MAX]; + + snprintf(dbg_path, sizeof(dbg_path), + "/usr/lib/debug/%s.debug", path); + fd = open(dbg_path, O_RDONLY); + if (fd > 0) + return (fd); + else + return (open(path, O_RDONLY)); +} + static void proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map) { @@ -295,7 +310,7 @@ proc_addr2sym(struct proc_handle *p, uin if ((map = proc_addr2map(p, addr)) == NULL) return (-1); - if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + if ((fd = find_dbg_obj(map->pr_mapname)) < 0) { DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } @@ -443,7 +458,7 @@ proc_name2sym(struct proc_handle *p, con DPRINTFX("ERROR: couldn't find object %s", object); goto err0; } - if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + if ((fd = find_dbg_obj(map->pr_mapname)) < 0) { DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } @@ -539,7 +554,7 @@ proc_iter_symbyaddr(struct proc_handle * if ((map = proc_name2map(p, object)) == NULL) return (-1); - if ((fd = open(map->pr_mapname, O_RDONLY)) < 0) { + if ((fd = find_dbg_obj(map->pr_mapname)) < 0) { DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 04:50:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E10F17C; Fri, 13 Feb 2015 04:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49B791C3; Fri, 13 Feb 2015 04:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D4oebB027442; Fri, 13 Feb 2015 04:50:40 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D4oel8027441; Fri, 13 Feb 2015 04:50:40 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502130450.t1D4oel8027441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Fri, 13 Feb 2015 04:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278659 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 04:50:40 -0000 Author: rpaulo Date: Fri Feb 13 04:50:39 2015 New Revision: 278659 URL: https://svnweb.freebsd.org/changeset/base/278659 Log: MFC r278302: Don't add static IPv6 routes when to all FIBs when net.add_addr_allfibs is 0. Modified: stable/10/etc/rc.d/routing Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/routing ============================================================================== --- stable/10/etc/rc.d/routing Fri Feb 13 03:18:29 2015 (r278658) +++ stable/10/etc/rc.d/routing Fri Feb 13 04:50:39 2015 (r278659) @@ -170,13 +170,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= From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 04:56:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06E592E6; Fri, 13 Feb 2015 04:56:50 +0000 (UTC) Received: from pmta2.delivery3.ore.mailhop.org (pmta2.delivery3.ore.mailhop.org [54.213.22.21]) by mx1.freebsd.org (Postfix) with ESMTP id DA4F81FE; Fri, 13 Feb 2015 04:56:49 +0000 (UTC) Received: from smtp6.ore.mailhop.org (172.31.18.134) by pmta2.delivery1.ore.mailhop.org id hrm21g20u50m; Fri, 13 Feb 2015 04:56:54 +0000 (envelope-from ) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YM8J6-0005GN-SS; Fri, 13 Feb 2015 04:56:49 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1D4ulbS002363; Thu, 12 Feb 2015 21:56:47 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19wpa79PxqAaOIptyxuy1GC Message-ID: <1423803407.80968.126.camel@freebsd.org> Subject: Re: svn commit: r278642 - in head/usr.bin: chpass passwd From: Ian Lepore To: Baptiste Daroussin Date: Thu, 12 Feb 2015 21:56:47 -0700 In-Reply-To: <201502122308.t1CN8Sg0062438@svn.freebsd.org> References: <201502122308.t1CN8Sg0062438@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 04:56:50 -0000 On Thu, 2015-02-12 at 23:08 +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Thu Feb 12 23:08:27 2015 > New Revision: 278642 > URL: https://svnweb.freebsd.org/changeset/base/278642 > > Log: > Use PRECIOUSPROG instead of custom code to handle schg > > This allows to preserve schg when installed with -DNO_ROOT > > MFC after: 1 week > > Modified: > head/usr.bin/chpass/Makefile > head/usr.bin/passwd/Makefile > > Modified: head/usr.bin/chpass/Makefile > ============================================================================== > --- head/usr.bin/chpass/Makefile Thu Feb 12 23:00:31 2015 (r278641) > +++ head/usr.bin/chpass/Makefile Thu Feb 12 23:08:27 2015 (r278642) > @@ -9,6 +9,7 @@ PROG= chpass > SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c > BINOWN= root > BINMODE=4555 > +PRECIOUSPROG= > .if ${MK_NIS} != "no" > CFLAGS+= -DYP > .endif > @@ -34,16 +35,4 @@ MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 > MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1 > .endif > > -beforeinstall: > -.for i in chpass chfn chsh ypchpass ypchfn ypchsh > -.if exists(${DESTDIR}${BINDIR}/$i) > - -chflags noschg ${DESTDIR}${BINDIR}/$i > -.endif > -.endfor > - It looks like the removal of this beforeinstall target is causing failure to re-install over an existing copy of the program. -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:19:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F23D4C25; Fri, 13 Feb 2015 07:19:08 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id B220532B; Fri, 13 Feb 2015 07:19:08 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id CAA87D63AE1; Fri, 13 Feb 2015 18:18:55 +1100 (AEDT) Date: Fri, 13 Feb 2015 18:18:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Bjoern A. Zeeb" Subject: Re: svn commit: r278634 - head/lib/libc/gen In-Reply-To: <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> Message-ID: <20150213172738.C1007@besplex.bde.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=baJSDo/B c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=2IwoPmx0YhHHISiYWswA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Pedro Giffuni , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:19:09 -0000 On Thu, 12 Feb 2015, Bjoern A. Zeeb wrote: >> On 12 Feb 2015, at 22:34 , Pedro Giffuni wrote: >> >> >> On 02/12/15 17:27, Bjoern A. Zeeb wrote: >>>> On 12 Feb 2015, at 21:07 , Pedro F. Giffuni wrote: >>>> ... >>>> Log: >>>> ulimit(3): Fix broken check. >>>> ... >>> Did this compile? >> >> Yes! Any log message to share? > > Now I do again; had lost them due to buildworld starting over again: > > ===> lib/libc_nonshared (obj,depend,all,install) > cc1: warnings being treated as errors > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c: In function 'ulimit': > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:56: warning: comparison is always false due to limited range of data type > /scratch/tmp/bz/head.svn/lib/libc/gen/ulimit.c:57: warning: overflow in implicit constant conversion > --- ulimit.So --- > *** [ulimit.So] Error code 1 Grump. The first warning inhibits doing clean range checking. Considered the following simplified case: long arg; /* * We want to know if arg is representable as an rlim_t. This is * remarkably difficult. The following doesn't work due to * compiler zeal and other bugs: */ if (arg > RLIM_INFINITY) err(...); The check is false on all arches since RLIM_INFINITY happens to be >= LONG_MAX, and excessively zealous compilers warn. This omits complications for negative args (see below). There are also system bugs for negative args. POSIX specifies that rlim_t shall be an unsigned type, but in FreeBSD it is still a signed type like it always was. FreeBSD is also missing POSIX's magic values RLIM_SAVED_{MAX,CUR} for handling unrepresentable values. After fixing the type, these could be used for the historical mishandling of historical negative values and might even allow binary compatibility for those values. The second warning is about a bug. A last-minute change made the error handling the same for all negative values (representable or not) as for unrepresentable positive values. But that doesn't work, since it give an overflow in live code as well as in dead code. We also depend on the compiler understanding the range checking and not warning for overflows in dead code. The unsimplified code for this is: if (arg > RLIM_INFINITY / 512) arg = RLIM_INFINITY / 512; or equivalently: arg = MIN(arg, RLIM_INFINITY / 512); The check is vacuously false on 64-bit arches only. The assignment overflows on 32-bit arches only. So zealous compilers have something to warn about in both lines. We want a warning for only the second line iff it is live and overflows. This requires the compiler to understand when the first line is vacuously false so that the second line is dead, but not warn about the first line. Other common forms of the range check shouldn't work any better: if ((rlim_t)arg > RLIM_INFINITY) If rlim_t were unsigned as specified by POSIX, then this cast would probably just be a bug. Otherwise, it should have no effect in the vacuously false case. We depend on it having no effect so that the compiler knows when the following code is dead. rlim_t tmp; tmp = arg; if (tmp != arg) err(1, "arg not representable by rlim_t"); The compiler should still be able to see when the comparison is vacuously false. This form of the comparison is also more difficult to write when the limit is not simply the maximum for the type. Here we want to multiply by 512, but there may be no type that can hold the result. This shows that the MIN() macro is hard to used with mixed types and zealous compilers. Using doesn't avoid many of the problems in the imin() family. With this family, you have to translate all typedefed types to basic types and promote to a larger common type, if any. This tends to hide the original values, so the zealous compilers are not smart enough to warn. However, smart ones should see inside: arg = llmin(arg, RLIM_INFINITY / 512); and warn for it too. Add complications for portability to BSD and POSIX for the full mess. Translation of typedefed types for the imin() family becomes impossible because there is no suitable larger common type in some cases; using MIN() gives unwanted (un)sign extension in these cases. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:46:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6D38579; Fri, 13 Feb 2015 07:46:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9133F814; Fri, 13 Feb 2015 07:46:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7k3ub008759; Fri, 13 Feb 2015 07:46:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7k3X0008758; Fri, 13 Feb 2015 07:46:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130746.t1D7k3X0008758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278660 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:46:03 -0000 Author: hselasky Date: Fri Feb 13 07:46:02 2015 New Revision: 278660 URL: https://svnweb.freebsd.org/changeset/base/278660 Log: MFC r278477: Fix DMA address casts. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Fri Feb 13 04:50:39 2015 (r278659) +++ stable/8/sys/dev/usb/controller/xhci.c Fri Feb 13 07:46:02 2015 (r278660) @@ -508,7 +508,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1088,7 +1088,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:47:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6305A79D for ; Fri, 13 Feb 2015 07:47:08 +0000 (UTC) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09BB582F for ; Fri, 13 Feb 2015 07:47:07 +0000 (UTC) Received: by labms9 with SMTP id ms9so8821630lab.10 for ; Thu, 12 Feb 2015 23:47:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=KtQZ5dY+TGbi79Pf1BisU3fXQw+kypXWRQt36r+BzDQ=; b=clpxjv3ulNo2JNQt3AePO02JhREINgQTwo6a1u3vB5OCcKFMJIIxCzOlF+oCx1WAev SuohCpWaKsh5hIzm+kcDf9MfW2IB9o2lsYos3VJVOu8Wsmb+RaGGuAbMMXXGIVsDMQks AsJqojmnhV9p1I7Gx90F+GCQYqoIz/0nFa3KWVi5CsB3DXonVzyfWw37v4WVW5/f9KoU 5uhcaOTXg/W5mEmoZG1M9L6BBT0XFCgv8V2Fik4UJrcjr7V97XVOSQAQrhk4MeYan3nT Ojw8klMH71E6/zROs3iJ4uhVFeWeBhRiA6oYe6U4WeDD1lTCUbrEuEx7w/a4VJcfLvOu euMA== X-Gm-Message-State: ALoCoQlsLZkWvL9SyN1Dp/9/QZmOuIyWjb4KrH+wfMyGAstUTgWS0W2+fQNUaWd49xhRpmJkyZKo X-Received: by 10.112.162.167 with SMTP id yb7mr6617731lbb.76.1423813620208; Thu, 12 Feb 2015 23:47:00 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id i10sm1218905lah.25.2015.02.12.23.46.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 23:46:59 -0800 (PST) Message-ID: <54DDABF2.9000201@freebsd.org> Date: Fri, 13 Feb 2015 10:46:58 +0300 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans , "Bjoern A. Zeeb" Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> In-Reply-To: <20150213172738.C1007@besplex.bde.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Pedro Giffuni , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:47:08 -0000 On 13.02.2015 10:18, Bruce Evans wrote: > if (arg > RLIM_INFINITY) > err(...); Checking for RLIM_INFINITY is wrong here, since it is ulong long max, considering arg = va_arg(ap, long); and ulimit(3) stating that arg is always plain long. Proper check will be if (arg < 0) { errno = EINVAL; return (-1); } if (arg > LONG_MAX / 512) arg = LONG_MAX / 512; That all. In pure theoretical case RLIM_INFINITY is less than LONG_MAX, it is job of underlying setrlimit(2) to return error. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:47:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A38F82B; Fri, 13 Feb 2015 07:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B6E835; Fri, 13 Feb 2015 07:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7lIBa009107; Fri, 13 Feb 2015 07:47:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7lI0r009106; Fri, 13 Feb 2015 07:47:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130747.t1D7lI0r009106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278661 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:47:18 -0000 Author: hselasky Date: Fri Feb 13 07:47:17 2015 New Revision: 278661 URL: https://svnweb.freebsd.org/changeset/base/278661 Log: MFC r278477: Fix DMA address casts. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Fri Feb 13 07:46:02 2015 (r278660) +++ stable/9/sys/dev/usb/controller/xhci.c Fri Feb 13 07:47:17 2015 (r278661) @@ -485,7 +485,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1098,7 +1098,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:48:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48D6F97A; Fri, 13 Feb 2015 07:48:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3340C84A; Fri, 13 Feb 2015 07:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7mtK4009377; Fri, 13 Feb 2015 07:48:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7mtDN009376; Fri, 13 Feb 2015 07:48:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130748.t1D7mtDN009376@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278662 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:48:55 -0000 Author: hselasky Date: Fri Feb 13 07:48:54 2015 New Revision: 278662 URL: https://svnweb.freebsd.org/changeset/base/278662 Log: MFC r278477: Fix DMA address casts. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Fri Feb 13 07:47:17 2015 (r278661) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Feb 13 07:48:54 2015 (r278662) @@ -496,7 +496,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1118,7 +1118,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:51:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C627B79; Fri, 13 Feb 2015 07:51:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D51286D; Fri, 13 Feb 2015 07:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7pGfe012738; Fri, 13 Feb 2015 07:51:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7pG0i012737; Fri, 13 Feb 2015 07:51:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130751.t1D7pG0i012737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278663 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:51:16 -0000 Author: hselasky Date: Fri Feb 13 07:51:15 2015 New Revision: 278663 URL: https://svnweb.freebsd.org/changeset/base/278663 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:48:54 2015 (r278662) +++ stable/10/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:51:15 2015 (r278663) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:51:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CDFBCA4; Fri, 13 Feb 2015 07:51:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88545872; Fri, 13 Feb 2015 07:51:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7pRAK012803; Fri, 13 Feb 2015 07:51:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7pRI7012802; Fri, 13 Feb 2015 07:51:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502130751.t1D7pRI7012802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 13 Feb 2015 07:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278664 - head/usr.bin/chpass X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:51:27 -0000 Author: bapt Date: Fri Feb 13 07:51:26 2015 New Revision: 278664 URL: https://svnweb.freebsd.org/changeset/base/278664 Log: Partially revert 278642 On reinstall (overwrite) install(1) does not handle chflags Reported by: ian Modified: head/usr.bin/chpass/Makefile Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Fri Feb 13 07:51:15 2015 (r278663) +++ head/usr.bin/chpass/Makefile Fri Feb 13 07:51:26 2015 (r278664) @@ -9,7 +9,6 @@ PROG= chpass SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c BINOWN= root BINMODE=4555 -PRECIOUSPROG= .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif @@ -35,4 +34,16 @@ MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1 .endif +beforeinstall: +.for i in chpass chfn chsh ypchpass ypchfn ypchsh +.if exists(${DESTDIR}${BINDIR}/$i) + -chflags noschg ${DESTDIR}${BINDIR}/$i +.endif +.endfor + +.if !defined(NO_FSCHG) +afterinstall: + -chflags schg ${DESTDIR}${BINDIR}/chpass +.endif + .include From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:52:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1707EDF0; Fri, 13 Feb 2015 07:52:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC2FE913; Fri, 13 Feb 2015 07:52:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7qC0a013429; Fri, 13 Feb 2015 07:52:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7qCfm013428; Fri, 13 Feb 2015 07:52:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130752.t1D7qCfm013428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278665 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:52:13 -0000 Author: hselasky Date: Fri Feb 13 07:52:12 2015 New Revision: 278665 URL: https://svnweb.freebsd.org/changeset/base/278665 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:51:26 2015 (r278664) +++ stable/9/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:52:12 2015 (r278665) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 07:53:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB03F31; Fri, 13 Feb 2015 07:53:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB48691E; Fri, 13 Feb 2015 07:53:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7rJD8013631; Fri, 13 Feb 2015 07:53:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7rJQ2013630; Fri, 13 Feb 2015 07:53:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130753.t1D7rJQ2013630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278666 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:53:20 -0000 Author: hselasky Date: Fri Feb 13 07:53:18 2015 New Revision: 278666 URL: https://svnweb.freebsd.org/changeset/base/278666 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:52:12 2015 (r278665) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:53:18 2015 (r278666) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 08:00:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34163415 for ; Fri, 13 Feb 2015 08:00:00 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3E3395E for ; Fri, 13 Feb 2015 07:59:59 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id u14so14017036lbd.1 for ; Thu, 12 Feb 2015 23:59:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=JUvn3V0OKwYFRANUVsZEQitc9lo9XzGNLYL+ElyRAnI=; b=jB2EDdfK+JfqfNuC5oCLagKifdFypSDprBS98bStHyyQeL9VPocLic8BCDZmiKcWtA sAuQEruiq2L+1dRA0mn6C4vXjxQAKSZ9ygjmnuw93C7AedNKrCjQnuVYu309BW6/YQYy FfI3obYT9Rxl8Mt1bF/Lq3+BpYXKTjYZZHJrqxj0B0n+zZMT9eIx6FixYY5oIri2VDAt beNTe8SB114DA56mpsZsdmVG0nKnsq6JXEhJFfDZEiPGDuMlhh1ZzqOccdX/rE7Rt0RW 234UX9gJxtKaU771fpfNa/mE1lwk9p8DnbMidQZuvRZnAQiY9v/aUp0R5wtElLrAOvpp 41bQ== X-Gm-Message-State: ALoCoQkv+Y13MxR43rmIeTmXp++jUZSLyQ3UYjWDNcfVwogtYx6nKTBBwLoJJxmsetUi9d978dAQ X-Received: by 10.152.8.33 with SMTP id o1mr6860983laa.56.1423814392210; Thu, 12 Feb 2015 23:59:52 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id lf1sm1175004lab.8.2015.02.12.23.59.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 23:59:51 -0800 (PST) Message-ID: <54DDAEF6.3060900@freebsd.org> Date: Fri, 13 Feb 2015 10:59:50 +0300 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans , "Bjoern A. Zeeb" Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> In-Reply-To: <54DDABF2.9000201@freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Pedro Giffuni , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 08:00:00 -0000 We even don't need to check arg excepting for < 0, because what is needed is rlimt_t and not arg. So this version will be better: rlimt_t targ; if (arg < 0) { errno = EINVAL; return (-1); } targ = arg; if (targ > RLIM_INFINITY / 512) targ = RLIM_INFINITY / 512; limit.rlim_max = limit.rlim_cur = targ * 512 On 13.02.2015 10:46, Andrey Chernov wrote: > On 13.02.2015 10:18, Bruce Evans wrote: >> if (arg > RLIM_INFINITY) >> err(...); > > Checking for RLIM_INFINITY is wrong here, since it is ulong long max, > considering > arg = va_arg(ap, long); > and ulimit(3) stating that arg is always plain long. > > Proper check will be > > if (arg < 0) { > errno = EINVAL; > return (-1); > } > if (arg > LONG_MAX / 512) > arg = LONG_MAX / 512; > > That all. In pure theoretical case RLIM_INFINITY is less than LONG_MAX, > it is job of underlying setrlimit(2) to return error. > -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 08:40:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F1E3921; Fri, 13 Feb 2015 08:40:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89D4EDCA; Fri, 13 Feb 2015 08:40:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D8eBfx033312; Fri, 13 Feb 2015 08:40:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D8eBuk033308; Fri, 13 Feb 2015 08:40:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502130840.t1D8eBuk033308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 13 Feb 2015 08:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278667 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 08:40:11 -0000 Author: kib Date: Fri Feb 13 08:40:10 2015 New Revision: 278667 URL: https://svnweb.freebsd.org/changeset/base/278667 Log: MFC r277922: When mounting SU-enabled mount point, wait until the softdep_flush() thread started and incremented the stat_flush_threads. MFC r278257: Partially revert r277922. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/softdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Feb 13 07:53:18 2015 (r278666) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Feb 13 08:40:10 2015 (r278667) @@ -1377,6 +1377,10 @@ softdep_flush(addr) mp = (struct mount *)addr; ump = VFSTOUFS(mp); atomic_add_int(&stat_flush_threads, 1); + ACQUIRE_LOCK(ump); + ump->softdep_flags &= ~FLUSH_STARTING; + wakeup(&ump->softdep_flushtd); + FREE_LOCK(ump); if (print_threads) { if (stat_flush_threads == 1) printf("Running %s at pid %d\n", bufdaemonproc->p_comm, @@ -1389,7 +1393,7 @@ softdep_flush(addr) VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) kthread_suspend_check(); ACQUIRE_LOCK(ump); - if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdflush", hz / 2); ump->softdep_flags &= ~FLUSH_CLEANUP; @@ -1419,11 +1423,9 @@ worklist_speedup(mp) ump = VFSTOUFS(mp); LOCK_OWNED(ump); - if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) ump->softdep_flags |= FLUSH_CLEANUP; - if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) - wakeup(&ump->softdep_flushtd); - } + wakeup(&ump->softdep_flushtd); } static int @@ -1468,14 +1470,10 @@ softdep_speedup(ump) TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); FREE_GBLLOCK(&lk); if ((altump->softdep_flags & - (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) altump->softdep_flags |= FLUSH_CLEANUP; - altump->um_softdep->sd_cleanups++; - if (altump->softdep_flushtd->td_wchan == - &altump->softdep_flushtd) { - wakeup(&altump->softdep_flushtd); - } - } + altump->um_softdep->sd_cleanups++; + wakeup(&altump->softdep_flushtd); FREE_LOCK(altump); } } @@ -2491,9 +2489,18 @@ softdep_mount(devvp, mp, fs, cred) /* * Start our flushing thread in the bufdaemon process. */ + ACQUIRE_LOCK(ump); + ump->softdep_flags |= FLUSH_STARTING; + FREE_LOCK(ump); kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", mp->mnt_stat.f_mntonname); + ACQUIRE_LOCK(ump); + while ((ump->softdep_flags & FLUSH_STARTING) != 0) { + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", + hz / 2); + } + FREE_LOCK(ump); /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation Modified: stable/10/sys/ufs/ffs/softdep.h ============================================================================== --- stable/10/sys/ufs/ffs/softdep.h Fri Feb 13 07:53:18 2015 (r278666) +++ stable/10/sys/ufs/ffs/softdep.h Fri Feb 13 08:40:10 2015 (r278667) @@ -1063,6 +1063,8 @@ struct mount_softdeps { */ #define FLUSH_EXIT 0x0001 /* time to exit */ #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ +#define FLUSH_STARTING 0x0004 /* flush thread not yet started */ + /* * Keep the old names from when these were in the ufsmount structure. */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 08:42:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5438A88; Fri, 13 Feb 2015 08:42:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C000CDEE; Fri, 13 Feb 2015 08:42:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D8g22X036992; Fri, 13 Feb 2015 08:42:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D8g2ph036991; Fri, 13 Feb 2015 08:42:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502130842.t1D8g2ph036991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 13 Feb 2015 08:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278668 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 08:42:03 -0000 Author: kib Date: Fri Feb 13 08:42:01 2015 New Revision: 278668 URL: https://svnweb.freebsd.org/changeset/base/278668 Log: MFC r278313: Fully initialize allocated memory for the new barrier. Modified: stable/10/lib/libthr/thread/thr_barrier.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_barrier.c ============================================================================== --- stable/10/lib/libthr/thread/thr_barrier.c Fri Feb 13 08:40:10 2015 (r278667) +++ stable/10/lib/libthr/thread/thr_barrier.c Fri Feb 13 08:42:01 2015 (r278668) @@ -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); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 09:02:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3FE0F95; Fri, 13 Feb 2015 09:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F623FA3; Fri, 13 Feb 2015 09:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D92GKS046623; Fri, 13 Feb 2015 09:02:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D92Gin046622; Fri, 13 Feb 2015 09:02:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502130902.t1D92Gin046622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 13 Feb 2015 09:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278669 - head/usr.bin/passwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 09:02:16 -0000 Author: bapt Date: Fri Feb 13 09:02:15 2015 New Revision: 278669 URL: https://svnweb.freebsd.org/changeset/base/278669 Log: Revert r278642 install(1) does not handle chflags on hardlinks Modified: head/usr.bin/passwd/Makefile Modified: head/usr.bin/passwd/Makefile ============================================================================== --- head/usr.bin/passwd/Makefile Fri Feb 13 08:42:01 2015 (r278668) +++ head/usr.bin/passwd/Makefile Fri Feb 13 09:02:15 2015 (r278669) @@ -7,10 +7,20 @@ PROG = passwd BINOWN = root BINMODE = 4555 LIBADD = pam -PRECIOUSPROG= .if ${MK_NIS} != "no" LINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd MLINKS = passwd.1 yppasswd.1 .endif +beforeinstall: +.for i in passwd yppasswd + [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ + chflags noschg ${DESTDIR}${BINDIR}/$i || true +.endfor + +.if !defined(NO_FSCHG) +afterinstall: + -chflags schg ${DESTDIR}${BINDIR}/passwd +.endif + .include From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 09:17:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF89829D; Fri, 13 Feb 2015 09:17:51 +0000 (UTC) Received: from mail.sysgo.com (mail.sysgo.com [176.9.53.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B15D7107; Fri, 13 Feb 2015 09:17:51 +0000 (UTC) Date: Fri, 13 Feb 2015 10:11:45 +0100 From: Thomas Mueller To: Sean Bruno Subject: Re: svn commit: r278650 - in stable/10: sys/kern tools/sched usr.bin/man Message-ID: <20150213101145.0f26b06f@tmu.ulm.sysgo.com> In-Reply-To: <201502130029.t1D0TwbR002255@svn.freebsd.org> References: <201502130029.t1D0TwbR002255@svn.freebsd.org> Organization: SYSGO AG X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 09:17:52 -0000 On Fri, 13 Feb 2015 00:29:58 +0000 (UTC), Sean Bruno wrote: > Author: sbruno > Date: Fri Feb 13 00:29:57 2015 > New Revision: 278650 > URL: https://svnweb.freebsd.org/changeset/base/278650 > > Log: > MFC 272315 272757 274091 274902 > > r272315 > Explicitly return None for negative event indices. Prior to this, > eventat(-1) would return the next-to-last event causing the back button > to cycle back to the end of an event source instead of stopping at the > start. > > r272757 > Add schedgraph traces for callout handlers. Specifically, a callwheel logs > a running event each time it executes a callout function. The event > includes the function pointer, argument, and whether or not it was run from > hardware interrupt context. The callwheel is marked idle when each handler > completes. This effectively logs the duration of each callout routine in > the graph. > > r274091 > Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close > dialogs. > > r274902 > Add a new thread state "spinning" to schedgraph and add tracepoints at the > start and stop of spinning waits in lock primitives. > > Reviewed by: jhb > > Modified: > stable/10/sys/kern/kern_lock.c > stable/10/sys/kern/kern_mutex.c > stable/10/sys/kern/kern_rwlock.c > stable/10/sys/kern/kern_sx.c > stable/10/sys/kern/kern_timeout.c > stable/10/tools/sched/schedgraph.py > stable/10/usr.bin/man/man.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~ > [...] That change to man.sh does not seem to be related to any of the mentioned MFCs. tmu:~$ man ls eval: preconv: not found This manpage needs groff(1) to be rendered First install groff(1): pkg install groff tmu:~$ echo $LANG en_US.ISO8859-1 tmu:~$ LANG= man ls *** works as expected -- Thomas Mueller From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 11:00:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F3102BA; Fri, 13 Feb 2015 11:00:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10D62E26; Fri, 13 Feb 2015 11:00:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DB0D4p099639; Fri, 13 Feb 2015 11:00:13 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DB0DWn099638; Fri, 13 Feb 2015 11:00:13 GMT (envelope-from br@FreeBSD.org) Message-Id: <201502131100.t1DB0DWn099638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 13 Feb 2015 11:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278670 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 11:00:14 -0000 Author: br Date: Fri Feb 13 11:00:13 2015 New Revision: 278670 URL: https://svnweb.freebsd.org/changeset/base/278670 Log: o Correct the condition in reset procedure o Setup interrupt hander after reset, not before This fixes operation on ODROID-C1 (Amlogic S805) Submitted by: John Wehle Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Fri Feb 13 09:02:15 2015 (r278669) +++ head/sys/dev/dwc/if_dwc.c Fri Feb 13 11:00:13 2015 (r278670) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #define WRITE4(_sc, _reg, _val) \ bus_write_4((_sc)->res[0], _reg, _val) +#define MAC_RESET_TIMEOUT 100 #define WATCHDOG_TIMEOUT_SECS 5 #define STATS_HARVEST_INTERVAL 2 #define MII_CLK_VAL 2 @@ -1103,19 +1104,6 @@ dwc_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); - mtx_init(&sc->mtx, device_get_nameunit(sc->dev), - MTX_NETWORK_LOCK, MTX_DEF); - - callout_init_mtx(&sc->dwc_callout, &sc->mtx, 0); - - /* Setup interrupt handler. */ - error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE, - NULL, dwc_intr, sc, &sc->intr_cookie); - if (error != 0) { - device_printf(dev, "could not setup interrupt handler.\n"); - return (ENXIO); - } - /* Read MAC before reset */ if (dwc_get_hwaddr(sc, macaddr)) { device_printf(sc->dev, "can't get mac\n"); @@ -1127,12 +1115,12 @@ dwc_attach(device_t dev) reg |= (BUS_MODE_SWR); WRITE4(sc, BUS_MODE, reg); - for (i = 0; i < 100; i++) { + for (i = 0; i < MAC_RESET_TIMEOUT; i++) { if ((READ4(sc, BUS_MODE) & BUS_MODE_SWR) == 0) break; DELAY(10); } - if (i == 0) { + if (i >= MAC_RESET_TIMEOUT) { device_printf(sc->dev, "Can't reset DWC.\n"); return (ENXIO); } @@ -1156,6 +1144,19 @@ dwc_attach(device_t dev) WRITE4(sc, RX_DESCR_LIST_ADDR, sc->rxdesc_ring_paddr); WRITE4(sc, TX_DESCR_LIST_ADDR, sc->txdesc_ring_paddr); + mtx_init(&sc->mtx, device_get_nameunit(sc->dev), + MTX_NETWORK_LOCK, MTX_DEF); + + callout_init_mtx(&sc->dwc_callout, &sc->mtx, 0); + + /* Setup interrupt handler. */ + error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE, + NULL, dwc_intr, sc, &sc->intr_cookie); + if (error != 0) { + device_printf(dev, "could not setup interrupt handler.\n"); + return (ENXIO); + } + /* Set up the ethernet interface. */ sc->ifp = ifp = if_alloc(IFT_ETHER); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 11:13:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1F6E763; Fri, 13 Feb 2015 11:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E83F41; Fri, 13 Feb 2015 11:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DBD9Hm008275; Fri, 13 Feb 2015 11:13:09 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DBD9wD008274; Fri, 13 Feb 2015 11:13:09 GMT (envelope-from br@FreeBSD.org) Message-Id: <201502131113.t1DBD9wD008274@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 13 Feb 2015 11:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278671 - head/sys/dev/smc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 11:13:09 -0000 Author: br Date: Fri Feb 13 11:13:08 2015 New Revision: 278671 URL: https://svnweb.freebsd.org/changeset/base/278671 Log: o Correct the calculation how many pages we need o Ensure we use correct bank for MSK register o Save and restore current bank in interrupt handler o Stop TX watchdog on fatal errors o Use right register for EPH status This fixes operation on ARMv8 Foundation Model Reviewed by: benno@ Modified: head/sys/dev/smc/if_smc.c Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Fri Feb 13 11:00:13 2015 (r278670) +++ head/sys/dev/smc/if_smc.c Fri Feb 13 11:13:08 2015 (r278671) @@ -527,7 +527,7 @@ smc_start_locked(struct ifnet *ifp) * Work out how many 256 byte "pages" we need. We have to include the * control data for the packet in this calculation. */ - npages = (len * PKT_CTRL_DATA_LEN) >> 8; + npages = (len + PKT_CTRL_DATA_LEN) >> 8; if (npages == 0) npages = 1; @@ -805,12 +805,24 @@ static int smc_intr(void *context) { struct smc_softc *sc; - + uint32_t curbank; + sc = (struct smc_softc *)context; + + /* + * Save current bank and restore later in this function + */ + curbank = (smc_read_2(sc, BSR) & BSR_BANK_MASK); + /* * Block interrupts in order to let smc_task_intr to kick in */ + smc_select_bank(sc, 2); smc_write_1(sc, MSK, 0); + + /* Restore bank */ + smc_select_bank(sc, curbank); + taskqueue_enqueue_fast(sc->smc_tq, &sc->smc_intr); return (FILTER_HANDLED); } @@ -844,13 +856,19 @@ smc_task_intr(void *context, int pending */ packet = smc_read_1(sc, FIFO_TX); if ((packet & FIFO_EMPTY) == 0) { + callout_stop(&sc->smc_watchdog); + smc_select_bank(sc, 2); smc_write_1(sc, PNR, packet); smc_write_2(sc, PTR, 0 | PTR_READ | PTR_AUTO_INCR); - tcr = smc_read_2(sc, DATA0); + smc_select_bank(sc, 0); + tcr = smc_read_2(sc, EPHSR); +#if 0 if ((tcr & EPHSR_TX_SUC) == 0) device_printf(sc->smc_dev, "bad packet\n"); +#endif + smc_select_bank(sc, 2); smc_mmu_wait(sc); smc_write_2(sc, MMUCR, MMUCR_CMD_RELEASE_PKT); @@ -921,6 +939,7 @@ smc_task_intr(void *context, int pending /* * Update the interrupt mask. */ + smc_select_bank(sc, 2); if ((ifp->if_capenable & IFCAP_POLLING) == 0) smc_write_1(sc, MSK, sc->smc_mask); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 13:26:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4D3B469; Fri, 13 Feb 2015 13:26:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FCF0EDE; Fri, 13 Feb 2015 13:26:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DDQPI8071264; Fri, 13 Feb 2015 13:26:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DDQOKH071261; Fri, 13 Feb 2015 13:26:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502131326.t1DDQOKH071261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 13 Feb 2015 13:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278672 - in head/sys: cam/ctl sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 13:26:25 -0000 Author: mav Date: Fri Feb 13 13:26:23 2015 New Revision: 278672 URL: https://svnweb.freebsd.org/changeset/base/278672 Log: Teach CTL to ask GEOM devices about BIO_DELETE support. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/sys/disk.h Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Fri Feb 13 11:13:08 2015 (r278671) +++ head/sys/cam/ctl/ctl_backend_block.c Fri Feb 13 13:26:23 2015 (r278672) @@ -1874,7 +1874,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; char *value; - int error, atomic, maxio; + int error, atomic, maxio, unmap; off_t ps, pss, po, pos, us, uss, uo, uos; params = &be_lun->params; @@ -1899,7 +1899,6 @@ ctl_be_block_open_dev(struct ctl_be_bloc maxio = CTLBLK_MAX_IO_SIZE; } be_lun->lun_flush = ctl_be_block_flush_dev; - be_lun->unmap = ctl_be_block_unmap_dev; be_lun->getattr = ctl_be_block_getattr_dev; error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED); @@ -2030,6 +2029,24 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->atomicblock = atomic / be_lun->blocksize; be_lun->opttxferlen = maxio / be_lun->blocksize; + + if (be_lun->dispatch == ctl_be_block_dispatch_zvol) { + unmap = 1; + } else { + struct diocgattr_arg arg; + + strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name)); + arg.len = sizeof(arg.value.i); + error = devsw->d_ioctl(dev, DIOCGATTR, + (caddr_t)&arg, FREAD, curthread); + unmap = (error == 0) ? arg.value.i : 0; + } + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); + if (value != NULL) + unmap = (strcmp(value, "on") == 0); + if (unmap) + be_lun->unmap = ctl_be_block_unmap_dev; + return (0); } @@ -2182,7 +2199,7 @@ ctl_be_block_create(struct ctl_be_block_ char num_thread_str[16]; char tmpstr[32]; char *value; - int retval, num_threads, unmap; + int retval, num_threads; int tmp_num_threads; params = &req->reqdata.create; @@ -2275,16 +2292,12 @@ ctl_be_block_create(struct ctl_be_block_ } num_threads = tmp_num_threads; } - unmap = (be_lun->dispatch == ctl_be_block_dispatch_zvol); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); - if (value != NULL) - unmap = (strcmp(value, "on") == 0); be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; if (be_lun->vn == NULL) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_OFFLINE; - if (unmap) + if (be_lun->unmap != NULL) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; if (be_lun->dispatch != ctl_be_block_dispatch_dev) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_SERSEQ_READ; @@ -2668,6 +2681,8 @@ ctl_be_block_modify(struct ctl_be_block_ * XXX: Note that this field is being updated without locking, * which might cause problems on 32-bit architectures. */ + if (be_lun->unmap != NULL) + be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; be_lun->ctl_be_lun.maxlba = (be_lun->size_blocks == 0) ? 0 : (be_lun->size_blocks - 1); be_lun->ctl_be_lun.blocksize = be_lun->blocksize; Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Fri Feb 13 11:13:08 2015 (r278671) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Fri Feb 13 13:26:23 2015 (r278672) @@ -588,10 +588,10 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun->softc = softc; - unmap = 0; + unmap = 1; value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); if (value != NULL && strcmp(value, "on") == 0) - unmap = 1; + unmap = (strcmp(value, "on") == 0); be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED; be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; Modified: head/sys/sys/disk.h ============================================================================== --- head/sys/sys/disk.h Fri Feb 13 11:13:08 2015 (r278671) +++ head/sys/sys/disk.h Fri Feb 13 13:26:23 2015 (r278672) @@ -131,6 +131,7 @@ struct diocgattr_arg { union { char str[DISK_IDENT_SIZE]; off_t off; + int i; } value; }; #define DIOCGATTR _IOWR('d', 142, struct diocgattr_arg) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 13:55:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 250F5B43; Fri, 13 Feb 2015 13:55:36 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id D692B217; Fri, 13 Feb 2015 13:55:35 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 5DA8D1047985; Sat, 14 Feb 2015 00:55:31 +1100 (AEDT) Date: Sat, 14 Feb 2015 00:55:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov Subject: Re: svn commit: r278634 - head/lib/libc/gen In-Reply-To: <54DDABF2.9000201@freebsd.org> Message-ID: <20150214000829.K2210@besplex.bde.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=tmheVFKbtrcjo9yeMgsA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Pedro Giffuni , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 13:55:36 -0000 On Fri, 13 Feb 2015, Andrey Chernov wrote: > On 13.02.2015 10:18, Bruce Evans wrote: >> if (arg > RLIM_INFINITY) >> err(...); > > Checking for RLIM_INFINITY is wrong here, since it is ulong long max, No, it is correct. rlim_t is neither unsigned not specificially ulong long. It is int64_t, which happens to be long long on some arches. I already explained that this doesn't conform to POSIX. More details: - POSIX reqires rlim_t to be an unsigned type. This would be uint64_t in FreeBSD if FreeBSD conformed. - POSIX doesn't seem to specify the type of RLIM_INFINITY. It may be much smaller than the max for the type, so its natural type might be smaller. FreeBSD uses the max for the type, then casts the value to the type. The cast does little or nothing except to break use of RLIM_INFINITY in cpp arithmetic. This is exactly what is not wanted here -- fixing the problem miight need #if expressions to comparing RLIM_INFINITY with LONG_MAX. - FreeBSD also doesn't implement POSIX's RLIM_SAVED_MAX and RLIM_SAVED_CUR. These are for handling unrepresentable values, and might be the best way to handle the unrepresentable values that can be asked for by ulimit(3) even more easily than by setrlimit(2). Note that POSIX allows almost any handling for unrepresentable values in ulimit(3). The values can be mapped to any garbage and returned. The attempted fixes are mainly to return the same garbage that is mapped to. > considering > arg = va_arg(ap, long); > and ulimit(3) stating that arg is always plain long. This is a broken as designed API, since long is logically different from rlim_t, and ulimit()'s ulimits are 512-blocks while rlim_t's units are bytes, so a scale factor is needed and there would be representability problems even if the types were the same. This gives unrepresentable values in 3 ways: - on amd64, the types are the same. LONG_MAX in 512-blocks is 512 too large to represent in bytes. But RLIM_INFINITY in bytes is easy to represent in 512-blocks. - on amd64, the garbage arg LONG_MIN in 512-blocks is also 512 times too large (in absolute value) to represent in bytes. So large negative values need special handling to preserve their garbageness until this can be classified. (Early versions of the fixed tried to push this to setrlimit(), since ulimit()'s bad API enourages converting garbage to garbage like setrlimit() will do instead of returning an error. I also want the handling of large negative garbage args to be not too different from the handling of small negative garbage args.) - on i386, rlim_t is larger. RLIM_INFINITY in bytes 2**23 times too large to represent in 512-blocks. (This case was already handled correctly.) > Proper check will be > > if (arg < 0) { > errno = EINVAL; > return (-1); > } No, this takes more code, and gives error handling that is not supported by ulimit(3). EINVAL for ulimit(3) is only specified or documented to mean that the command (the first arg) was invalid). > if (arg > LONG_MAX / 512) > arg = LONG_MAX / 512; This is wrong, since arg > LONG_MAX is not an error when rlim_t is much larger than long (as on amd64). Breaking this would break getting and setting the default limit of RLIM_INFINITY. This is already broken on i386 and slightly broken on amd64: - "get" using ulimit(3) cannot return RLIM_INFINITY since RLIM_INFINITY is not a multiple of 512. Rounding down is specified to occur, and does occur. Then: - on amd64, RLIM_INFINITY / 512 is returned - on i386, RLIM_INFINITY / 512 is unrepresentable as a long. The return value is explicitly unspecified. It can be any undocumented garbage. FreeBSD returns the undocumented clamped value LONG_MAX. - "set" of the value returned by "get" cannot restore the original value: - on amd64, it sets the value to RLIM_INFINITY / 512 * 512 = RLIM_INFINITY rounded down to a multiple of 512 - on i386, it sets the value to LONG_MAX * 512. This is about 2**23 times smaller than the original value. > That all. In pure theoretical case RLIM_INFINITY is less than LONG_MAX, > it is job of underlying setrlimit(2) to return error. No, this cannot be handled by setrlimit(2), since the LONG_MAX cannot even be passed to setrlimit() then (if RLIM_INFINITY is the max for its type and not artificially low). This case occurs in practice (except ulimit(3) should never be used, and its only known "users" are Coverity and programmers finding and fixing bugs in it. My (arg > RLIM_INFINITY) check is simplified to show a general problem with range checking. For ulimit(), we actually need to check (arg * 512 > RLIM_INFINITY), except we write this as arg > RLIM_INFINITY since the multiplication might overflow. The multiplication does overflow on amd64 when arg == LONG_MAX. The overflow case is precisely when we cannot pass the scaled arg to setrlimit(2). Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 13:55:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 447CAC3E; Fri, 13 Feb 2015 13:55:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16DC4218; Fri, 13 Feb 2015 13:55:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DDtcxn085522; Fri, 13 Feb 2015 13:55:38 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DDtc32085521; Fri, 13 Feb 2015 13:55:38 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201502131355.t1DDtc32085521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Fri, 13 Feb 2015 13:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278673 - head/sys/dev/vt/font X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 13:55:39 -0000 Author: danfe (ports committer) Date: Fri Feb 13 13:55:38 2015 New Revision: 278673 URL: https://svnweb.freebsd.org/changeset/base/278673 Log: Improve vt(4) default mouse pointer image. Previous one looked rather ugly, especially on native monitor resolutions. This one essentially matches X11 default pointer. Differential Revision: https://reviews.freebsd.org/D1801 No objection from: emaste Approved by: adrian, dumbbell Modified: head/sys/dev/vt/font/vt_mouse_cursor.c Modified: head/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Fri Feb 13 13:26:23 2015 (r278672) +++ head/sys/dev/vt/font/vt_mouse_cursor.c Fri Feb 13 13:55:38 2015 (r278673) @@ -35,36 +35,42 @@ __FBSDID("$FreeBSD$"); #ifndef SC_NO_CUTPASTE struct vt_mouse_cursor vt_default_mouse_pointer = { .map = { - 0x00, /* "__ " */ - 0x40, /* "_*_ " */ - 0x60, /* "_**_ " */ - 0x70, /* "_***_ " */ - 0x78, /* "_****_ " */ - 0x7c, /* "_*****_ " */ - 0x7e, /* "_******_" */ - 0x68, /* "_**_****" */ - 0x4c, /* "_*__**_ " */ - 0x0c, /* " _ _**_ " */ - 0x06, /* " _**_" */ - 0x06, /* " _**_" */ - 0x00, /* " ____" */ + 0x00, 0x00, /* "__ " */ + 0x40, 0x00, /* "_*_ " */ + 0x60, 0x00, /* "_**_ " */ + 0x70, 0x00, /* "_***_ " */ + 0x78, 0x00, /* "_****_ " */ + 0x7c, 0x00, /* "_*****_ " */ + 0x7e, 0x00, /* "_******_ " */ + 0x7f, 0x00, /* "_*******_ " */ + 0x7f, 0x80, /* "_********_" */ + 0x7c, 0x00, /* "_*****____" */ + 0x6c, 0x00, /* "_**_**_ " */ + 0x46, 0x00, /* "_*_ _**_ " */ + 0x06, 0x00, /* "__ _**_ " */ + 0x03, 0x00, /* " _**_ " */ + 0x03, 0x00, /* " _**_ " */ + 0x00, 0x00, /* " __ " */ }, .mask = { - 0xc0, /* "__ " */ - 0xe0, /* "___ " */ - 0xf0, /* "____ " */ - 0xf8, /* "_____ " */ - 0xfc, /* "______ " */ - 0xfe, /* "_______ " */ - 0xff, /* "________" */ - 0xff, /* "________" */ - 0xfe, /* "_______ " */ - 0x5e, /* " _ ____ " */ - 0x0f, /* " ____" */ - 0x0f, /* " ____" */ - 0x0f, /* " ____" */ + 0xc0, 0x00, /* "__ " */ + 0xe0, 0x00, /* "___ " */ + 0xf0, 0x00, /* "____ " */ + 0xf8, 0x00, /* "_____ " */ + 0xfc, 0x00, /* "______ " */ + 0xfe, 0x00, /* "_______ " */ + 0xff, 0x00, /* "________ " */ + 0xff, 0x80, /* "_________ " */ + 0xff, 0xc0, /* "__________" */ + 0xff, 0xc0, /* "__________" */ + 0xfe, 0x00, /* "_______ " */ + 0xef, 0x00, /* "___ ____ " */ + 0xcf, 0x00, /* "__ ____ " */ + 0x07, 0x80, /* " ____ " */ + 0x07, 0x80, /* " ____ " */ + 0x03, 0x00, /* " __ " */ }, - .width = 8, - .height = 13, + .width = 10, + .height = 16, }; #endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 14:29:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 226D16DB; Fri, 13 Feb 2015 14:29:53 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id D3A5C7ED; Fri, 13 Feb 2015 14:29:52 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 61F0F3C72E7; Sat, 14 Feb 2015 01:29:50 +1100 (AEDT) Date: Sat, 14 Feb 2015 01:29:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov Subject: Re: svn commit: r278634 - head/lib/libc/gen In-Reply-To: <54DDAEF6.3060900@freebsd.org> Message-ID: <20150214005543.X2210@besplex.bde.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=uJTURyrQue8Ndf2tMUgA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Pedro Giffuni , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 14:29:53 -0000 On Fri, 13 Feb 2015, Andrey Chernov wrote: > We even don't need to check arg excepting for < 0, because what is > needed is rlimt_t and not arg. So this version will be better: > > rlimt_t targ; > > if (arg < 0) { > errno = EINVAL; > return (-1); > } This is reasonable, but not encouraged by the API or compatible with what setrlimit() does with negative args. (setrlimit() still uses my hack from 1994, of converting negative args to RLIM_INFINITY. In 4.4BSD, it doesn't even check for negative args, and mostly stores them unchanged; then undefined behaviour tends to occur when the stored values are used without further checking.) In POSIX, rlim_t is an unsigned integer type, so negative args are impossible for it and all negative args here are unrepresentable as an rlim_t. We can convert them to any garbage. The historical garbage is as good as anything. > targ = arg; Unnecessary overflow before checking in the theoretical case where rlim_t is smaller than long. > if (targ > RLIM_INFINITY / 512) > targ = RLIM_INFINITY / 512; When overflow doesn't occur, using targ instead of arg in the comparison does nothing except possibly confuse the compiler into not generating a tautologous-compare warning. Assigning RLIM_INFINITY to an rlim_t instead of to a long is one way to way to fix the overflow case for the latter, > limit.rlim_max = limit.rlim_cur = targ * 512 However, I don't like using rlim_t for the scaled value that is not an rlimit. An incomplete fix with handling of negative values restored is something like: intmax_t targ; targ = arg; if (targ > RLIM_INFINITY / 512) targ = RLIM_INFINITY / 512; limit.rlim_max = limit.rlim_cur = targ * 512 This is still incomplete. The comparison is still obviously tautologous when intmax_t == rlim_t (the amd64 case). If intmax_t is larger than long (the i386 case) or even rlim_t (the notyet case), then it is slightly less obviously tautologous. This can be fixed by sprinkling volatiles, e.g. for targ. Range checking in expr(1) needed much more delicate fixes including sprinkling volatiles. There the problem was that the compiler saw that the behaviour was either undefined or tautologously true or false. Optimization then allows it to remove tautologous checks. The warnings about tautologous checks must have been turned off, or perhaps broken when undefined behaviour is required for the tautologies, else we should have seen the warnings before the optimizations. The warnings are needed even more with the optimizations, to give a hint that necessary code is being removed. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 14:54:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CDFEE95; Fri, 13 Feb 2015 14:54:26 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id CE2B3A83; Fri, 13 Feb 2015 14:54:25 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 88D04D43936; Sat, 14 Feb 2015 01:54:18 +1100 (AEDT) Date: Sat, 14 Feb 2015 01:54:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r278634 - head/lib/libc/gen In-Reply-To: <20150214005543.X2210@besplex.bde.org> Message-ID: <20150214015036.Y2552@besplex.bde.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> <20150214005543.X2210@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=baJSDo/B c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=OUp92IgwhtU7bb92HiYA:9 a=CjuIK1q_8ugA:10 Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, Pedro Giffuni , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 14:54:26 -0000 On Sat, 14 Feb 2015, Bruce Evans wrote: > ... > However, I don't like using rlim_t for the scaled value that is not > an rlimit. > > An incomplete fix with handling of negative values restored is something > like: > > intmax_t targ; > > targ = arg; > if (targ > RLIM_INFINITY / 512) > targ = RLIM_INFINITY / 512; > limit.rlim_max = limit.rlim_cur = targ * 512 > > This is still incomplete. The comparison is still obviously tautologous > when intmax_t == rlim_t (the amd64 case). If intmax_t is larger than > long (the i386 case) or even rlim_t (the notyet case), then it is slightly > less obviously tautologous. This can be fixed by sprinkling volatiles, > e.g. for targ. Oops, I forgot to restore handling of negatives. Also with volatile: volatile intmax_t targ; targ = arg; if (targ > RLIM_INFINITY / 512 || targ < 0) targ = RLIM_INFINITY / 512; limit.rlim_max = limit.rlim_cur = targ * 512; This has not been tested. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 15:16:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 200D1814; Fri, 13 Feb 2015 15:16:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD9DD15; Fri, 13 Feb 2015 15:16:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DFGuUo024555; Fri, 13 Feb 2015 15:16:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFGubn024554; Fri, 13 Feb 2015 15:16:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131516.t1DFGubn024554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278675 - stable/10/sys/boot/arm/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:16:57 -0000 Author: ian Date: Fri Feb 13 15:16:55 2015 New Revision: 278675 URL: https://svnweb.freebsd.org/changeset/base/278675 Log: MFC r276632: Create a custom /boot/defaults/loader.conf for ARM. Added: stable/10/sys/boot/arm/uboot/loader.conf - copied unchanged from r276632, head/sys/boot/arm/uboot/loader.conf Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/boot/arm/uboot/loader.conf (from r276632, head/sys/boot/arm/uboot/loader.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/arm/uboot/loader.conf Fri Feb 13 15:16:55 2015 (r278675, copy of r276632, head/sys/boot/arm/uboot/loader.conf) @@ -0,0 +1,13 @@ +# This is defaults/loader.conf for ARM, containing defaults for loader(8). +# Do not modify the contents of this file, instead put your customizations +# into /boot/loader.conf or /boot/loader.conf.local +# $FreeBSD$ + +autoboot_delay=10 +bootfile="kernel" # Kernel name (possibly absolute path) +kernel="kernel" # /boot sub-directory containing kernel and modules +loader_conf_files="/boot/loader.conf /boot/loader.conf.local" +module_path="/boot/kernel;/boot/modules;/boot/dtb" +nextboot_conf="/boot/nextboot.conf" +nextboot_enable="NO" +verbose_loading="NO" From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 15:27:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B74CBDE; Fri, 13 Feb 2015 15:27:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16AEBE01; Fri, 13 Feb 2015 15:27:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DFRrqS029672; Fri, 13 Feb 2015 15:27:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFRlVs029644; Fri, 13 Feb 2015 15:27:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131527.t1DFRlVs029644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278676 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:27:53 -0000 Author: ian Date: Fri Feb 13 15:27:46 2015 New Revision: 278676 URL: https://svnweb.freebsd.org/changeset/base/278676 Log: MFC r266647, r270912, r273089: Reduce the diff between the PandaBoard and BeableBone kernel configs Resync comments about scbus and pass for life after AHCI joined CAM. Uncomment general options from the Pandaboard config. These are in other configs and there is no reason for them not to be here. Modified: stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/VYBRID stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 15:27:46 2015 (r278676) @@ -53,7 +53,7 @@ options PREEMPTION options FREEBSD_BOOT_LOADER options VFP # vfp/neon -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages @@ -78,12 +78,17 @@ options NFSLOCKD #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 - -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # mmc/sd host controller +# I2C support +device iicbus +device iic +device ti_i2c +device am335x_pmic # AM335x Power Management IC (TPC65217) + # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:mmcsd0s2\" @@ -97,12 +102,6 @@ device snp device md device random # Entropy device -# I2C support -device iicbus -device iic -device ti_i2c -device am335x_pmic # AM335x Power Management IC (TPC65217) - # GPIO device gpio device gpioled @@ -124,13 +123,13 @@ device ti_mbox # USB support device usb -options USB_HOST_ALIGN=64 # Cacheline size is 64 on AM335x. +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE device musb device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) # Ethernet @@ -141,7 +140,7 @@ device smscphy device cpsw device bpf -# USB ethernet support, requires miibus +# USB Ethernet support, requires miibus device miibus device axe # ASIX Electronics USB Ethernet Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CNS11XXNAS Fri Feb 13 15:27:46 2015 (r278676) @@ -111,7 +111,7 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass device cfi Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:27:46 2015 (r278676) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 15:27:46 2015 (r278676) @@ -128,10 +128,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EB9200 Fri Feb 13 15:27:46 2015 (r278676) @@ -102,10 +102,10 @@ device ohci # OHCI localbus->USB inte device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB device (gadget) support #device at91_dci # Atmel's usb device Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 15:27:46 2015 (r278676) @@ -124,10 +124,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:27:46 2015 (r278676) @@ -103,7 +103,7 @@ device ehci #device ohci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/HL200 Fri Feb 13 15:27:46 2015 (r278676) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/HL201 Fri Feb 13 15:27:46 2015 (r278676) @@ -112,10 +112,10 @@ device udav # Davicom DM9601E USB #device ural # Ralink Technology RT2500USB wireless NICs #device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards #device wlan # 802.11 support #device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 15:27:46 2015 (r278676) @@ -127,10 +127,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 15:27:46 2015 (r278676) @@ -93,10 +93,10 @@ device mmc # SD/MMC protocol device mmcsd # SDCard disk device # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #options USB_DEBUG # enable debug msgs Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/KB920X Fri Feb 13 15:27:46 2015 (r278676) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/NSLU Fri Feb 13 15:27:46 2015 (r278676) @@ -115,5 +115,5 @@ options USB_DEBUG device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -12,54 +12,40 @@ # latest information. # # An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD$ ident PANDABOARD - - # This probably wants to move somewhere else. Maybe we can create a basic # OMAP4340 config, then make a PANDABOARD config that includes the basic one, # adds the start addresses and custom devices plus pulls in this hints file. -hints "PANDABOARD.hints" +hints "PANDABOARD.hints" -include "../ti/omap4/pandaboard/std.pandaboard" +include "../ti/omap4/pandaboard/std.pandaboard" #To statically compile in device wiring instead of /boot/device.hints makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking -#options INET6 # IPv6 communications protocols +options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -device snp -options BREAK_TO_DEBUGGER - -options NFSCL -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem -#options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI @@ -69,9 +55,33 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PREEMPTION options FREEBSD_BOOT_LOADER +options VFP # vfp/neon +options SMP # Enable multiple cores -options PREEMPTION +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB +options DDB # Enable the kernel debugger +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +options NFSCL + +# NFS root +options NFS_ROOT # NFS usable as /, requires NFSCLIENT +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus @@ -83,56 +93,50 @@ device iicbus device iic device ti_i2c -device loop -device ether -device mii -device smc -device smcphy +# Console and misc device uart device uart_ns8250 - -device gpio - device pty - +device snp +device md +device random # Entropy device device pl310 # PL310 L2 cache controller -# Debugging for use in -current -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC -device md +# GPIO +device gpio # The following enables MFS as root, this seems similar to an initramfs or initrd # as used in Linux. #options MD_ROOT #options MD_ROOT_SIZE=7560 -device random # Entropy device + # USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +# Ethernet +device loop +device ether +device mii +device smc +device smcphy +device bpf # USB Ethernet support, requires miibus device miibus #device axe # ASIX Electronics USB Ethernet device smsc # SMSC LAN95xx USB Ethernet -device bpf + # OMAP-specific devices device ti_sdma @@ -144,6 +148,3 @@ device twl_clks options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=pandaboard.dts - -options VFP # vfp/neon -options SMP # Enable multiple cores Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/QILA9G20 Fri Feb 13 15:27:46 2015 (r278676) @@ -117,10 +117,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SAM9G20EK Fri Feb 13 15:27:46 2015 (r278676) @@ -119,10 +119,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SAM9X25EK Fri Feb 13 15:27:46 2015 (r278676) @@ -118,10 +118,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SN9G45 Fri Feb 13 15:27:46 2015 (r278676) @@ -95,10 +95,10 @@ option AT91_ATE_USE_RMII device at91_wdt # WDT: Watchdog timer # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/VYBRID ============================================================================== --- stable/10/sys/arm/conf/VYBRID Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/VYBRID Fri Feb 13 15:27:46 2015 (r278676) @@ -112,7 +112,7 @@ device ehci #device ohci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -92,7 +92,7 @@ options USB_DEBUG #options USB_VERBOSE device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device axe # USB-Ethernet From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 15:32:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A74AD52; Fri, 13 Feb 2015 15:32:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B81FEB8; Fri, 13 Feb 2015 15:32:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DFWYmd033823; Fri, 13 Feb 2015 15:32:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFWWp4033815; Fri, 13 Feb 2015 15:32:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131532.t1DFWWp4033815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278677 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:32:34 -0000 Author: ian Date: Fri Feb 13 15:32:31 2015 New Revision: 278677 URL: https://svnweb.freebsd.org/changeset/base/278677 Log: MFC r276642, r276644: Remove commented-out options SMP and APIC_IO from old arm boards that will never be able to support smp. Switch all arm kernels with option SMP to use SCHED_ULE instead of 4BSD. Modified: stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 15:32:31 2015 (r278677) @@ -14,7 +14,7 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions WERROR="-Werror" #options SCHED_ULE # ULE scheduler -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem Modified: stable/10/sys/arm/conf/CRB ============================================================================== --- stable/10/sys/arm/conf/CRB Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/CRB Fri Feb 13 15:32:31 2015 (r278677) @@ -101,9 +101,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:32:31 2015 (r278677) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme Modified: stable/10/sys/arm/conf/EP80219 ============================================================================== --- stable/10/sys/arm/conf/EP80219 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/EP80219 Fri Feb 13 15:32:31 2015 (r278677) @@ -97,9 +97,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:32:31 2015 (r278677) @@ -24,7 +24,7 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions WERROR="-Werror" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme Modified: stable/10/sys/arm/conf/IQ31244 ============================================================================== --- stable/10/sys/arm/conf/IQ31244 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/IQ31244 Fri Feb 13 15:32:31 2015 (r278677) @@ -102,9 +102,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:32:31 2015 (r278677) @@ -33,7 +33,7 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:32:31 2015 (r278677) @@ -25,7 +25,7 @@ include "../xilinx/zedboard/std.zedboard makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 15:41:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65EDD2DF; Fri, 13 Feb 2015 15:41:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51571F9F; Fri, 13 Feb 2015 15:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DFfTdt038530; Fri, 13 Feb 2015 15:41:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFfTZ3038529; Fri, 13 Feb 2015 15:41:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131541.t1DFfTZ3038529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278678 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:41:29 -0000 Author: ian Date: Fri Feb 13 15:41:28 2015 New Revision: 278678 URL: https://svnweb.freebsd.org/changeset/base/278678 Log: MFC r276645: Don't allow clang to use fpu instructions or registers in kernel modules. Modified: stable/10/sys/conf/kmod.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kmod.mk ============================================================================== --- stable/10/sys/conf/kmod.mk Fri Feb 13 15:32:31 2015 (r278677) +++ stable/10/sys/conf/kmod.mk Fri Feb 13 15:41:28 2015 (r278678) @@ -126,8 +126,10 @@ CFLAGS+= -fno-omit-frame-pointer -mno-om .endif # Temporary workaround for PR 196407, which contains the fascinating details. +# Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm CFLAGS.clang+= -mllvm -arm-use-movt=0 +CFLAGS.clang+= -mfpu=none .endif .if ${MACHINE_CPUARCH} == powerpc From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 16:07:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D79A2A78 for ; Fri, 13 Feb 2015 16:07:39 +0000 (UTC) Received: from nm44-vm7.bullet.mail.bf1.yahoo.com (nm44-vm7.bullet.mail.bf1.yahoo.com [216.109.115.31]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A16526D for ; Fri, 13 Feb 2015 16:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423843264; bh=MjH1ZtrmLjf1z/uuXaINgd1QGTTmDHyixjh4kVxTlzI=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=KpgU7nBztT0fC0r7zqaTeKxQPym3Xmp9hM1Yx3+ajr99xTv69P5dLsv0prJ7/7lwM0bI0J29FN98Ic/AWAY+q65KOKvq1Ru0W1l7hXDdZOJx7DP0j3gh+jtoSSB5U1JFBArGZFrk8b3ug4IuRtv7oEXReYKSleT/ji9pOHlGO+B2PBggB74Z6lK+mIsi9l51shP3CTNxDTkJwpYaTF2NdkPMsfrsyFGUzR4M6iFHjCWz3uN62jxY7Ov+TDI3D4SdY75Cw1dvELNQ41rB0dJQK2L8jb99HN2qaDwUwHtJBy0Tqm0jHrU7grZPPIIGxE5JbupD7loy8HktymmdkqK/MA== Received: from [98.139.215.143] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 16:01:04 -0000 Received: from [98.139.211.195] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 16:01:04 -0000 Received: from [127.0.0.1] by smtp204.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 16:01:04 -0000 X-Yahoo-Newman-Id: 516109.36204.bm@smtp204.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: swiegUsVM1lTZrJU3SZTlJ8mgMNuLl_U_SFabpCfWK._vFO P3gmscn4lXkhIDD9wGIsKjHjS4J9gL6IYIy_okl57UsTRNU2ABwRSHWcpeyn DkFyL_eXWJaBx8QF_lSO6LscyK9VJBUusUppp.xPeuQnbOInfFRyUGGs50z1 r9ovX1r2Uf7aWoh6Nq5eJsbxEsneDUl_pnUA6rXLPHD.ajh0gPfmOHnDU0bC 2l65Dv6stM2HwJX6cgl0c6m_pI5H7tQNVnEp_Gix_dZ7EY1x82Ax29atdqFl Pf5yoJ7_vjy0cUqYLwe3bKxgOZb4Ww1OWDXEOICDHf16XjFp0daVjWyO4WP2 UfERUxHXlSnvExq118n6P1E.aup1VmMEr5OreaWa0Kt7DaOo6j3nS3fVBjpf dcRBQApyY42Pzn1ZC97gb9.pJuLN4qkWb8fZmRHDGeuNmgBmcmyz2S9PEYX3 w3bd2jQPHeWKlQpIDVmCqh.bXToBjGrTYV4Cxp21BEojRCV_SnUh6OK0eRod R.nV8bp5gpTxxfOFczxv52HjViViz.BL4 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DE1FC9.4000503@FreeBSD.org> Date: Fri, 13 Feb 2015 11:01:13 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans , Andrey Chernov Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> <20150214005543.X2210@besplex.bde.org> In-Reply-To: <20150214005543.X2210@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:07:40 -0000 On 02/13/15 09:29, Bruce Evans wrote: > On Fri, 13 Feb 2015, Andrey Chernov wrote: > >> We even don't need to check arg excepting for < 0, because what is >> needed is rlimt_t and not arg. So this version will be better: >> >> rlimt_t targ; >> >> if (arg < 0) { >> errno = EINVAL; >> return (-1); >> } > > > This is reasonable, but not encouraged by the API or compatible with > what setrlimit() does with negative args. (setrlimit() still uses > my hack from 1994, of converting negative args to RLIM_INFINITY. In > 4.4BSD, it doesn't even check for negative args, and mostly stores > them unchanged; then undefined behaviour tends to occur when the > stored values are used without further checking.) > Actually I think the above check would be OK according to POSIX: ... The /ulimit/() function shall fail and the limit shall be unchanged if: [EINVAL] The /cmd/ argument is not valid. ... ... > An incomplete fix with handling of negative values restored is something > like: > > intmax_t targ; > > targ = arg; > if (targ > RLIM_INFINITY / 512) > targ = RLIM_INFINITY / 512; > limit.rlim_max = limit.rlim_cur = targ * 512 > > This is still incomplete. The comparison is still obviously tautologous > when intmax_t == rlim_t (the amd64 case). If intmax_t is larger than > long (the i386 case) or even rlim_t (the notyet case), then it is > slightly > less obviously tautologous. This can be fixed by sprinkling volatiles, > e.g. for targ. > I am passing this (with the check for negative values and __intmax_t) through the tinderbox. FWIW, I had something else that managed to compile but is *very* ugly and can cause an effect similar to tear gas on sensitive eyes ;). Pedro. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 16:08:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05414BD8; Fri, 13 Feb 2015 16:08:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4BAB287; Fri, 13 Feb 2015 16:08:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DG8k0L049212; Fri, 13 Feb 2015 16:08:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DG8kDU049210; Fri, 13 Feb 2015 16:08:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131608.t1DG8kDU049210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 16:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278679 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:08:47 -0000 Author: ian Date: Fri Feb 13 16:08:45 2015 New Revision: 278679 URL: https://svnweb.freebsd.org/changeset/base/278679 Log: MFC r276666: Eliminate uninitialized variable warnings in kernel and module builds when building with gcc 4.2 Modified: stable/10/sys/conf/kern.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.mk ============================================================================== --- stable/10/sys/conf/kern.mk Fri Feb 13 15:41:28 2015 (r278678) +++ stable/10/sys/conf/kern.mk Fri Feb 13 16:08:45 2015 (r278679) @@ -33,6 +33,11 @@ CWARNEXTRA?= -Wno-error-tautological-com ${NO_WFORMAT} .endif +.if ${COMPILER_TYPE} == "gcc" +# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. +CWARNEXTRA?= -Wno-uninitialized +.endif + # External compilers may not support our format extensions. Allow them # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 16:21:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E63324; Fri, 13 Feb 2015 16:21:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FB4B65B; Fri, 13 Feb 2015 16:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DGLbPR055552; Fri, 13 Feb 2015 16:21:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DGLavv055550; Fri, 13 Feb 2015 16:21:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131621.t1DGLavv055550@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 16:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278680 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:21:37 -0000 Author: ian Date: Fri Feb 13 16:21:36 2015 New Revision: 278680 URL: https://svnweb.freebsd.org/changeset/base/278680 Log: MFC r266083, r267597: Give suitably-endowed ARMs a register similar to the x86 TSC register. Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/include/cpu.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Fri Feb 13 16:08:45 2015 (r278679) +++ stable/10/sys/arm/arm/cpufunc.c Fri Feb 13 16:21:36 2015 (r278680) @@ -1397,6 +1397,53 @@ arm10_setup(args) } #endif /* CPU_ARM9E || CPU_ARM10 */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ + || defined(CPU_MV_PJ4B) \ + || defined(CPU_CORTEXA) || defined(CPU_KRAIT) +static __inline void +cpu_scc_setup_ccnt(void) +{ +/* This is how you give userland access to the CCNT and PMCn + * registers. + * BEWARE! This gives write access also, which may not be what + * you want! + */ +#ifdef _PMC_USER_READ_WRITE_ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* Use the Secure User and Non-secure Access Validation Control Register + * to allow userland access + */ + __asm volatile ("mcr p15, 0, %0, c15, c9, 0\n\t" + : + : "r"(0x00000001)); +#else + /* Set PMUSERENR[0] to allow userland access */ + __asm volatile ("mcr p15, 0, %0, c9, c14, 0\n\t" + : + : "r"(0x00000001)); +#endif +#endif +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* Set PMCR[2,0] to enable counters and reset CCNT */ + __asm volatile ("mcr p15, 0, %0, c15, c12, 0\n\t" + : + : "r"(0x00000005)); +#else + /* Set up the PMCCNTR register as a cyclecounter: + * Set PMINTENCLR to 0xFFFFFFFF to block interrupts + * Set PMCR[2,0] to enable counters and reset CCNT + * Set PMCNTENSET to 0x80000000 to enable CCNT */ + __asm volatile ("mcr p15, 0, %0, c9, c14, 2\n\t" + "mcr p15, 0, %1, c9, c12, 0\n\t" + "mcr p15, 0, %2, c9, c12, 1\n\t" + : + : "r"(0xFFFFFFFF), + "r"(0x00000005), + "r"(0x80000000)); +#endif +} +#endif + #if defined(CPU_ARM1136) || defined(CPU_ARM1176) struct cpu_option arm11_options[] = { { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, @@ -1500,6 +1547,8 @@ arm11x6_setup(char *args) /* And again. */ cpu_idcache_wbinv_all(); + + cpu_scc_setup_ccnt(); } #endif /* CPU_ARM1136 || CPU_ARM1176 */ @@ -1534,6 +1583,8 @@ pj4bv7_setup(args) /* And again. */ cpu_idcache_wbinv_all(); + + cpu_scc_setup_ccnt(); } #endif /* CPU_MV_PJ4B */ @@ -1581,6 +1632,8 @@ cortexa_setup(char *args) #ifdef SMP armv7_auxctrl((1 << 6) | (1 << 0), (1 << 6) | (1 << 0)); /* Enable SMP + TLB broadcasting */ #endif + + cpu_scc_setup_ccnt(); } #endif /* CPU_CORTEXA */ Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Fri Feb 13 16:08:45 2015 (r278679) +++ stable/10/sys/arm/include/cpu.h Fri Feb 13 16:21:36 2015 (r278680) @@ -14,11 +14,35 @@ void swi_vm(void *); static __inline uint64_t get_cyclecount(void) { +/* This '#if' asks the question 'Does CP15/SCC include performance counters?' */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ + || defined(CPU_MV_PJ4B) \ + || defined(CPU_CORTEXA) || defined(CPU_KRAIT) + uint32_t ccnt; + uint64_t ccnt64; + + /* + * Read PMCCNTR. Curses! Its only 32 bits. + * TODO: Fix this by catching overflow with interrupt? + */ +/* The ARMv6 vs ARMv7 divide is going to need a better way of + * distinguishing between them. + */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* ARMv6 - Earlier model SCCs */ + __asm __volatile("mrc p15, 0, %0, c15, c12, 1": "=r" (ccnt)); +#else + /* ARMv7 - Later model SCCs */ + __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); +#endif + ccnt64 = (uint64_t)ccnt; + return (ccnt64); +#else /* No performance counters, so use binuptime(9). This is slooooow */ struct bintime bt; binuptime(&bt); return ((uint64_t)bt.sec << 56 | bt.frac >> 8); - +#endif } #endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 16:35:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E36187DF; Fri, 13 Feb 2015 16:35:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE6E27C3; Fri, 13 Feb 2015 16:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DGZDsZ063219; Fri, 13 Feb 2015 16:35:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DGZCUD063215; Fri, 13 Feb 2015 16:35:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502131635.t1DGZCUD063215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 16:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278681 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:35:14 -0000 Author: hselasky Date: Fri Feb 13 16:35:12 2015 New Revision: 278681 URL: https://svnweb.freebsd.org/changeset/base/278681 Log: Add more functions to the Linux kernel compatibility layer. Add some missing includes which are needed when the header files are not included in a particular order. MFC after: 1 month Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/gfp.h head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/kref.h head/sys/ofed/include/linux/pci.h Modified: head/sys/ofed/include/linux/gfp.h ============================================================================== --- head/sys/ofed/include/linux/gfp.h Fri Feb 13 16:21:36 2015 (r278680) +++ head/sys/ofed/include/linux/gfp.h Fri Feb 13 16:35:12 2015 (r278681) @@ -105,6 +105,13 @@ __free_pages(struct page *m, unsigned in kmem_free(kmem_arena, (vm_offset_t)page_address(m), size); } +static inline void free_pages(uintptr_t addr, unsigned int order) +{ + if (addr == 0) + return; + __free_pages(virt_to_page((void *)addr), order); +} + /* * Alloc pages allocates directly from the buddy allocator on linux so * order specifies a power of two bucket of pages and the results @@ -124,6 +131,16 @@ alloc_pages(gfp_t gfp_mask, unsigned int return (virt_to_page(page)); } +static inline uintptr_t __get_free_pages(gfp_t gfp_mask, unsigned int order) +{ + struct page *page; + + page = alloc_pages(gfp_mask, order); + if (page == NULL) + return (0); + return ((uintptr_t)page_address(page)); +} + #define alloc_pages_node(node, mask, order) alloc_pages(mask, order) #define kmalloc_node(chunk, mask, node) kmalloc(chunk, mask) Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Fri Feb 13 16:21:36 2015 (r278680) +++ head/sys/ofed/include/linux/kernel.h Fri Feb 13 16:35:12 2015 (r278681) @@ -68,6 +68,7 @@ #undef ALIGN #define ALIGN(x, y) roundup2((x), (y)) #define DIV_ROUND_UP howmany +#define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) #define printk(X...) printf(X) @@ -175,6 +176,7 @@ #define round_down(x, y) ((x) & ~__round_mask(x, y)) #define num_possible_cpus() mp_ncpus +#define num_online_cpus() mp_ncpus typedef struct pm_message { int event; Modified: head/sys/ofed/include/linux/kref.h ============================================================================== --- head/sys/ofed/include/linux/kref.h Fri Feb 13 16:21:36 2015 (r278680) +++ head/sys/ofed/include/linux/kref.h Fri Feb 13 16:35:12 2015 (r278681) @@ -29,6 +29,7 @@ #ifndef _LINUX_KREF_H_ #define _LINUX_KREF_H_ +#include #include struct kref { Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Fri Feb 13 16:21:36 2015 (r278680) +++ head/sys/ofed/include/linux/pci.h Fri Feb 13 16:35:12 2015 (r278681) @@ -270,6 +270,14 @@ pci_set_master(struct pci_dev *pdev) } static inline int +pci_clear_master(struct pci_dev *pdev) +{ + + pci_disable_busmaster(pdev->dev.bsddev); + return (0); +} + +static inline int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name) { int rid; @@ -458,6 +466,30 @@ pci_enable_msix(struct pci_dev *pdev, st return (0); } +#define pci_enable_msix_range linux_pci_enable_msix_range +static inline int +pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, + int minvec, int maxvec) +{ + int nvec = maxvec; + int rc; + + if (maxvec < minvec) + return (-ERANGE); + + do { + rc = pci_enable_msix(dev, entries, nvec); + if (rc < 0) { + return (rc); + } else if (rc > 0) { + if (rc < minvec) + return (-ENOSPC); + nvec = rc; + } + } while (rc); + return (nvec); +} + static inline int pci_channel_offline(struct pci_dev *pdev) { return false; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 16:47:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4271C3; Fri, 13 Feb 2015 16:47:03 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 8B16A91B; Fri, 13 Feb 2015 16:47:03 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id A2C59D635B3; Sat, 14 Feb 2015 03:47:00 +1100 (AEDT) Date: Sat, 14 Feb 2015 03:46:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni Subject: Re: svn commit: r278634 - head/lib/libc/gen In-Reply-To: <54DE1FC9.4000503@FreeBSD.org> Message-ID: <20150214032839.E3221@besplex.bde.org> References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> <20150214005543.X2210@besplex.bde.org> <54DE1FC9.4000503@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=CDFkk6uA_NIjEHA-TEwA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:47:04 -0000 On Fri, 13 Feb 2015, Pedro Giffuni wrote: > On 02/13/15 09:29, Bruce Evans wrote: >> On Fri, 13 Feb 2015, Andrey Chernov wrote: >> >>> We even don't need to check arg excepting for < 0, because what is >>> needed is rlimt_t and not arg. So this version will be better: >>> >>> rlimt_t targ; >>> >>> if (arg < 0) { >>> errno = EINVAL; >>> return (-1); >>> } >> >> >> This is reasonable, but not encouraged by the API or compatible with >> what setrlimit() does with negative args. (setrlimit() still uses >> my hack from 1994, of converting negative args to RLIM_INFINITY. In >> 4.4BSD, it doesn't even check for negative args, and mostly stores >> them unchanged; then undefined behaviour tends to occur when the >> stored values are used without further checking.) > > Actually I think the above check would be OK according to POSIX: > ... > > The /ulimit/() function shall fail and the limit shall be unchanged if: > > [EINVAL] > The /cmd/ argument is not valid. > ... I already partly explained that this is (part of) why POSIX discourages returning EINVAL for the /data/ argument. EINVAL is for the /cmd/ argument. No errno is specified for the /data/ argument. Instead, the implementation is implicitly encourage to (if the requested value is unrepresentable) invent some representable value and return the result of setting it. We still often get EPERM if our invented value cannot be set due to EPERM. Rounding makes EPERM even more likely than ususal. E.g., if we start with RLIM_INFINITY and get and set it using some implementations of this function, then rounding reduces the hard rlimit. Then if a slightly different implementation tries to increase the hard rlimit hack to RLIM_INFINITY, then this fails with EPERM (except for root). Some preliminary attempts to fix the warning would have caused this EPERM error for almost all error cases, since non-error cases rounded down but error cases attempted to raise to RLIM_INFINITY. > ... >> An incomplete fix with handling of negative values restored is something >> like: >> >> intmax_t targ; >> >> targ = arg; >> if (targ > RLIM_INFINITY / 512) >> targ = RLIM_INFINITY / 512; >> limit.rlim_max = limit.rlim_cur = targ * 512 >> >> This is still incomplete. The comparison is still obviously tautologous >> when intmax_t == rlim_t (the amd64 case). If intmax_t is larger than >> long (the i386 case) or even rlim_t (the notyet case), then it is slightly >> less obviously tautologous. This can be fixed by sprinkling volatiles, >> e.g. for targ. > > I am passing this (with the check for negative values and __intmax_t) > through the tinderbox. > FWIW, I had something else that managed to compile but is *very* > ugly and can cause an effect similar to tear gas on sensitive eyes ;). I also forgot to include for the declaration of intmax_t. Use of double underscores in applications is also bad for the eyes. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 17:01:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E3B8905 for ; Fri, 13 Feb 2015 17:01:19 +0000 (UTC) Received: from nm19-vm0.bullet.mail.bf1.yahoo.com (nm19-vm0.bullet.mail.bf1.yahoo.com [98.139.213.162]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6069B4F for ; Fri, 13 Feb 2015 17:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423846871; bh=8VEP4ncQ0nnFdBznWxRUSZKXGWQSf4QHRoWcUOezw6Q=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=BOJhJ/TUfpSDroUIDhpgp0cjGBqPOMtLSVYvXoTZCUOHjN8zZe2VlxcsB6zN+4pLG8nkbu46hpAR3uAhwyjf10Kxfq5rIzAy3F+yY8O7pq78uBklSZpP5tf+JYZbo4e9kk19gVg7oMeYjud+kU6Y7N6yQLjX9NtZydWYCcdLyG9iRPsggYJeOs4IwPUGzIU6IP8h5yi21YbzZkYgw9qrvgXzJOI8Y9ksbvrIhqDFJYchcimYwjvoCxbk5aKvQW6U2vT6kHeyXyXg5l9EOHH+U4TSAK1qtCEaTRdivuhVBiJdj4MFG/+DnjRzrEYNCQDGhipEFb9SC31OX94IKFFNzg== Received: from [66.196.81.170] by nm19.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 17:01:11 -0000 Received: from [98.139.213.12] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 17:01:11 -0000 Received: from [127.0.0.1] by smtp112.mail.bf1.yahoo.com with NNFMP; 13 Feb 2015 17:01:11 -0000 X-Yahoo-Newman-Id: 774838.3979.bm@smtp112.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: N3v7OnAVM1kPKbuydZglnKZqsh4._opaXsqJtfmcfHyTd98 .g9gYSOJQrF7KMi1cr.j8C.MESMM8IcMpvqJubHvbU9UGNwxVqEb7Nm5n3X1 oMcLThajWvZyrPyB8tLJ8sAfnps58nHaWeBSTYA6zgUYXgRL7O4wBdLLULhn PGbQNs29K5Am2L_N_.bPdOlY1ExFT2ED6LLiDiDCW1m6H_wkiQr4MJyIQANZ Nfml0QQ59ifR3sYq_Na.0W0sR_bpMjCaVjA5.58DScPsFT4b5Qs2P_M3guW8 J6gQSyZJO6HvfnXfB3HK678mv3wSKrMEH2EIrxEwSruNPlhmtzIRydI9cNiU d9jJXd7MeEF2jPP9KryLQdhy5uQHGaqs1rExShY0zZWC0gclZu5Bg4a1_9Uw _UGrpp2JxgVx_Wh_DmjL1QTgR9Otch5.ZNbbjDqRUicPTTteG03uDJvP2Nfj .6M6n_DKZ0vfgpPcygGaNDKle4wVB54w5JgbOWI1KlYr4BqEPLZRADOTbfYK ZxX5tkOwmSBchTdf9FwILKf_VMnUb.Q-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DE2DE3.7050004@FreeBSD.org> Date: Fri, 13 Feb 2015 12:01:23 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> <20150214005543.X2210@besplex.bde.org> <54DE1FC9.4000503@FreeBSD.org> <20150214032839.E3221@besplex.bde.org> In-Reply-To: <20150214032839.E3221@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:01:19 -0000 On 02/13/15 11:46, Bruce Evans wrote: > On Fri, 13 Feb 2015, Pedro Giffuni wrote: > >> On 02/13/15 09:29, Bruce Evans wrote: >>> On Fri, 13 Feb 2015, Andrey Chernov wrote: >>> >>>> We even don't need to check arg excepting for < 0, because what is >>>> needed is rlimt_t and not arg. So this version will be better: >>>> >>>> rlimt_t targ; >>>> >>>> if (arg < 0) { >>>> errno = EINVAL; >>>> return (-1); >>>> } >>> >>> >>> This is reasonable, but not encouraged by the API or compatible with >>> what setrlimit() does with negative args. (setrlimit() still uses >>> my hack from 1994, of converting negative args to RLIM_INFINITY. In >>> 4.4BSD, it doesn't even check for negative args, and mostly stores >>> them unchanged; then undefined behaviour tends to occur when the >>> stored values are used without further checking.) >> >> Actually I think the above check would be OK according to POSIX: >> ... >> >> The /ulimit/() function shall fail and the limit shall be unchanged if: >> >> [EINVAL] >> The /cmd/ argument is not valid. >> ... > > I already partly explained that this is (part of) why POSIX discourages > returning EINVAL for the /data/ argument. EINVAL is for the /cmd/ > argument. No errno is specified for the /data/ argument. Instead, > the implementation is implicitly encourage to (if the requested value > is unrepresentable) invent some representable value and return the > result of setting it. We still often get EPERM if our invented value > cannot be set due to EPERM. Rounding makes EPERM even more likely > than ususal. E.g., if we start with RLIM_INFINITY and get and set it > using some implementations of this function, then rounding reduces > the hard rlimit. Then if a slightly different implementation tries > to increase the hard rlimit hack to RLIM_INFINITY, then this fails > with EPERM (except for root). Some preliminary attempts to fix the > warning would have caused this EPERM error for almost all error > cases, since non-error cases rounded down but error cases attempted > to raise to RLIM_INFINITY. > Oops.. OK, I am pretty bad reading specifications. >> ... >>> An incomplete fix with handling of negative values restored is >>> something >>> like: >>> >>> intmax_t targ; >>> >>> targ = arg; >>> if (targ > RLIM_INFINITY / 512) >>> targ = RLIM_INFINITY / 512; >>> limit.rlim_max = limit.rlim_cur = targ * 512 >>> >>> This is still incomplete. The comparison is still obviously >>> tautologous >>> when intmax_t == rlim_t (the amd64 case). If intmax_t is larger than >>> long (the i386 case) or even rlim_t (the notyet case), then it is >>> slightly >>> less obviously tautologous. This can be fixed by sprinkling volatiles, >>> e.g. for targ. >> >> I am passing this (with the check for negative values and __intmax_t) >> through the tinderbox. >> FWIW, I had something else that managed to compile but is *very* >> ugly and can cause an effect similar to tear gas on sensitive eyes ;). > > I also forgot to include for the declaration of intmax_t. > Use of double underscores in applications is also bad for the eyes. > OK. The patch passes tinderbox. The only missing thing is what to do about arg (iff it has to be adjusted). Pedro. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 17:33:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23A7926E; Fri, 13 Feb 2015 17:33:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D8DF68; Fri, 13 Feb 2015 17:33:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DHXSTI091387; Fri, 13 Feb 2015 17:33:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DHXSVb091385; Fri, 13 Feb 2015 17:33:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502131733.t1DHXSVb091385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 13 Feb 2015 17:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278682 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:33:29 -0000 Author: jhb Date: Fri Feb 13 17:33:27 2015 New Revision: 278682 URL: https://svnweb.freebsd.org/changeset/base/278682 Log: Make the extra dependencies in DPADD be dependencies of PROG_FULL and SHLIB_NAME_FULL so that the full binary is relinked when a dependency changes. Right now the existing full binary is left as-is and only the objcopy to remove debug symbols is run. Differential Revision: https://reviews.freebsd.org/D1834 Reviewed by: emaste MFC after: 3 days Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Feb 13 16:35:12 2015 (r278681) +++ head/share/mk/bsd.lib.mk Fri Feb 13 17:33:27 2015 (r278682) @@ -286,7 +286,7 @@ _EXTRADEPEND: mv $$TMP ${DEPENDFILE} .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) - echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE} + echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE} .endif .endif Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Feb 13 16:35:12 2015 (r278681) +++ head/share/mk/bsd.prog.mk Fri Feb 13 17:33:27 2015 (r278682) @@ -168,15 +168,15 @@ CLEANFILES+= ${OBJS} _EXTRADEPEND: .if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib) .if defined(DPADD) && !empty(DPADD) - echo ${PROG}: ${DPADD} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${DPADD} >> ${DEPENDFILE} .endif .else - echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) .if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++) - echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else - echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 17:36:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24A9B434; Fri, 13 Feb 2015 17:36:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FDB0FAF; Fri, 13 Feb 2015 17:36:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DHafIT091848; Fri, 13 Feb 2015 17:36:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DHafvh091847; Fri, 13 Feb 2015 17:36:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131736.t1DHafvh091847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 17:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278683 - in stable/10/sys/arm: conf tegra X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:36:42 -0000 Author: ian Date: Fri Feb 13 17:36:41 2015 New Revision: 278683 URL: https://svnweb.freebsd.org/changeset/base/278683 Log: MFC r267719: Remove the incomplete Tegra 2 code, nobody was maintaining it. The AC100 never booted to single user mode. (And now it is blocking the ability to MFC other changes since it is gone from -current and hasn't kept up with the other changes). Deleted: stable/10/sys/arm/conf/AC100 stable/10/sys/arm/tegra/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 17:37:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F15DD65C for ; Fri, 13 Feb 2015 17:37:28 +0000 (UTC) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89538FC1 for ; Fri, 13 Feb 2015 17:37:28 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hi2so13607271wib.1 for ; Fri, 13 Feb 2015 09:37:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MjfUn5/Yua0Y4hAHzYSRJxn4ihXWwTkQ0d583IPBVys=; b=hMCR0TGFnSBLJFAcbdV4qVqYiyvM+P7Ppo3LqPEY3payzWgE1BcoS2XIh7PN3fIJqj lt7LfiAhbZwSbQ42p/FJFtB/y37gxSfR279cVS/F+u0KC1Pbht+5cIRxZ3Btgy2BfPm3 bSTrR81abW8bF51wssoCdnDEfveHJX+ACCydDe3Kz1wLAQ4Niwg6/nfWu4pNcBSQfb/Z FCkIHTiNVr75OIhg+/+/c2WbE57QM8Ic5rSUt21Ac01drtp6IP0+Coi28w9aERekg1x0 wpUpiJfqUwPFCry4rlt8l1jsfyiDQo5/CAXKYqyedgaJmFgE07v3EnC6K6ghPm+MxD1q Cpvg== X-Gm-Message-State: ALoCoQklcskbswwtpJFe3UtCnI9ToJAd3H3RQYmNut8xS+5aBvLOzZeEyzveoT4pQzGnM1AISOJ0 X-Received: by 10.180.78.4 with SMTP id x4mr9210518wiw.86.1423849040662; Fri, 13 Feb 2015 09:37:20 -0800 (PST) Received: from [46.246.76.54] ([46.246.76.54]) by mx.google.com with ESMTPSA id uo6sm10900004wjc.49.2015.02.13.09.37.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Feb 2015 09:37:19 -0800 (PST) Message-ID: <54DE364E.4060203@freebsd.org> Date: Fri, 13 Feb 2015 20:37:18 +0300 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r278634 - head/lib/libc/gen References: <201502122107.t1CL7gaO004041@svn.freebsd.org> <54DD2A87.2050008@FreeBSD.org> <9A683D99-C1E9-4736-982C-69F583D3A40D@FreeBSD.org> <20150213172738.C1007@besplex.bde.org> <54DDABF2.9000201@freebsd.org> <54DDAEF6.3060900@freebsd.org> <20150214005543.X2210@besplex.bde.org> In-Reply-To: <20150214005543.X2210@besplex.bde.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Pedro Giffuni , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:37:29 -0000 On 13.02.2015 17:29, Bruce Evans wrote: >> if (arg < 0) { >> errno = EINVAL; >> return (-1); >> } > > > This is reasonable, but not encouraged by the API or compatible with > what setrlimit() does with negative args. (setrlimit() still uses > my hack from 1994, of converting negative args to RLIM_INFINITY. In > 4.4BSD, it doesn't even check for negative args, and mostly stores > them unchanged; then undefined behaviour tends to occur when the > stored values are used without further checking.) This hack should be removed from setrlimit() to catch real error. Any syscall should do basic arguments validation. This is true about ulimit() too, so it is not a syscall. If overflow happens before passing arg, it is better to report it than to convert blindly to RLIM_INFINITY. Somebody may decrement long limit value by fixed chunks and go beyond zero. I.e. situation is completely opposite: he means 0 limit, but you set it to INFINITY. So it is always better to report error to leave caller deal with it. If he needs a bigger than long limit, he should use setrlimit() directly, not ulimit(). -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 17:53:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 144AA9C5; Fri, 13 Feb 2015 17:53:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F86241; Fri, 13 Feb 2015 17:53:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DHrC3x000817; Fri, 13 Feb 2015 17:53:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DHrCRf000814; Fri, 13 Feb 2015 17:53:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131753.t1DHrCRf000814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 17:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278684 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:53:13 -0000 Author: ian Date: Fri Feb 13 17:53:11 2015 New Revision: 278684 URL: https://svnweb.freebsd.org/changeset/base/278684 Log: MFC r276803, r276808: Add accessors for the ARM CP15 performance monitor registers. Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block. Modified: stable/10/sys/arm/include/cpu-v6.h stable/10/sys/arm/include/cpu.h stable/10/sys/arm/include/sysreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpu-v6.h ============================================================================== --- stable/10/sys/arm/include/cpu-v6.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/cpu-v6.h Fri Feb 13 17:53:11 2015 (r278684) @@ -150,6 +150,35 @@ _RF0(cp15_id_isar4_get, CP15_ID_ISAR4(%0 _RF0(cp15_id_isar5_get, CP15_ID_ISAR5(%0)) _RF0(cp15_cbar_get, CP15_CBAR(%0)) +/* Performance Monitor registers */ + +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +#elif __ARM_ARCH > 6 +_RF0(cp15_pmcr_get, CP15_PMCR(%0)) +_WF1(cp15_pmcr_set, CP15_PMCR(%0)) +_RF0(cp15_pmcnten_get, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_set, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_clr, CP15_PMCNTENCLR(%0)) +_RF0(cp15_pmovsr_get, CP15_PMOVSR(%0)) +_WF1(cp15_pmovsr_set, CP15_PMOVSR(%0)) +_WF1(cp15_pmswinc_set, CP15_PMSWINC(%0)) +_RF0(cp15_pmselr_get, CP15_PMSELR(%0)) +_WF1(cp15_pmselr_set, CP15_PMSELR(%0)) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +_RF0(cp15_pmxevtyper_get, CP15_PMXEVTYPER(%0)) +_WF1(cp15_pmxevtyper_set, CP15_PMXEVTYPER(%0)) +_RF0(cp15_pmxevcntr_get, CP15_PMXEVCNTRR(%0)) +_WF1(cp15_pmxevcntr_set, CP15_PMXEVCNTRR(%0)) +_RF0(cp15_pmuserenr_get, CP15_PMUSERENR(%0)) +_WF1(cp15_pmuserenr_set, CP15_PMUSERENR(%0)) +_RF0(cp15_pminten_get, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_set, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_clr, CP15_PMINTENCLR(%0)) +#endif + #undef _FX #undef _RF0 #undef _WF0 @@ -205,14 +234,7 @@ tlb_flush_range_local(vm_offset_t sva, v } /* Broadcasting operations. */ -#ifndef SMP - -#define tlb_flush_all() tlb_flush_all_local() -#define tlb_flush_all_ng() tlb_flush_all_ng_local() -#define tlb_flush(sva) tlb_flush_local(sva) -#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) - -#else /* SMP */ +#if __ARM_ARCH >= 7 && defined SMP static __inline void tlb_flush_all(void) @@ -252,6 +274,13 @@ tlb_flush_range(vm_offset_t sva, vm_siz _CP15_TLBIMVAAIS(va); dsb(); } +#else /* SMP */ + +#define tlb_flush_all() tlb_flush_all_local() +#define tlb_flush_all_ng() tlb_flush_all_ng_local() +#define tlb_flush(sva) tlb_flush_local(sva) +#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) + #endif /* SMP */ /* @@ -267,14 +296,14 @@ icache_sync(vm_offset_t sva, vm_size_t s dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); #endif } dsb(); -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -287,7 +316,7 @@ icache_sync(vm_offset_t sva, vm_size_t s static __inline void icache_inv_all(void) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -305,7 +334,7 @@ dcache_wb_pou(vm_offset_t sva, vm_size_t dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/cpu.h Fri Feb 13 17:53:11 2015 (r278684) @@ -4,6 +4,7 @@ #ifndef MACHINE_CPU_H #define MACHINE_CPU_H +#include #include #include @@ -11,32 +12,14 @@ void cpu_halt(void); void swi_vm(void *); #ifdef _KERNEL +#if __ARM_ARCH >= 6 +#include +#endif static __inline uint64_t get_cyclecount(void) { -/* This '#if' asks the question 'Does CP15/SCC include performance counters?' */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ - || defined(CPU_MV_PJ4B) \ - || defined(CPU_CORTEXA) || defined(CPU_KRAIT) - uint32_t ccnt; - uint64_t ccnt64; - - /* - * Read PMCCNTR. Curses! Its only 32 bits. - * TODO: Fix this by catching overflow with interrupt? - */ -/* The ARMv6 vs ARMv7 divide is going to need a better way of - * distinguishing between them. - */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) - /* ARMv6 - Earlier model SCCs */ - __asm __volatile("mrc p15, 0, %0, c15, c12, 1": "=r" (ccnt)); -#else - /* ARMv7 - Later model SCCs */ - __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); -#endif - ccnt64 = (uint64_t)ccnt; - return (ccnt64); +#if __ARM_ARCH >= 6 + return cp15_pmccntr_get(); #else /* No performance counters, so use binuptime(9). This is slooooow */ struct bintime bt; Modified: stable/10/sys/arm/include/sysreg.h ============================================================================== --- stable/10/sys/arm/include/sysreg.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/sysreg.h Fri Feb 13 17:53:11 2015 (r278684) @@ -29,6 +29,11 @@ /* * Macros to make working with the System Control Registers simpler. + * + * Note that when register r0 is hard-coded in these definitions it means the + * cp15 operation neither reads nor writes the register, and r0 is used only + * because some syntatically-valid register name has to appear at that point to + * keep the asm parser happy. */ #ifndef MACHINE_SYSREG_H @@ -202,6 +207,26 @@ #endif /* + * CP15 C9 registers + */ +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +#define CP15_PMCCNTR(rr) p15, 0, rr, c15, c12, 1 /* PM Cycle Count Register */ +#elif __ARM_ARCH > 6 +#define CP15_PMCR(rr) p15, 0, rr, c9, c12, 0 /* Performance Monitor Control Register */ +#define CP15_PMCNTENSET(rr) p15, 0, rr, c9, c12, 1 /* PM Count Enable Set Register */ +#define CP15_PMCNTENCLR(rr) p15, 0, rr, c9, c12, 2 /* PM Count Enable Clear Register */ +#define CP15_PMOVSR(rr) p15, 0, rr, c9, c12, 3 /* PM Overflow Flag Status Register */ +#define CP15_PMSWINC(rr) p15, 0, rr, c9, c12, 4 /* PM Software Increment Register */ +#define CP15_PMSELR(rr) p15, 0, rr, c9, c12, 5 /* PM Event Counter Selection Register */ +#define CP15_PMCCNTR(rr) p15, 0, rr, c9, c13, 0 /* PM Cycle Count Register */ +#define CP15_PMXEVTYPER(rr) p15, 0, rr, c9, c13, 1 /* PM Event Type Select Register */ +#define CP15_PMXEVCNTRR(rr) p15, 0, rr, c9, c13, 2 /* PM Event Count Register */ +#define CP15_PMUSERENR(rr) p15, 0, rr, c9, c14, 0 /* PM User Enable Register */ +#define CP15_PMINTENSET(rr) p15, 0, rr, c9, c14, 1 /* PM Interrupt Enable Set Register */ +#define CP15_PMINTENCLR(rr) p15, 0, rr, c9, c14, 2 /* PM Interrupt Enable Clear Register */ +#endif + +/* * CP15 C10 registers */ /* Without LPAE this is PRRR, with LPAE it's MAIR0 */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:03:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60C63DB2; Fri, 13 Feb 2015 18:03:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BEF537F; Fri, 13 Feb 2015 18:03:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DI3p8B005838; Fri, 13 Feb 2015 18:03:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DI3pAA005837; Fri, 13 Feb 2015 18:03:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131803.t1DI3pAA005837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278685 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:03:51 -0000 Author: ian Date: Fri Feb 13 18:03:50 2015 New Revision: 278685 URL: https://svnweb.freebsd.org/changeset/base/278685 Log: MFC r276985: Store the shadow command/mode register in the softc, not a local static var. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 17:53:11 2015 (r278684) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:03:50 2015 (r278685) @@ -121,6 +121,7 @@ struct bcm_sdhci_softc { bus_dma_tag_t sc_dma_tag; bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; + uint32_t cmd_and_mode; }; static int bcm_sdhci_probe(device_t); @@ -344,6 +345,14 @@ bcm_sdhci_read_2(device_t dev, struct sd struct bcm_sdhci_softc *sc = device_get_softc(dev); uint32_t val = RD4(sc, off & ~3); + /* + * Standard 32-bit handling of command and transfer mode. + */ + if (off == SDHCI_TRANSFER_MODE) { + return (sc->cmd_and_mode >> 16); + } else if (off == SDHCI_COMMAND_FLAGS) { + return (sc->cmd_and_mode & 0x0000ffff); + } return ((val >> (off & 3)*8) & 0xffff); } @@ -378,16 +387,15 @@ static void bcm_sdhci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) { struct bcm_sdhci_softc *sc = device_get_softc(dev); - static uint32_t cmd_and_trandfer_mode; uint32_t val32; if (off == SDHCI_COMMAND_FLAGS) - val32 = cmd_and_trandfer_mode; + val32 = sc->cmd_and_mode; else val32 = RD4(sc, off & ~3); val32 &= ~(0xffff << (off & 3)*8); val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) - cmd_and_trandfer_mode = val32; + sc->cmd_and_mode = val32; else WR4(sc, off & ~3, val32); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:10:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF6C1F3C; Fri, 13 Feb 2015 18:10:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B02F3C8; Fri, 13 Feb 2015 18:10:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIA7si006733; Fri, 13 Feb 2015 18:10:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIA7BP006732; Fri, 13 Feb 2015 18:10:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131810.t1DIA7BP006732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278686 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:10:07 -0000 Author: ian Date: Fri Feb 13 18:10:06 2015 New Revision: 278686 URL: https://svnweb.freebsd.org/changeset/base/278686 Log: MFC r277025: Fix an off-by-one in ppsratecheck(). Modified: stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Fri Feb 13 18:03:50 2015 (r278685) +++ stable/10/sys/kern/kern_time.c Fri Feb 13 18:10:06 2015 (r278686) @@ -982,7 +982,7 @@ ppsratecheck(struct timeval *lasttime, i return (maxpps != 0); } else { (*curpps)++; /* NB: ignore potential overflow */ - return (maxpps < 0 || *curpps < maxpps); + return (maxpps < 0 || *curpps <= maxpps); } } From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:12:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A01915C; Fri, 13 Feb 2015 18:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55277661; Fri, 13 Feb 2015 18:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DICVt0010495; Fri, 13 Feb 2015 18:12:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DICVjX010494; Fri, 13 Feb 2015 18:12:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131812.t1DICVjX010494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278687 - stable/10/sys/dev/mmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:12:31 -0000 Author: ian Date: Fri Feb 13 18:12:30 2015 New Revision: 278687 URL: https://svnweb.freebsd.org/changeset/base/278687 Log: MFC r277026: Rate-limit error logging to 5 lines per second. Modified: stable/10/sys/dev/mmc/mmcsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmcsd.c ============================================================================== --- stable/10/sys/dev/mmc/mmcsd.c Fri Feb 13 18:10:06 2015 (r278686) +++ stable/10/sys/dev/mmc/mmcsd.c Fri Feb 13 18:12:30 2015 (r278687) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -86,6 +87,8 @@ struct mmcsd_softc { daddr_t eblock, eend; /* Range remaining after the last erase. */ int running; int suspend; + int log_count; + struct timeval log_time; }; static const char *errmsg[] = @@ -99,6 +102,8 @@ static const char *errmsg[] = "NO MEMORY" }; +#define LOG_PPS 5 /* Log no more than 5 errors per second. */ + /* bus entry points */ static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); @@ -367,8 +372,10 @@ mmcsd_rw(struct mmcsd_softc *sc, struct } MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { - device_printf(dev, "Error indicated: %d %s\n", - req.cmd->error, mmcsd_errmsg(req.cmd->error)); + if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + device_printf(dev, "Error indicated: %d %s\n", + req.cmd->error, mmcsd_errmsg(req.cmd->error)); + } break; } block += numblocks; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:13:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9827290; Fri, 13 Feb 2015 18:13:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9E766C; Fri, 13 Feb 2015 18:13:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIDhCC010690; Fri, 13 Feb 2015 18:13:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIDhcL010689; Fri, 13 Feb 2015 18:13:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131813.t1DIDhcL010689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278688 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:13:43 -0000 Author: ian Date: Fri Feb 13 18:13:42 2015 New Revision: 278688 URL: https://svnweb.freebsd.org/changeset/base/278688 Log: MFC r277027: Handle the possibility that SDHCI_PLATFORM_START_TRANSFER() can fail. Modified: stable/10/sys/dev/sdhci/sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 18:12:30 2015 (r278687) +++ stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 18:13:42 2015 (r278688) @@ -985,7 +985,6 @@ sdhci_finish_data(struct sdhci_slot *slo { struct mmc_data *data = slot->curcmd->data; - slot->data_done = 1; /* Interrupt aggregation: Restore command interrupt. * Auxiliary restore point for the case when data interrupt * happened first. */ @@ -994,7 +993,7 @@ sdhci_finish_data(struct sdhci_slot *slo slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (slot->flags & SDHCI_USE_DMA) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { if (data->flags & MMC_DATA_READ) { size_t left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1005,6 +1004,7 @@ sdhci_finish_data(struct sdhci_slot *slo bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTWRITE); } + slot->data_done = 1; /* If there was error - reset the host. */ if (slot->curcmd->error) { sdhci_reset(slot, SDHCI_RESET_CMD); @@ -1172,12 +1172,7 @@ sdhci_data_irq(struct sdhci_slot *slot, } if (slot->curcmd->error) { /* No need to continue after any error. */ - if (slot->flags & PLATFORM_DATA_STARTED) { - slot->flags &= ~PLATFORM_DATA_STARTED; - SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); - } else - sdhci_finish_data(slot); - return; + goto done; } /* Handle PIO interrupt. */ @@ -1234,6 +1229,15 @@ sdhci_data_irq(struct sdhci_slot *slot, } else sdhci_finish_data(slot); } +done: + if (slot->curcmd != NULL && slot->curcmd->error != 0) { + if (slot->flags & PLATFORM_DATA_STARTED) { + slot->flags &= ~PLATFORM_DATA_STARTED; + SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); + } else + sdhci_finish_data(slot); + return; + } } static void From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:16:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4F923D9; Fri, 13 Feb 2015 18:16:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96739683; Fri, 13 Feb 2015 18:16:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIG93E011094; Fri, 13 Feb 2015 18:16:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIG9s0011093; Fri, 13 Feb 2015 18:16:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131816.t1DIG9s0011093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278689 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:16:09 -0000 Author: ian Date: Fri Feb 13 18:16:08 2015 New Revision: 278689 URL: https://svnweb.freebsd.org/changeset/base/278689 Log: MFC r277028, r277038: Check for and handle failures of bus_dmamap_load(). Handle dma mappings with more than one segment for rpi sdhci. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:13:42 2015 (r278688) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:16:08 2015 (r278689) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #define BCM2835_DEFAULT_SDHCI_FREQ 50 #define BCM_SDHCI_BUFFER_SIZE 512 +#define NUM_DMA_SEGS 2 #ifdef DEBUG #define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -94,10 +95,6 @@ TUNABLE_INT("hw.bcm2835.sdhci.min_freq", TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); -struct bcm_sdhci_dmamap_arg { - bus_addr_t sc_dma_busaddr; -}; - struct bcm_sdhci_softc { device_t sc_dev; struct mtx sc_mtx; @@ -122,6 +119,11 @@ struct bcm_sdhci_softc { bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; uint32_t cmd_and_mode; + bus_addr_t dmamap_seg_addrs[NUM_DMA_SEGS]; + bus_size_t dmamap_seg_sizes[NUM_DMA_SEGS]; + int dmamap_seg_count; + int dmamap_seg_index; + int dmamap_status; }; static int bcm_sdhci_probe(device_t); @@ -138,16 +140,19 @@ static void bcm_sdhci_dma_intr(int ch, v mtx_unlock(&_sc->sc_mtx); static void -bcm_dmamap_cb(void *arg, bus_dma_segment_t *segs, - int nseg, int err) +bcm_sdhci_dmacb(void *arg, bus_dma_segment_t *segs, int nseg, int err) { - bus_addr_t *addr; + struct bcm_sdhci_softc *sc = arg; + int i; - if (err) - return; + sc->dmamap_status = err; + sc->dmamap_seg_count = nseg; - addr = (bus_addr_t*)arg; - *addr = segs[0].ds_addr; + /* Note nseg is guaranteed to be zero if err is non-zero. */ + for (i = 0; i < nseg; i++) { + sc->dmamap_seg_addrs[i] = segs[i].ds_addr; + sc->dmamap_seg_sizes[i] = segs[i].ds_len; + } } static int @@ -245,7 +250,7 @@ bcm_sdhci_attach(device_t dev) err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - BCM_SDHCI_BUFFER_SIZE, 1, BCM_SDHCI_BUFFER_SIZE, + BCM_SDHCI_BUFFER_SIZE, NUM_DMA_SEGS, BCM_SDHCI_BUFFER_SIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->sc_dma_tag); @@ -424,19 +429,79 @@ bcm_sdhci_min_freq(device_t dev, struct } static void +bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) +{ + struct sdhci_slot *slot; + vm_paddr_t pdst, psrc; + int err, idx, len, sync_op; + + slot = &sc->sc_slot; + idx = sc->dmamap_seg_index++; + len = sc->dmamap_seg_sizes[idx]; + slot->offset += len; + + if (slot->curcmd->data->flags & MMC_DATA_READ) { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + psrc = sc->sc_sdhci_buffer_phys; + pdst = sc->dmamap_seg_addrs[idx]; + sync_op = BUS_DMASYNC_PREREAD; + } else { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + psrc = sc->dmamap_seg_addrs[idx]; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + + /* + * When starting a new DMA operation do the busdma sync operation, and + * disable SDCHI data interrrupts because we'll be driven by DMA + * interrupts (or SDHCI error interrupts) until the IO is done. + */ + if (idx == 0) { + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | + SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(sc->sc_dev, &sc->sc_slot, SDHCI_SIGNAL_ENABLE, + slot->intmask); + } + + /* + * Start the DMA transfer. Only programming errors (like failing to + * allocate a channel) cause a non-zero return from bcm_dma_start(). + */ + err = bcm_dma_start(sc->sc_dma_ch, psrc, pdst, len); + KASSERT((err == 0), ("bcm2835_sdhci: failed DMA start")); +} + +static void bcm_sdhci_dma_intr(int ch, void *arg) { struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - bus_addr_t pmem; - vm_paddr_t pdst, psrc; - size_t len; int left, sync_op; mtx_lock(&slot->mtx); - len = bcm_dma_length(sc->sc_dma_ch); + /* + * If there are more segments for the current dma, start the next one. + * Otherwise unload the dma map and decide what to do next based on the + * status of the sdhci controller and whether there's more data left. + */ + if (sc->dmamap_seg_index < sc->dmamap_seg_count) { + bcm_sdhci_start_dma_seg(sc); + mtx_unlock(&slot->mtx); + return; + } + if (slot->curcmd->data->flags & MMC_DATA_READ) { sync_op = BUS_DMASYNC_POSTREAD; mask = SDHCI_INT_DATA_AVAIL; @@ -447,8 +512,8 @@ bcm_sdhci_dma_intr(int ch, void *arg) bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); bus_dmamap_unload(sc->sc_dma_tag, sc->sc_dma_map); - slot->offset += len; - sc->sc_dma_inuse = 0; + sc->dmamap_seg_count = 0; + sc->dmamap_seg_index = 0; left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); @@ -472,29 +537,20 @@ bcm_sdhci_dma_intr(int ch, void *arg) else { /* already available? */ if (reg & mask) { - sc->sc_dma_inuse = 1; /* ACK for DATA_AVAIL or SPACE_AVAIL */ bcm_sdhci_write_4(slot->bus, slot, SDHCI_INT_STATUS, mask); /* continue next DMA transfer */ - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + - slot->offset, left, bcm_dmamap_cb, &pmem, 0); - if (slot->curcmd->data->flags & MMC_DATA_READ) { - psrc = sc->sc_sdhci_buffer_phys; - pdst = pmem; - sync_op = BUS_DMASYNC_PREREAD; + slot->offset, left, bcm_sdhci_dmacb, sc, + BUS_DMA_NOWAIT) != 0 || sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + sdhci_finish_data(slot); } else { - psrc = pmem; - pdst = sc->sc_sdhci_buffer_phys; - sync_op = BUS_DMASYNC_PREWRITE; - } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); - if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, left)) { - /* XXX stop xfer, other error recovery? */ - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } } else { /* wait for next data by INT */ @@ -511,81 +567,61 @@ bcm_sdhci_dma_intr(int ch, void *arg) } static void -bcm_sdhci_read_dma(struct sdhci_slot *slot) +bcm_sdhci_read_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); - - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - paddr, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static void -bcm_sdhci_write_dma(struct sdhci_slot *slot) +bcm_sdhci_write_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); - - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREWRITE); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, paddr, - sc->sc_sdhci_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static int @@ -612,15 +648,11 @@ bcm_sdhci_start_transfer(device_t dev, s uint32_t *intmask) { - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - /* DMA transfer FIFO 1KB */ if (slot->curcmd->data->flags & MMC_DATA_READ) - bcm_sdhci_read_dma(slot); + bcm_sdhci_read_dma(dev, slot); else - bcm_sdhci_write_dma(slot); + bcm_sdhci_write_dma(dev, slot); } static void From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:29:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E2B071D; Fri, 13 Feb 2015 18:29:02 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46EC8810; Fri, 13 Feb 2015 18:29:01 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id A5D37D08EF; Fri, 13 Feb 2015 10:29:01 -0800 (PST) Date: Fri, 13 Feb 2015 10:29:01 -0800 From: hiren panchasara To: peter@holm.cc, Randall Stewart Subject: Re: svn commit: r278623 - head/sys/kern Message-ID: <20150213182901.GC19044@strugglingcoder.info> References: <201502121331.t1CDV9jR086269@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/" Content-Disposition: inline In-Reply-To: <201502121331.t1CDV9jR086269@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:29:02 -0000 --GZVR6ND4mMseVXL/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/12/15 at 01:31P, Randall Stewart wrote: > Author: rrs > Date: Thu Feb 12 13:31:08 2015 > New Revision: 278623 > URL: https://svnweb.freebsd.org/changeset/base/278623 >=20 > Log: > This fixes a bug I in-advertantly inserted when I updated the callout > code in my last commit. The cc_exec_next is used to track the next > when a direct call is being made from callout. It is *never* used > in the in-direct method. When macro-izing I made it so that it > would separate out direct/vs/non-direct. This is incorrect and can > cause panics as Peter Holm has found for me (Thanks so much Peter for > all your help in this). What this change does is restore that behavior > but also get rid of the cc_next from the array and instead make it > be part of the base callout structure. This way no one else will get > confused since we will never use it for non-direct. > =20 > Reviewed by: Peter Holm and more importantly tested by him ;-) > MFC after: 3 days. > Sponsored by: Netflix Inc. Can I get more info/backtraces for the panic, please? Cheers, Hiren --GZVR6ND4mMseVXL/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU3kJsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l0h4H/1rAFBQoF4rXpfI2JpMlmeA2 bYWKWzH6bATUhvAGKIVf/8kq7qqlXyjPDjm/uEd9qT4IOTZzuCKYZXqmFONa/IPb dql5CBS3bKwyqlQBUywtylKIkXDWKFqHaKO2twMUrjLQ9V9AD6LqbmbBVyuLldNe yNr16DKjfvfY7xEbduRZY1kGq+hbzFFMdIdGZadWiY1CmDFrOuAEKZUwioGigjGt UxJ4gfeEnvGBdQIQ0cdKTt4IybGg3mCzSKyEuPzZ5gHPdSnhSfYWn9rQQKaNGwFy 2gtsZFydLUrfddq8alm2wjVz5Ooj7sc12PP9/f3JaiWzunDHzAZylirGXB4bjBU= =9MGv -----END PGP SIGNATURE----- --GZVR6ND4mMseVXL/-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:32:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 875238BF; Fri, 13 Feb 2015 18:32:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D7A8D2; Fri, 13 Feb 2015 18:32:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIWumk020186; Fri, 13 Feb 2015 18:32:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIWu65020185; Fri, 13 Feb 2015 18:32:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201502131832.t1DIWu65020185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 13 Feb 2015 18:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278690 - head/usr.sbin/gssd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:32:56 -0000 Author: markj Date: Fri Feb 13 18:32:55 2015 New Revision: 278690 URL: https://svnweb.freebsd.org/changeset/base/278690 Log: Check for an error from daemon(3), and correct the check for an error from socket(2). MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/gssd/gssd.c Modified: head/usr.sbin/gssd/gssd.c ============================================================================== --- head/usr.sbin/gssd/gssd.c Fri Feb 13 18:16:08 2015 (r278689) +++ head/usr.sbin/gssd/gssd.c Fri Feb 13 18:32:55 2015 (r278690) @@ -193,7 +193,8 @@ main(int argc, char **argv) gssd_load_mech(); if (!debug_level) { - daemon(0, 0); + if (daemon(0, 0) != 0) + err(1, "Can't daemonize"); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGHUP, SIG_IGN); @@ -206,7 +207,7 @@ main(int argc, char **argv) strcpy(sun.sun_path, _PATH_GSSDSOCK); sun.sun_len = SUN_LEN(&sun); fd = socket(AF_LOCAL, SOCK_STREAM, 0); - if (!fd) { + if (fd < 0) { if (debug_level == 0) { syslog(LOG_ERR, "Can't create local gssd socket"); exit(1); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:34:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29C99A0D; Fri, 13 Feb 2015 18:34:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1575D8E0; Fri, 13 Feb 2015 18:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIY4vr020423; Fri, 13 Feb 2015 18:34:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIY4XM020422; Fri, 13 Feb 2015 18:34:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201502131834.t1DIY4XM020422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 13 Feb 2015 18:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278691 - head/usr.sbin/gssd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:34:05 -0000 Author: markj Date: Fri Feb 13 18:34:04 2015 New Revision: 278691 URL: https://svnweb.freebsd.org/changeset/base/278691 Log: Add an auto-generated file to CLEANFILES. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/gssd/Makefile Modified: head/usr.sbin/gssd/Makefile ============================================================================== --- head/usr.sbin/gssd/Makefile Fri Feb 13 18:32:55 2015 (r278690) +++ head/usr.sbin/gssd/Makefile Fri Feb 13 18:34:04 2015 (r278691) @@ -16,7 +16,7 @@ LIBADD+= krb5 roken CFLAGS+= -DWITHOUT_KERBEROS .endif -CLEANFILES= gssd_svc.c gssd.h +CLEANFILES= gssd_svc.c gssd_xdr.c gssd.h RPCSRC= ${.CURDIR}/../../sys/kgssapi/gssd.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:37:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0E31D6E; Fri, 13 Feb 2015 18:37:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A37E592C; Fri, 13 Feb 2015 18:37:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIbN7v020916; Fri, 13 Feb 2015 18:37:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIbNmn020915; Fri, 13 Feb 2015 18:37:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131837.t1DIbNmn020915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278692 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:37:24 -0000 Author: ian Date: Fri Feb 13 18:37:22 2015 New Revision: 278692 URL: https://svnweb.freebsd.org/changeset/base/278692 Log: MFC r275962: Clean up style of CUBIEBOARD2 config. Modified: stable/10/sys/arm/conf/CUBIEBOARD2 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 18:34:04 2015 (r278691) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 18:37:22 2015 (r278692) @@ -20,7 +20,7 @@ ident CUBIEBOARD2 -include "../allwinner/a20/std.a20" +include "../allwinner/a20/std.a20" makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" @@ -34,18 +34,18 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists +options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options MSDOSFS # MSDOS Filesystem +options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION @@ -78,15 +78,15 @@ options DDB # Enable the kernel debug #options BOOTP_WIRED_TO=cpsw0 # MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers -#device ahci # AHCI-compatible SATA controllers -#device ata # Legacy ATA/SATA controllers +#device ahci # AHCI-compatible SATA controllers +#device ata # Legacy ATA/SATA controllers #options ATA_STATIC_ID # Static device numbering # Console and misc @@ -98,8 +98,8 @@ device md device random # Entropy device # I2C support -#device iicbus -#device iic +#device iicbus +#device iic # GPIO device gpio @@ -114,8 +114,8 @@ device usb options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE -#device uhci -#device ohci +#device uhci +#device ohci device ehci device umass @@ -125,7 +125,7 @@ device loop device ether device mii device smscphy -#device cpsw +#device cpsw device bpf device emac From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 18:45:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62FF1FE7; Fri, 13 Feb 2015 18:45:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF50A03; Fri, 13 Feb 2015 18:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DIjlT0025517; Fri, 13 Feb 2015 18:45:47 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIjjHv025508; Fri, 13 Feb 2015 18:45:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502131845.t1DIjjHv025508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 18:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278693 - in stable/10: sys/kern tools/sched usr.bin/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:45:47 -0000 Author: sbruno Date: Fri Feb 13 18:45:44 2015 New Revision: 278693 URL: https://svnweb.freebsd.org/changeset/base/278693 Log: Revert r278650. Definite layer 8 bug. Submitted by: dhw and Thomas Mueller Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 18:45:44 2015 (r278693) @@ -583,9 +583,6 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -601,16 +598,11 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -628,8 +620,6 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -825,9 +815,6 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -843,8 +830,6 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -854,9 +839,6 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -873,8 +855,6 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:45:44 2015 (r278693) @@ -436,10 +436,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "spinning", "lockname:\"%s\"", - m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -447,9 +443,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "running"); continue; } } @@ -586,8 +579,6 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); - KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), - "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -613,8 +604,6 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); - KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), - "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:45:44 2015 (r278693) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -424,9 +423,6 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -434,23 +430,16 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); if (i != rowner_loops) continue; } @@ -770,9 +759,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -780,8 +766,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -793,16 +777,11 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 18:45:44 2015 (r278693) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -561,10 +560,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", - sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -573,14 +568,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -597,8 +587,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -861,9 +849,6 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -872,8 +857,6 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:45:44 2015 (r278693) @@ -150,7 +150,6 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; - char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -189,7 +188,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc, int cpu); +static void callout_cpu_init(struct callout_cpu *cc); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -284,7 +283,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc, timeout_cpu); + callout_cpu_init(cc); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -292,7 +291,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc, int cpu) +callout_cpu_init(struct callout_cpu *cc) { struct callout *c; int i; @@ -307,8 +306,6 @@ callout_cpu_init(struct callout_cpu *cc, cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); - snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), - "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -370,7 +367,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc, cpu); + callout_cpu_init(cc); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -677,8 +674,6 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } - KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", - "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -701,7 +696,6 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif - KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 18:45:44 2015 (r278693) @@ -70,7 +70,6 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), - ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -81,6 +80,8 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), + ("callwheel idle", "grey"), + ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -855,7 +856,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events) or i < 0): + if (i >= len(self.events)): return (None) event = self.events[i] return (event) @@ -902,6 +903,7 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} + self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/usr.bin/man/man.sh Fri Feb 13 18:45:44 2015 (r278693) @@ -276,8 +276,11 @@ man_check_for_so() { return 0 } +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable man_display_page() { - local IFS pipeline preconv_enc testline + local EQN NROFF PIC TBL TROFF REFER VGRIND + local IFS l nroff_dev pipeline preproc_arg tool # We are called with IFS set to colon. This causes really weird # things to happen for the variables that have spaces in them. @@ -309,49 +312,6 @@ man_display_page() { return fi - case "${manpage}" in - *.${man_charset}/*) - case "$man_charset" in - ISO8859-1) preconv_enc="latin-1" ;; - ISO8859-15) preconv_enc="latin-1" ;; - UTF-8) preconv_enc="utf-8" ;; - esac - ;; - esac - - if [ -n "$preconv_enc" ]; then - pipeline="preconv -e $preconv_enc |" - fi - testline="$pipeline mandoc -Tlint -Werror 2>/dev/null" - pipeline="$pipeline mandoc -Tlocale | $MANPAGER" - - if ! eval "$cattool $manpage | $testline" ;then - if which -s groff2; then - man_display_page_groff - else - echo "This manpage needs groff(1) to be rendered" >&2 - echo "First install groff(1): " >&2 - echo "pkg install groff " >&2 - ret=1 - fi - return - fi - - if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" - ret=0 - else - eval "$cattool $manpage | $pipeline" - ret=$? - fi -} - -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable -man_display_page_groff() { - local EQN NROFF PIC TBL TROFF REFER VGRIND - local IFS l nroff_dev pipeline preproc_arg tool - # So, we really do need to parse the manpage. First, figure out the # device flag (-T) we have to pass to eqn(1) and groff(1). Then, # setup the pipeline of commands based on the user's request. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 19:06:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 818E5685; Fri, 13 Feb 2015 19:06:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AAA8C6F; Fri, 13 Feb 2015 19:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DJ6O1p035386; Fri, 13 Feb 2015 19:06:24 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJ6MLN035380; Fri, 13 Feb 2015 19:06:22 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502131906.t1DJ6MLN035380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 19:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278694 - in stable/10: sys/kern tools/sched X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:06:24 -0000 Author: sbruno Date: Fri Feb 13 19:06:22 2015 New Revision: 278694 URL: https://svnweb.freebsd.org/changeset/base/278694 Log: MFC 272315 272757 274091 274902 for real this time r272315 Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. r272757 Add schedgraph traces for callout handlers. Specifically, a callwheel logs a running event each time it executes a callout function. The event includes the function pointer, argument, and whether or not it was run from hardware interrupt context. The callwheel is marked idle when each handler completes. This effectively logs the duration of each callout routine in the graph. r274091 Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. r274902 Add a new thread state "spinning" to schedgraph and add tracepoints at the start and stop of spinning waits in lock primitives. Reviewed by: jhb Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 19:06:22 2015 (r278694) @@ -583,6 +583,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -598,11 +601,16 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -620,6 +628,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -815,6 +825,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -830,6 +843,8 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -839,6 +854,9 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -855,6 +873,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 19:06:22 2015 (r278694) @@ -436,6 +436,10 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", + m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -443,6 +447,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "running"); continue; } } @@ -579,6 +586,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -604,6 +613,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 19:06:22 2015 (r278694) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -423,6 +424,9 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -430,16 +434,23 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i != rowner_loops) continue; } @@ -759,6 +770,9 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -766,6 +780,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -777,11 +793,16 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 19:06:22 2015 (r278694) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -560,6 +561,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", + sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -568,9 +573,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -587,6 +597,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -849,6 +861,9 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -857,6 +872,8 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 19:06:22 2015 (r278694) @@ -150,6 +150,7 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; + char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -188,7 +189,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc); +static void callout_cpu_init(struct callout_cpu *cc, int cpu); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -283,7 +284,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc); + callout_cpu_init(cc, timeout_cpu); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -291,7 +292,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc) +callout_cpu_init(struct callout_cpu *cc, int cpu) { struct callout *c; int i; @@ -306,6 +307,8 @@ callout_cpu_init(struct callout_cpu *cc) cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); + snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), + "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -367,7 +370,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc); + callout_cpu_init(cc, cpu); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -674,6 +677,8 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } + KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", + "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -696,6 +701,7 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif + KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 19:06:22 2015 (r278694) @@ -70,6 +70,7 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), + ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -80,8 +81,6 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), - ("callwheel idle", "grey"), - ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -288,6 +287,10 @@ class ColorConfigure(Toplevel): color = graph.getcolor(type[0]) if (color != ""): self.additem(type[0], color) + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() def additem(self, name, color): item = ColorConf(self.items, name, color) @@ -373,6 +376,10 @@ class SourceConfigure(Toplevel): self.addsource(source) self.drawbuttons() self.buttons.grid(row=1, column=0, sticky=W) + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() def addsource(self, source): if (self.irow > 30): @@ -487,6 +494,10 @@ class SourceStats(Toplevel): bd=1, relief=SUNKEN, width=10).grid( row=ypos, column=3, sticky=W+E) ypos += 1 + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() class SourceContext(Menu): @@ -529,6 +540,7 @@ class EventView(Toplevel): self.drawbuttons() event.displayref(canvas) self.bind("", self.destroycb) + self.bind("", self.destroycb) def destroycb(self, event): self.unbind("") @@ -856,7 +868,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) @@ -903,7 +915,6 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} - self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} @@ -1310,6 +1321,10 @@ class SchedGraph(Frame): self.pack(expand=1, fill="both") self.buildwidgets() self.layout() + self.bind_all("", self.quitcb) + + def quitcb(self, event): + self.quit() def buildwidgets(self): global status From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 19:11:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8EB6A97 for ; Fri, 13 Feb 2015 19:11:16 +0000 (UTC) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 7DD8FCC7 for ; Fri, 13 Feb 2015 19:11:16 +0000 (UTC) Received: (qmail 78425 invoked from network); 13 Feb 2015 19:11:08 -0000 Received: from 188.182.139.176 (HELO x2.osted.lan) (188.182.139.176) by relay00.pair.com with SMTP; 13 Feb 2015 19:11:08 -0000 X-pair-Authenticated: 188.182.139.176 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id t1DJB7vw031266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Feb 2015 20:11:07 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id t1DJB65f031265; Fri, 13 Feb 2015 20:11:06 +0100 (CET) (envelope-from pho) Date: Fri, 13 Feb 2015 20:11:06 +0100 From: Peter Holm To: hiren panchasara Subject: Re: svn commit: r278623 - head/sys/kern Message-ID: <20150213191106.GA30783@x2.osted.lan> References: <201502121331.t1CDV9jR086269@svn.freebsd.org> <20150213182901.GC19044@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150213182901.GC19044@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:11:16 -0000 On Fri, Feb 13, 2015 at 10:29:01AM -0800, hiren panchasara wrote: > On 02/12/15 at 01:31P, Randall Stewart wrote: > > Author: rrs > > Date: Thu Feb 12 13:31:08 2015 > > New Revision: 278623 > > URL: https://svnweb.freebsd.org/changeset/base/278623 > > > > Log: > > This fixes a bug I in-advertantly inserted when I updated the callout > > code in my last commit. The cc_exec_next is used to track the next > > when a direct call is being made from callout. It is *never* used > > in the in-direct method. When macro-izing I made it so that it > > would separate out direct/vs/non-direct. This is incorrect and can > > cause panics as Peter Holm has found for me (Thanks so much Peter for > > all your help in this). What this change does is restore that behavior > > but also get rid of the cc_next from the array and instead make it > > be part of the base callout structure. This way no one else will get > > confused since we will never use it for non-direct. > > > > Reviewed by: Peter Holm and more importantly tested by him ;-) > > MFC after: 3 days. > > Sponsored by: Netflix Inc. > > Can I get more info/backtraces for the panic, please? > Sure. These two panics were seen: http://people.freebsd.org/~pho/stress/log/rrs004.txt http://people.freebsd.org/~pho/stress/log/rrs005.txt - Peter From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 19:44:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FD82EA1; Fri, 13 Feb 2015 19:44:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A65FFE5; Fri, 13 Feb 2015 19:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DJi5Wf053952; Fri, 13 Feb 2015 19:44:05 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJi5Fn053951; Fri, 13 Feb 2015 19:44:05 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201502131944.t1DJi5Fn053951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Fri, 13 Feb 2015 19:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278695 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:44:05 -0000 Author: jmg Date: Fri Feb 13 19:44:04 2015 New Revision: 278695 URL: https://svnweb.freebsd.org/changeset/base/278695 Log: srandom has no influence on read_random, at least not this late... Modified: head/sys/dev/oce/oce_mbox.c Modified: head/sys/dev/oce/oce_mbox.c ============================================================================== --- head/sys/dev/oce/oce_mbox.c Fri Feb 13 19:06:22 2015 (r278694) +++ head/sys/dev/oce/oce_mbox.c Fri Feb 13 19:44:04 2015 (r278695) @@ -811,7 +811,6 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32 fwcmd->params.req.flush = OCE_FLUSH; fwcmd->params.req.if_id = LE_32(if_id); - srandom(arc4random()); /* random entropy seed */ read_random(fwcmd->params.req.hash, sizeof(fwcmd->params.req.hash)); rc = oce_rss_itbl_init(sc, fwcmd); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 19:52:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A89911E4; Fri, 13 Feb 2015 19:52:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92200127; Fri, 13 Feb 2015 19:52:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DJqHNb058568; Fri, 13 Feb 2015 19:52:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJqGU0058563; Fri, 13 Feb 2015 19:52:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131952.t1DJqGU0058563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 19:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278696 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:52:17 -0000 Author: ian Date: Fri Feb 13 19:52:16 2015 New Revision: 278696 URL: https://svnweb.freebsd.org/changeset/base/278696 Log: MFC r271220: Create a common i.MX53 config and use it with the two existing i.MX53 boards. Added: stable/10/sys/arm/conf/IMX53 - copied unchanged from r271220, head/sys/arm/conf/IMX53 Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/IMX53-QSB Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 19:44:04 2015 (r278695) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 19:52:16 2015 (r278696) @@ -17,51 +17,13 @@ # # $FreeBSD$ -ident DIGI-CCWMX53 +#NO_UNIVERSE -include "../freescale/imx/std.imx53" +include "IMX53" +ident DIGI-CCWMX53 makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - # required for netbooting #options BOOTP #options BOOTP_COMPAT @@ -71,117 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -#device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -device ata -device atapci # Only for helper functions -device imxata -options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - -# MMC -#device sdhci # SD controller -#device mmc # SD/MMC protocol -#device mmcsd # SDCard disk device - - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=digi-ccwmx53.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device vt -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 Copied: stable/10/sys/arm/conf/IMX53 (from r271220, head/sys/arm/conf/IMX53) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/IMX53 Fri Feb 13 19:52:16 2015 (r278696, copy of r271220, head/sys/arm/conf/IMX53) @@ -0,0 +1,173 @@ +# Kernel configuration for i.MX53 boards +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident IMX53 + +include "../freescale/imx/std.imx53" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options DEBUG + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options INCLUDE_CONFIG_FILE # Include this file in kernel +options VFP # vfp/neon + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +options DDB # Support DDB. +#options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# Ethernet +device ffec # Freescale Fast Ethernet Controller +device miibus # Standard mii bus + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +device ata +device atapci # Only for helper functions +device imxata +options ATA_STATIC_ID # Static device numbering + +device gpio +device gpioled + +device fsliic +device iic +device iicbus + +# SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +#device ukbd # Allow keyboard like HIDs to control console +device ums + +# USB Ethernet, requires miibus +#device miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs + +# Watchdog timer. +# WARNING: can't be disabled!!! +device imxwdt # Watchdog + +# Wireless NIC cards +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# MMC +#device sdhci # SD controller +#device mmc # SD/MMC protocol +#device mmcsd # SDCard disk device + + +# Flattened Device Tree +options FDT + +# NOTE: serial console will be disabled if syscons enabled +# Uncomment following lines for framebuffer/syscons support +#device sc +#device vt +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 19:44:04 2015 (r278695) +++ stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 19:52:16 2015 (r278696) @@ -17,49 +17,12 @@ # # $FreeBSD$ -ident IMX53-QSB - -include "../freescale/imx/std.imx53" +#NO_UNIVERSE -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG +include "IMX53" +ident IMX53-QSB options HZ=250 # 4ms scheduling quantum -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon # required for netbooting #options BOOTP @@ -70,111 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -#device ata -#device atapci # Only for helper functions -#device imxata -#options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -#options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -#device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -#device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=imx53-qsb.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 - From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 19:58:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69A8745E; Fri, 13 Feb 2015 19:58:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54C6C172; Fri, 13 Feb 2015 19:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DJws5c059547; Fri, 13 Feb 2015 19:58:54 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJws4S059546; Fri, 13 Feb 2015 19:58:54 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201502131958.t1DJws4S059546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 13 Feb 2015 19:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278697 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:58:54 -0000 Author: alc Date: Fri Feb 13 19:58:53 2015 New Revision: 278697 URL: https://svnweb.freebsd.org/changeset/base/278697 Log: Preset the object's color, or alignment, to maximize superpage usage. MFC after: 5 days Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Fri Feb 13 19:52:16 2015 (r278696) +++ head/sys/kern/sysv_shm.c Fri Feb 13 19:58:53 2015 (r278697) @@ -706,9 +706,10 @@ shmget_allocate_segment(td, uap, mode) #endif return (ENOMEM); } + shm_object->pg_color = 0; VM_OBJECT_WLOCK(shm_object); vm_object_clear_flag(shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shm_object); shmseg->object = shm_object; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:05:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65ABA616; Fri, 13 Feb 2015 20:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4700123F; Fri, 13 Feb 2015 20:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DK5cex064091; Fri, 13 Feb 2015 20:05:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DK5bGf064089; Fri, 13 Feb 2015 20:05:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132005.t1DK5bGf064089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278698 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:05:38 -0000 Author: ian Date: Fri Feb 13 20:05:37 2015 New Revision: 278698 URL: https://svnweb.freebsd.org/changeset/base/278698 Log: MFC r263245, r269233, r267101, r275961: Config style cleanups. Some of these are effectively record-only merges, because the actual merge happened during conflict resolution of some prior merge. Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 19:58:53 2015 (r278697) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:05:37 2015 (r278698) @@ -21,140 +21,140 @@ ident IMX6 include "../freescale/imx/std.imx6" options HZ=500 # Scheduling quantum is 2 milliseconds. -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options INCLUDE_CONFIG_FILE # Include this file in kernel +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: -options KDB # Enable kernel debugger support. +options KDB # Enable kernel debugger support. # For minimum debugger support use KDB_TRACE, for interactive use DDB. -#options KDB_TRACE # Print a stack trace for a panic. -options DDB # Support DDB. +#options KDB_TRACE # Print a stack trace for a panic. +options DDB # Support DDB. # For full debugger support use this instead: -#options GDB # Support remote GDB. +#options GDB # Support remote GDB. # Other debugging options... makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEBUG -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles +options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. +#options DEBUG +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling +device loop # Network loopback +device random # Entropy device +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" #device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module -device ether # Ethernet support -device miibus # Required for ethernet -device bpf # Berkeley packet filter (required for DHCP) +#device gif # IPv6 and IPv4 tunneling +#device firmware # firmware assist module +device ether # Ethernet support +device miibus # Required for ethernet +device bpf # Berkeley packet filter (required for DHCP) # General-purpose input/output device gpio # Serial (COM) ports -device uart # Multi-uart driver +device uart # Multi-uart driver # SDCard -device sdhci # SD controller -device mmc # SD/MMC protocol -device mmcsd # SDCard disk device +device sdhci # SD controller +device mmc # SD/MMC protocol +device mmcsd # SDCard disk device # SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) # USB support -#options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -device uhid # "Human Interface Devices" -device u3g # USB modems -#device ukbd # Allow keyboard like HIDs to control console -#device ums # USB mouse +#options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +device u3g # USB modems +#device ukbd # Allow keyboard like HIDs to control console +#device ums # USB mouse # USB Ethernet, requires miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB # USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs +#device rum # Ralink Technology RT2501USB wireless NICs # Wireless NIC cards -#device wlan # 802.11 support -#device wlan_wep # 802.11 WEP support -#device wlan_ccmp # 802.11 CCMP support -#device wlan_tkip # 802.11 TKIP support -#device wlan_amrr # AMRR transmit rate control algorithm +#device wlan # 802.11 support +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_amrr # AMRR transmit rate control algorithm # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support # Wandboard has no video console support yet. -#device sc -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 +#device sc +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 # required for netbooting -#options BOOTP -#options BOOTP_COMPAT -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 +#options BOOTP +#options BOOTP_COMPAT +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 # U-Boot stuff lives on slice 1, FreeBSD on slice 2. -options ROOTDEVNAME=\"ufs:mmcsd0s2a\" +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # ARM and SoC-specific options -options FDT # Configure using FDT/DTB data. -options SMP # Enable multiple cores -options VFP # Enable floating point hardware support -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options FDT # Configure using FDT/DTB data. +options SMP # Enable multiple cores +options VFP # Enable floating point hardware support +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) # SoC-specific devices -device ffec # Freescale Fast Ethernet Controller -device fsliic # Freescale i2c/iic -device iic # iic protocol -device iicbus # iic bus -#device imxwdt # Watchdog. WARNING: can't be disabled!!! +device ffec # Freescale Fast Ethernet Controller +device fsliic # Freescale i2c/iic +device iic # iic protocol +device iicbus # iic bus +#device imxwdt # Watchdog. WARNING: can't be disabled!!! Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Fri Feb 13 19:58:53 2015 (r278697) +++ stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:05:37 2015 (r278698) @@ -71,8 +71,6 @@ device pty # Comment following lines for boot console on serial port device vt device kbdmux -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 device ukbd device sdhci From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:15:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C8C92A; Fri, 13 Feb 2015 20:15:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3276D369; Fri, 13 Feb 2015 20:15:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKFDvm068843; Fri, 13 Feb 2015 20:15:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKFAEO068828; Fri, 13 Feb 2015 20:15:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132015.t1DKFAEO068828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278699 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:15:13 -0000 Author: ian Date: Fri Feb 13 20:15:10 2015 New Revision: 278699 URL: https://svnweb.freebsd.org/changeset/base/278699 Log: MFC r276003: Start to clean up the armv6 kernel configs by reducing the diff between them in the first sections and the later FDT support. Modified: stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/IMX53 stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/conf/VYBRID stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,22 @@ # # Custom kernel for Marvell Armada XP # -# $FreeBSD$ +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. # +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ ident MV-88F78XX0 include "../mv/armadaxp/std.mv78x60" @@ -10,58 +24,75 @@ include "../mv/armadaxp/std.mv78x60" options SOC_MV_ARMADAXP makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" +options HZ=1000 #options SCHED_ULE # ULE scheduler options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options NFSCL # Network Filesystem Client +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=mge0 - +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT -options ROOTDEVNAME=\"ufs:/dev/da0p1\" - +options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options MUTEX_NOINLINE -options RWLOCK_NOINLINE -options NO_FFS_SNAPSHOT -options NO_SWAPPING -options VFP - -options SMP +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging -#options VERBOSE_SYSINIT +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options VERBOSE_SYSINIT # Enable verbose sysinit messages options ALT_BREAK_TO_DEBUGGER -options DDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger options GDB -#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options KDB_TRACE +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DIAGNOSTIC #options KTR #options KTR_VERBOSE=0 #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB + +# NFS root from boopt/dhcp +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +options ROOTDEVNAME=\"ufs:/dev/da0p1\" + +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING # Pseudo devices device random @@ -94,14 +125,13 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 options DEVICE_POLLING device vlan #PCI/PCIE device pci -#FDT -options FDT +# Flattened Device Tree +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db78460.dts Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 20:15:10 2015 (r278699) @@ -1,10 +1,11 @@ +# # BEAGLEBONE -- Custom configuration for the BeagleBone ARM development # platforms, check out http://www.beagleboard.org/bone and # http://www.beagleboard.org/black. This kernel config file is used for the # original BeagleBone and the BeagleBone Black. # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -28,36 +29,46 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -65,19 +76,19 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL +# NFS server support #options NFSD -options NFSLOCKD -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -89,9 +100,6 @@ device iic device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - device am335x_rtc # RTC support (power management only) # Console and misc @@ -149,6 +157,6 @@ device usb_template # Control of th device usfs # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=beaglebone.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=beaglebone.dts Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # CUBIEBOARD -- Custom configuration for the CUBIEBOARD ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -27,36 +28,46 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +75,20 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,7 +139,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # CUBIEBOARD2 -- Custom configuration for the CUBIEBOARD2 ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -27,36 +28,47 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +76,20 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,8 +140,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts -options SMP # Enable multiple cores Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Efika MX Smarttop/Smartbook boards # # For more information on this file, please read the config(5) manual page, @@ -23,32 +24,30 @@ include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking -#options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS #options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -59,16 +58,33 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon +options VFP # Enable floating point hardware support -# required for netbooting +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +#options GDB # Support remote GDB +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed + +# NFS root from boopt/dhcp #options BOOTP -#options BOOTP_COMPAT #options BOOTP_NFSROOT +#options BOOTP_COMPAT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 -# + options ROOTDEVNAME=\"ufs:ada0s2a\" @@ -163,9 +179,9 @@ device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=efikamx.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=efikamx.dts # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Samsung Exynos 5 SoC. # # For more information on this file, please read the config(5) manual page, @@ -20,70 +21,72 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID partition tables -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options SOFTUPDATES +options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE +options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -options SMP - -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +options ROOTDEVNAME=\"ufs:/dev/da0\" +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # generic sdhci -options ROOTDEVNAME=\"ufs:/dev/da0\" - # Pseudo devices device loop Modified: stable/10/sys/arm/conf/IMX53 ============================================================================== --- stable/10/sys/arm/conf/IMX53 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/IMX53 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for i.MX53 boards # # For more information on this file, please read the config(5) manual page, @@ -21,32 +22,29 @@ ident IMX53 include "../freescale/imx/std.imx53" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -57,27 +55,30 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE +options VFP # Enable floating point hardware support -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. +options DDB # Enable the kernel debugger +#options GDB # Support remote GDB options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! @@ -162,7 +163,7 @@ device wlan_amrr # AMRR transmit rate # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Freescale i.MX6 systems. # # For more information on this file, please read the config(5) manual page, @@ -20,7 +21,7 @@ ident IMX6 include "../freescale/imx/std.imx6" -options HZ=500 # Scheduling quantum is 2 milliseconds. +options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -31,42 +32,57 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support use KDB_TRACE, for interactive use DDB. -#options KDB_TRACE # Print a stack trace for a panic. -options DDB # Support DDB. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: +options DDB # Enable the kernel debugger #options GDB # Support remote GDB. # Other debugging options... -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEBUG #options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +# U-Boot stuff lives on slice 1, FreeBSD on slice 2. +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # Pseudo devices. device loop # Network loopback @@ -135,21 +151,8 @@ device u3g # USB modems #options SC_DFLT_FONT # compile font in #makeoptions SC_DFLT_FONT=cp437 -# required for netbooting -#options BOOTP -#options BOOTP_COMPAT -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 - -# U-Boot stuff lives on slice 1, FreeBSD on slice 2. -options ROOTDEVNAME=\"ufs:mmcsd0s2a\" - -# ARM and SoC-specific options -options FDT # Configure using FDT/DTB data. -options SMP # Enable multiple cores -options VFP # Enable floating point hardware support -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +# Flattened Device Tree +options FDT # Configure using FDT/DTB data # SoC-specific devices device ffec # Freescale Fast Ethernet Controller Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # PANDABOARD -- Custom configuration for the PandaBoard ARM development # platform, check out www.pandaboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -28,43 +29,52 @@ hints "PANDABOARD.hints" include "../ti/omap4/pandaboard/std.pandaboard" -#To statically compile in device wiring instead of /boot/device.hints makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" +makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon -options SMP # Enable multiple cores +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -72,14 +82,10 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL - -# NFS root -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:18:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4075CAE6; Fri, 13 Feb 2015 20:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4DC398; Fri, 13 Feb 2015 20:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKIUGv069281; Fri, 13 Feb 2015 20:18:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKIUpG069280; Fri, 13 Feb 2015 20:18:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132018.t1DKIUpG069280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278700 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:18:30 -0000 Author: ian Date: Fri Feb 13 20:18:29 2015 New Revision: 278700 URL: https://svnweb.freebsd.org/changeset/base/278700 Log: MFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi. Modified: stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:15:10 2015 (r278699) +++ stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:18:29 2015 (r278700) @@ -59,6 +59,7 @@ options VFP # Enable floating point h # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:21:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C5ECBD; Fri, 13 Feb 2015 20:21:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC368642; Fri, 13 Feb 2015 20:21:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKLE2e072690; Fri, 13 Feb 2015 20:21:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKLEot072689; Fri, 13 Feb 2015 20:21:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132021.t1DKLEot072689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278701 - stable/10/sys/arm/xilinx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:21:15 -0000 Author: ian Date: Fri Feb 13 20:21:13 2015 New Revision: 278701 URL: https://svnweb.freebsd.org/changeset/base/278701 Log: MFC r277265: Enable the snoop control unit during MP startup Modified: stable/10/sys/arm/xilinx/zy7_mp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/xilinx/zy7_mp.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_mp.c Fri Feb 13 20:18:29 2015 (r278700) +++ stable/10/sys/arm/xilinx/zy7_mp.c Fri Feb 13 20:21:13 2015 (r278701) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #define ZYNQ7_CPU1_ENTRY 0xfffffff0 +#define SCU_CONTROL_REG 0xf8f00000 +#define SCU_CONTROL_ENABLE (1 << 0) + void platform_mp_init_secondary(void) { @@ -64,7 +67,21 @@ platform_mp_probe(void) void platform_mp_start_ap(void) { + bus_space_handle_t scu_handle; bus_space_handle_t ocm_handle; + uint32_t scu_ctrl; + + /* Map in SCU control register. */ + if (bus_space_map(fdtbus_bs_tag, SCU_CONTROL_REG, 4, + 0, &scu_handle) != 0) + panic("platform_mp_start_ap: Couldn't map SCU config reg\n"); + + /* Set SCU enable bit. */ + scu_ctrl = bus_space_read_4(fdtbus_bs_tag, scu_handle, 0); + scu_ctrl |= SCU_CONTROL_ENABLE; + bus_space_write_4(fdtbus_bs_tag, scu_handle, 0, scu_ctrl); + + bus_space_unmap(fdtbus_bs_tag, scu_handle, 4); /* Map in magic location to give entry address to CPU1. */ if (bus_space_map(fdtbus_bs_tag, ZYNQ7_CPU1_ENTRY, 4, @@ -75,8 +92,10 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, ocm_handle, 0, pmap_kextract((vm_offset_t)mpentry)); + bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); + /* - * The SCU is enabled by the BOOTROM but I think the second CPU doesn't + * The SCU is enabled above but I think the second CPU doesn't * turn on filtering until after the wake-up below. I think that's why * things don't work if I don't put these cache ops here. Also, the * magic location, 0xfffffff0, isn't in the SCU's filtering range so it @@ -87,8 +106,6 @@ platform_mp_start_ap(void) /* Wake up CPU1. */ armv7_sev(); - - bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); } void From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:23:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0162BE04; Fri, 13 Feb 2015 20:23:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0181659; Fri, 13 Feb 2015 20:23:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKN6qN073459; Fri, 13 Feb 2015 20:23:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKN6v7073458; Fri, 13 Feb 2015 20:23:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132023.t1DKN6v7073458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278702 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:23:07 -0000 Author: ian Date: Fri Feb 13 20:23:06 2015 New Revision: 278702 URL: https://svnweb.freebsd.org/changeset/base/278702 Log: MFC r277305: Minor cleanups, comment changes. Modified: stable/10/sys/arm/arm/locore-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 20:21:13 2015 (r278701) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 20:23:06 2015 (r278702) @@ -367,9 +367,9 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lstart: - .word _edata - .word _ebss - .word svcstk + .word _edata /* Note that these three items are */ + .word _ebss /* loaded with a single ldmia and */ + .word svcstk /* must remain in order together. */ .Lmainreturned: .asciz "main() returned" @@ -425,20 +425,19 @@ ASENTRY_NP(mpentry) bl init_mmu - adr r1, .Lstart - ldmia r1, {r1, r2, sp} /* Set initial stack and */ - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 + adr r1, .Lstart+8 /* Get initstack pointer from */ + ldr sp, [r1] /* startup data. */ + mrc CP15_MPIDR(r0) /* Get processor id number. */ + and r0, r0, #0x0f mov r1, #INIT_ARM_STACK_SIZE - mul r2, r1, r0 - add sp, sp, r2 - str r1, [sp] + mul r2, r1, r0 /* Point sp to initstack */ + add sp, sp, r2 /* area for this processor. */ /* Switch to virtual addresses. */ ldr pc, =1f 1: mov fp, #0 /* trace back starts here */ - bl _C_LABEL(init_secondary) /* Off we go */ + bl _C_LABEL(init_secondary)/* Off we go, cpu id in r0. */ adr r0, .Lmpreturned b _C_LABEL(panic) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:38:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DDAE349; Fri, 13 Feb 2015 20:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC93C7F6; Fri, 13 Feb 2015 20:38:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKceuM079142; Fri, 13 Feb 2015 20:38:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKcefP079137; Fri, 13 Feb 2015 20:38:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132038.t1DKcefP079137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278703 - in stable/10/sys: arm/broadcom/bcm2835 dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:38:41 -0000 Author: ian Date: Fri Feb 13 20:38:39 2015 New Revision: 278703 URL: https://svnweb.freebsd.org/changeset/base/278703 Log: MFC r277306, r277307, r277346: Add defines for SDHCI 3.0 controllers. Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Save the command-and-flags value into shadow register when it is written. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 20:38:39 2015 (r278703) @@ -232,6 +232,7 @@ bcm_sdhci_attach(device_t dev) sc->sc_slot.caps |= (default_freq << SDHCI_CLOCK_BASE_SHIFT); sc->sc_slot.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL + | SDHCI_QUIRK_DONT_SET_HISPD_BIT | SDHCI_QUIRK_MISSING_CAPS; sdhci_init_slot(dev, &sc->sc_slot, 0); @@ -401,8 +402,11 @@ bcm_sdhci_write_2(device_t dev, struct s val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) sc->cmd_and_mode = val32; - else + else { WR4(sc, off & ~3, val32); + if (off == SDHCI_COMMAND_FLAGS) + sc->cmd_and_mode = val32; + } } static void Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 20:38:39 2015 (r278703) @@ -697,7 +697,8 @@ sdhci_generic_update_ios(device_t brdev, slot->hostctrl |= SDHCI_CTRL_4BITBUS; else slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; - if (ios->timing == bus_timing_hs) + if (ios->timing == bus_timing_hs && + !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; else slot->hostctrl &= ~SDHCI_CTRL_HISPD; Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/dev/sdhci/sdhci.h Fri Feb 13 20:38:39 2015 (r278703) @@ -61,6 +61,8 @@ #define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) /* Wait to see reset bit asserted before waiting for de-asserted */ #define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) +/* Leave controller in standard mode when putting card in HS mode. */ +#define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) /* * Controller registers @@ -169,6 +171,10 @@ #define SDHCI_INT_CARD_INSERT 0x00000040 #define SDHCI_INT_CARD_REMOVE 0x00000080 #define SDHCI_INT_CARD_INT 0x00000100 +#define SDHCI_INT_INT_A 0x00000200 +#define SDHCI_INT_INT_B 0x00000400 +#define SDHCI_INT_INT_C 0x00000800 +#define SDHCI_INT_RETUNE 0x00001000 #define SDHCI_INT_ERROR 0x00008000 #define SDHCI_INT_TIMEOUT 0x00010000 #define SDHCI_INT_CRC 0x00020000 @@ -180,6 +186,7 @@ #define SDHCI_INT_BUS_POWER 0x00800000 #define SDHCI_INT_ACMD12ERR 0x01000000 #define SDHCI_INT_ADMAERR 0x02000000 +#define SDHCI_INT_TUNEERR 0x04000000 #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 @@ -195,6 +202,7 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C +#define SDHCI_HOST_CONTROL2 0x3E #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -214,8 +222,31 @@ #define SDHCI_CAN_VDD_300 0x02000000 #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 +#define SDHCI_CAN_ASYNC_INTR 0x20000000 + +#define SDHCI_CAPABILITIES2 0x44 +#define SDHCI_CAN_SDR50 0x00000001 +#define SDHCI_CAN_SDR104 0x00000002 +#define SDHCI_CAN_DDR50 0x00000004 +#define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 +#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_RETUNE_CNT_MASK 0x00000F00 +#define SDHCI_RETUNE_CNT_SHIFT 8 +#define SDHCI_TUNE_SDR50 0x00002000 +#define SDHCI_RETUNE_MODES_MASK 0x0000C000 +#define SDHCI_RETUNE_MODES_SHIFT 14 +#define SDHCI_CLOCK_MULT_MASK 0x00FF0000 +#define SDHCI_CLOCK_MULT_SHIFT 16 #define SDHCI_MAX_CURRENT 0x48 +#define SDHCI_FORCE_AUTO_EVENT 0x50 +#define SDHCI_FORCE_INTR_EVENT 0x52 +#define SDHCI_ADMA_ERR 0x54 +#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ADDRESS_HI 0x5C +#define SDHCI_PRESET_VALUE 0x60 +#define SDHCI_SHARED_BUS_CTRL 0xE0 #define SDHCI_SLOT_INT_STATUS 0xFC From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:49:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF66F60E; Fri, 13 Feb 2015 20:49:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA5B88E2; Fri, 13 Feb 2015 20:49:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKniTw083947; Fri, 13 Feb 2015 20:49:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKnil1083945; Fri, 13 Feb 2015 20:49:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132049.t1DKnil1083945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 20:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278704 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:49:44 -0000 Author: ngie Date: Fri Feb 13 20:49:43 2015 New Revision: 278704 URL: https://svnweb.freebsd.org/changeset/base/278704 Log: Unbreak rcorder when MK_UNBOUND == no by moving local_unbound from REQUIRE: in NETWORKING to BEFORE: in the script MFC after: 2 weeks Modified: head/etc/rc.d/NETWORKING head/etc/rc.d/local_unbound Modified: head/etc/rc.d/NETWORKING ============================================================================== --- head/etc/rc.d/NETWORKING Fri Feb 13 20:38:39 2015 (r278703) +++ head/etc/rc.d/NETWORKING Fri Feb 13 20:49:43 2015 (r278704) @@ -6,7 +6,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf # REQUIRE: defaultroute routed route6d mroute6d resolv bridge -# REQUIRE: static_arp static_ndp local_unbound +# REQUIRE: static_arp static_ndp # This is a dummy dependency, for services which require networking # to be operational before starting. Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Fri Feb 13 20:38:39 2015 (r278703) +++ head/etc/rc.d/local_unbound Fri Feb 13 20:49:43 2015 (r278704) @@ -5,6 +5,7 @@ # PROVIDE: local_unbound # REQUIRE: FILESYSTEMS netif resolv +# BEFORE: NETWORKING # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:49:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649CE742; Fri, 13 Feb 2015 20:49:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8528E4; Fri, 13 Feb 2015 20:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKnogR084001; Fri, 13 Feb 2015 20:49:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKnoqq084000; Fri, 13 Feb 2015 20:49:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132049.t1DKnoqq084000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278705 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:49:50 -0000 Author: ian Date: Fri Feb 13 20:49:49 2015 New Revision: 278705 URL: https://svnweb.freebsd.org/changeset/base/278705 Log: MFC r277355: For armv6 builds, add -mfloat-abi=softfp. Modified: stable/10/share/mk/bsd.cpu.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.cpu.mk ============================================================================== --- stable/10/share/mk/bsd.cpu.mk Fri Feb 13 20:49:43 2015 (r278704) +++ stable/10/share/mk/bsd.cpu.mk Fri Feb 13 20:49:49 2015 (r278705) @@ -257,6 +257,10 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 CFLAGS += -G0 .endif +.if ${MACHINE_ARCH} == "armv6" +_CPUCFLAGS += -mfloat-abi=softfp +.endif + # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 20:52:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9BE598E; Fri, 13 Feb 2015 20:52:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B659C0; Fri, 13 Feb 2015 20:52:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DKqO4Y087850; Fri, 13 Feb 2015 20:52:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKqOCm087848; Fri, 13 Feb 2015 20:52:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132052.t1DKqOCm087848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 20:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278706 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:52:24 -0000 Author: ngie Date: Fri Feb 13 20:52:23 2015 New Revision: 278706 URL: https://svnweb.freebsd.org/changeset/base/278706 Log: Unbreak rcorder when MK_UTX == no by moving utx from REQUIRE: in LOGIN to BEFORE: in utx MFC after: 1 week Modified: head/etc/rc.d/LOGIN head/etc/rc.d/utx Modified: head/etc/rc.d/LOGIN ============================================================================== --- head/etc/rc.d/LOGIN Fri Feb 13 20:49:49 2015 (r278705) +++ head/etc/rc.d/LOGIN Fri Feb 13 20:52:23 2015 (r278706) @@ -4,7 +4,7 @@ # # PROVIDE: LOGIN -# REQUIRE: DAEMON utx +# REQUIRE: DAEMON # This is a dummy dependency to ensure user services such as xdm, # inetd, cron and kerberos are started after everything else, in case Modified: head/etc/rc.d/utx ============================================================================== --- head/etc/rc.d/utx Fri Feb 13 20:49:49 2015 (r278705) +++ head/etc/rc.d/utx Fri Feb 13 20:52:23 2015 (r278706) @@ -5,6 +5,7 @@ # PROVIDE: utx # REQUIRE: DAEMON FILESYSTEMS +# BEFORE: LOGIN # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:19:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AD76F74; Fri, 13 Feb 2015 21:19:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8399CC0D; Fri, 13 Feb 2015 21:19:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLJ4Dn098492; Fri, 13 Feb 2015 21:19:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJ4Vg098490; Fri, 13 Feb 2015 21:19:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132119.t1DLJ4Vg098490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278709 - in stable: 10/contrib/llvm/lib/Target/ARM 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/ARM 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:04 -0000 Author: dim Date: Fri Feb 13 21:19:02 2015 New Revision: 278709 URL: https://svnweb.freebsd.org/changeset/base/278709 Log: MFC r271025, r271029, r271030 (by sbruno): MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org Added: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 20:58:10 2015 (r278708) +++ stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 21:19:02 2015 (r278709) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function Copied: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff (from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Fri Feb 13 21:19:02 2015 (r278709, copy of r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:19:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B46C9F73; Fri, 13 Feb 2015 21:19:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB2BC0C; Fri, 13 Feb 2015 21:19:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLJ32c098482; Fri, 13 Feb 2015 21:19:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJ3Vq098480; Fri, 13 Feb 2015 21:19:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132119.t1DLJ3Vq098480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278709 - in stable: 10/contrib/llvm/lib/Target/ARM 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/ARM 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:03 -0000 Author: dim Date: Fri Feb 13 21:19:02 2015 New Revision: 278709 URL: https://svnweb.freebsd.org/changeset/base/278709 Log: MFC r271025, r271029, r271030 (by sbruno): MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org Added: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 20:58:10 2015 (r278708) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 21:19:02 2015 (r278709) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function Copied: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff (from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Fri Feb 13 21:19:02 2015 (r278709, copy of r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:19:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C94025E; Fri, 13 Feb 2015 21:19:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CDCBC1B; Fri, 13 Feb 2015 21:19:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLJuC6098653; Fri, 13 Feb 2015 21:19:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJsDu098648; Fri, 13 Feb 2015 21:19:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132119.t1DLJsDu098648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278710 - in stable/10: libexec share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:56 -0000 Author: ngie Date: Fri Feb 13 21:19:54 2015 New Revision: 278710 URL: https://svnweb.freebsd.org/changeset/base/278710 Log: MFC r277676: r277676: Add MK_TALK knob for building the talk and talkd Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_TALK - copied unchanged from r277676, head/tools/build/options/WITHOUT_TALK Modified: stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/libexec/Makefile Fri Feb 13 21:19:54 2015 (r278710) @@ -26,7 +26,6 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - talkd \ tcpd \ ${_telnetd} \ ${_tests} \ @@ -74,6 +73,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_TALK} != "no" +SUBDIR+= talkd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:19:54 2015 (r278710) @@ -357,6 +357,7 @@ __DEFAULT_YES_OPTIONS = \ SYMVER \ SYSCONS \ SYSINSTALL \ + TALK \ TCSH \ TELNET \ TEXTPROC \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:19:54 2015 (r278710) @@ -4221,6 +4221,13 @@ OLD_DIRS+=usr/share/doc/pjdfstest # to be filled in #.endif +.if ${MK_TALK} == no +OLD_FILES+=usr/bin/talk +OLD_FILES+=usr/libexec/ntalkd +OLD_FILES+=usr/share/man/man1/talk.1.gz +OLD_FILES+=usr/share/man/man8/talkd.8.gz +.endif + .if ${MK_TCSH} == no OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh Copied: stable/10/tools/build/options/WITHOUT_TALK (from r277676, head/tools/build/options/WITHOUT_TALK) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TALK Fri Feb 13 21:19:54 2015 (r278710, copy of r277676, head/tools/build/options/WITHOUT_TALK) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/usr.bin/Makefile Fri Feb 13 21:19:54 2015 (r278710) @@ -155,7 +155,6 @@ SUBDIR= alias \ systat \ tabs \ tail \ - talk \ tar \ tcopy \ tee \ @@ -336,6 +335,10 @@ SUBDIR+= rwho SUBDIR+= vacation .endif +.if ${MK_TALK} != "no" +SUBDIR+= talk +.endif + .if ${MK_TELNET} != "no" SUBDIR+= telnet .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:21:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B03553B4; Fri, 13 Feb 2015 21:21:33 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9BACC0; Fri, 13 Feb 2015 21:21:32 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1DLLScN033116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Feb 2015 00:21:28 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1DLLSfp033115; Sat, 14 Feb 2015 00:21:28 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 14 Feb 2015 00:21:28 +0300 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150213212128.GG15484@FreeBSD.org> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <1903622.i3cFFNVYcL@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1903622.i3cFFNVYcL@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers@freebsd.org, Eric van Gyzen , svn-src-all@freebsd.org, Randall Stewart , svn-src-head@freebsd.org, zont@FreeBSD.org, rstone@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:21:33 -0000 On Mon, Feb 09, 2015 at 03:11:21PM -0500, John Baldwin wrote: J> On Monday, February 09, 2015 07:28:12 PM Randall Stewart wrote: J> > Author: rrs J> > Date: Mon Feb 9 19:28:11 2015 J> > New Revision: 278472 J> > URL: https://svnweb.freebsd.org/changeset/base/278472 J> > J> > Log: J> > This fixes a bug in the way that the LLE timers for nd6 J> > and arp were being used. They basically would pass in the J> > mutex to the callout_init. Because they used this method J> > to the callout system, it was possible to "stop" the callout. J> > When flushing the table and you stopped the running callout, the J> > callout_stop code would return 1 indicating that it was going J> > to stop the callout (that was about to run on the callout_wheel blocked J> > by the function calling the stop). Now when 1 was returned, it would J> > lower the reference count one extra time for the stopped timer, then J> > a few lines later delete the memory. Of course the callout_wheel was J> > stuck in the lock code and would then crash since it was accessing J> > freed memory. By using callout_init(c, 1) we always get a 0 back J> > and the reference counting bug does not rear its head. We do have J> > to make a few adjustments to the callouts themselves though to make J> > sure it does the proper thing if rescheduled as well as gets the lock. J> > J> > Commented upon by hiren and sbruno J> > See Phabricator D1777 for more details. J> > J> > Commented upon by hiren and sbruno J> > Reviewed by: adrian, jhb and bz J> > Sponsored by: Netflix Inc. J> J> Eh, I looked at it, but I really, really don't like it. I think J> callout_init_*() should be preferred to CALLOUT_MPSAFE whenever possible as it J> is less race-prone. I think this should probably be fixed by adding Hans' J> callout_drain_async() instead, though this is fine as a temporary workaround. I second concerns. Please look at kern/165863 and r238990 that fixed it. Transition from CALLOUT_MPSAFE to callout_init_rw() was intentional and fixed races. I added to Cc guys who helped to track down that races. May be someone still has test scripts at hand. AFAIR, there were some that allowed to put a box down quite quickly. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:21:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F7C5D3; Fri, 13 Feb 2015 21:21:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A98CC9; Fri, 13 Feb 2015 21:21:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLLrLk002688; Fri, 13 Feb 2015 21:21:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLLqd9002682; Fri, 13 Feb 2015 21:21:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132121.t1DLLqd9002682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278712 - in stable/9: libexec share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:21:54 -0000 Author: ngie Date: Fri Feb 13 21:21:51 2015 New Revision: 278712 URL: https://svnweb.freebsd.org/changeset/base/278712 Log: MFstable/10 r278710: r278710: MFC r277676: r277676: Add MK_TALK knob for building the talk and talkd Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_TALK - copied unchanged from r278710, stable/10/tools/build/options/WITHOUT_TALK Modified: stable/9/libexec/Makefile stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/libexec/Makefile ============================================================================== --- stable/9/libexec/Makefile Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/libexec/Makefile Fri Feb 13 21:21:51 2015 (r278712) @@ -24,7 +24,6 @@ SUBDIR= ${_atrun} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - talkd \ tcpd \ ${_telnetd} \ tftpd \ @@ -67,6 +66,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_TALK} != "no" +SUBDIR+= talkd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:21:51 2015 (r278712) @@ -427,6 +427,7 @@ __DEFAULT_YES_OPTIONS = \ SYSINSTALL \ SYMVER \ SYSCONS \ + TALK \ TCSH \ TELNET \ TEXTPROC \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:51 2015 (r278712) @@ -3827,6 +3827,13 @@ OLD_FILES+=usr/share/sendmail/cf/sitecon # to be filled in #.endif +.if ${MK_TALK} == no +OLD_FILES+=usr/bin/talk +OLD_FILES+=usr/libexec/ntalkd +OLD_FILES+=usr/share/man/man1/talk.1.gz +OLD_FILES+=usr/share/man/man8/talkd.8.gz +.endif + .if ${MK_TCSH} == no OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh Copied: stable/9/tools/build/options/WITHOUT_TALK (from r278710, stable/10/tools/build/options/WITHOUT_TALK) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_TALK Fri Feb 13 21:21:51 2015 (r278712, copy of r278710, stable/10/tools/build/options/WITHOUT_TALK) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/usr.bin/Makefile Fri Feb 13 21:21:51 2015 (r278712) @@ -150,7 +150,6 @@ SUBDIR= alias \ systat \ tabs \ tail \ - talk \ tar \ tcopy \ tee \ @@ -311,6 +310,10 @@ SUBDIR+= rwho SUBDIR+= vacation .endif +.if ${MK_TALK} != "no" +SUBDIR+= talk +.endif + .if ${MK_TELNET} != "no" SUBDIR+= telnet .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:24:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD249864; Fri, 13 Feb 2015 21:24:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCEBCEA; Fri, 13 Feb 2015 21:24:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLOYQx003124; Fri, 13 Feb 2015 21:24:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLOX3l003120; Fri, 13 Feb 2015 21:24:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132124.t1DLOX3l003120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278713 - in stable/10: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:24:35 -0000 Author: ngie Date: Fri Feb 13 21:24:32 2015 New Revision: 278713 URL: https://svnweb.freebsd.org/changeset/base/278713 Log: MFC r277677: r277677: Add MK_BSDINSTALL knob for building and installing bsdinstall Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BSDINSTALL - copied unchanged from r277677, head/tools/build/options/WITHOUT_BSDINSTALL Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:24:32 2015 (r278713) @@ -261,6 +261,7 @@ __DEFAULT_YES_OPTIONS = \ BMAKE \ BOOT \ BSD_CPIO \ + BSDINSTALL \ BSNMP \ BZIP2 \ CALENDAR \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:24:32 2015 (r278713) @@ -399,6 +399,39 @@ OLD_DIRS+=usr/share/snmp/defs OLD_DIRS+=usr/share/snmp/mibs .endif +.if ${MK_BSDINSTALL} == no +OLD_FILES+=usr/libexec/bsdinstall/adduser +OLD_FILES+=usr/libexec/bsdinstall/auto +OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/checksum +OLD_FILES+=usr/libexec/bsdinstall/config +OLD_FILES+=usr/libexec/bsdinstall/distextract +OLD_FILES+=usr/libexec/bsdinstall/distfetch +OLD_FILES+=usr/libexec/bsdinstall/docsinstall +OLD_FILES+=usr/libexec/bsdinstall/entropy +OLD_FILES+=usr/libexec/bsdinstall/hostname +OLD_FILES+=usr/libexec/bsdinstall/jail +OLD_FILES+=usr/libexec/bsdinstall/keymap +OLD_FILES+=usr/libexec/bsdinstall/mirrorselect +OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/netconfig +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 +OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/rootpass +OLD_FILES+=usr/libexec/bsdinstall/script +OLD_FILES+=usr/libexec/bsdinstall/scriptedpart +OLD_FILES+=usr/libexec/bsdinstall/services +OLD_FILES+=usr/libexec/bsdinstall/time +OLD_FILES+=usr/libexec/bsdinstall/umount +OLD_FILES+=usr/libexec/bsdinstall/wlanconfig +OLD_FILES+=usr/libexec/bsdinstall/zfsboot +OLD_FILES+=usr/sbin/bsdinstall +OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz +OLD_FILES+=usr/share/man/man8/sade.8.gz +OLD_DIRS+=usr/libexec/bsdinstall +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar Copied: stable/10/tools/build/options/WITHOUT_BSDINSTALL (from r277677, head/tools/build/options/WITHOUT_BSDINSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BSDINSTALL Fri Feb 13 21:24:32 2015 (r278713, copy of r277677, head/tools/build/options/WITHOUT_BSDINSTALL) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/usr.sbin/Makefile Fri Feb 13 21:24:32 2015 (r278713) @@ -8,7 +8,6 @@ SUBDIR= adduser \ binmiscctl \ bootparamd \ bsdconfig \ - bsdinstall \ cdcontrol \ chkgrp \ chown \ @@ -132,6 +131,10 @@ SUBDIR+= autofs SUBDIR+= bluetooth .endif +.if ${MK_BSDINSTALL} != "no" +SUBDIR+= bsdinstall +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:25:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A583799C; Fri, 13 Feb 2015 21:25:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F2B5CFC; Fri, 13 Feb 2015 21:25:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLPwvD003386; Fri, 13 Feb 2015 21:25:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLPvXZ003380; Fri, 13 Feb 2015 21:25:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132125.t1DLPvXZ003380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278714 - in stable/9: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:25:58 -0000 Author: ngie Date: Fri Feb 13 21:25:56 2015 New Revision: 278714 URL: https://svnweb.freebsd.org/changeset/base/278714 Log: MFC r278713: r278713: MFC r277677: r277677: Add MK_BSDINSTALL knob for building and installing bsdinstall Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_BSDINSTALL - copied unchanged from r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL Modified: stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:25:56 2015 (r278714) @@ -344,6 +344,7 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ BOOT \ BSD_CPIO \ + BSDINSTALL \ BSNMP \ SOURCELESS \ SOURCELESS_HOST \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:25:56 2015 (r278714) @@ -568,6 +568,39 @@ OLD_DIRS+=usr/share/snmp/defs OLD_DIRS+=usr/share/snmp/mibs .endif +.if ${MK_BSDINSTALL} == no +OLD_FILES+=usr/libexec/bsdinstall/adduser +OLD_FILES+=usr/libexec/bsdinstall/auto +OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/checksum +OLD_FILES+=usr/libexec/bsdinstall/config +OLD_FILES+=usr/libexec/bsdinstall/distextract +OLD_FILES+=usr/libexec/bsdinstall/distfetch +OLD_FILES+=usr/libexec/bsdinstall/docsinstall +OLD_FILES+=usr/libexec/bsdinstall/entropy +OLD_FILES+=usr/libexec/bsdinstall/hostname +OLD_FILES+=usr/libexec/bsdinstall/jail +OLD_FILES+=usr/libexec/bsdinstall/keymap +OLD_FILES+=usr/libexec/bsdinstall/mirrorselect +OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/netconfig +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 +OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/rootpass +OLD_FILES+=usr/libexec/bsdinstall/script +OLD_FILES+=usr/libexec/bsdinstall/scriptedpart +OLD_FILES+=usr/libexec/bsdinstall/services +OLD_FILES+=usr/libexec/bsdinstall/time +OLD_FILES+=usr/libexec/bsdinstall/umount +OLD_FILES+=usr/libexec/bsdinstall/wlanconfig +OLD_FILES+=usr/libexec/bsdinstall/zfsboot +OLD_FILES+=usr/sbin/bsdinstall +OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz +OLD_FILES+=usr/share/man/man8/sade.8.gz +OLD_DIRS+=usr/libexec/bsdinstall +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar Copied: stable/9/tools/build/options/WITHOUT_BSDINSTALL (from r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_BSDINSTALL Fri Feb 13 21:25:56 2015 (r278714, copy of r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/usr.sbin/Makefile Fri Feb 13 21:25:56 2015 (r278714) @@ -8,7 +8,6 @@ SUBDIR= adduser \ bootparamd \ burncd \ bsdconfig \ - bsdinstall \ cdcontrol \ chkgrp \ chown \ @@ -150,6 +149,10 @@ SUBDIR+= rndc-confgen SUBDIR+= bluetooth .endif +.if ${MK_BSDINSTALL} != "no" +SUBDIR+= bsdinstall +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:26:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 248F8AD6; Fri, 13 Feb 2015 21:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F134D07; Fri, 13 Feb 2015 21:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLQjGP003568; Fri, 13 Feb 2015 21:26:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLQjYJ003567; Fri, 13 Feb 2015 21:26:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132126.t1DLQjYJ003567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 21:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278715 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:26:46 -0000 Author: ian Date: Fri Feb 13 21:26:45 2015 New Revision: 278715 URL: https://svnweb.freebsd.org/changeset/base/278715 Log: MFC r272605: Use -mfpu=none when building arm kernels. Modified: stable/10/sys/conf/Makefile.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/Makefile.arm ============================================================================== --- stable/10/sys/conf/Makefile.arm Fri Feb 13 21:25:56 2015 (r278714) +++ stable/10/sys/conf/Makefile.arm Fri Feb 13 21:26:45 2015 (r278715) @@ -41,6 +41,9 @@ STRIP_FLAGS = -S .if ${COMPILER_TYPE} != "clang" CFLAGS += -mno-thumb-interwork +.else +# We generally don't want fpu instructions in the kernel. +CFLAGS += -mfpu=none .endif .if empty(DDB_ENABLED) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:31:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57F1CCF; Fri, 13 Feb 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD9F7DC8; Fri, 13 Feb 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLVjAV007247; Fri, 13 Feb 2015 21:31:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLViKU007241; Fri, 13 Feb 2015 21:31:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132131.t1DLViKU007241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278716 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:31:46 -0000 Author: dim Date: Fri Feb 13 21:31:43 2015 New Revision: 278716 URL: https://svnweb.freebsd.org/changeset/base/278716 Log: MFC r271931: Add a few missing llvm/clang patches, update the other ones to be able to apply with the same patch options onto a fresh upstream llvm/clang 3.4.1 checkout, and use approximately the same header tempate for them. Added: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/10/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff (from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) @@ -0,0 +1,34 @@ +Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us +in line with gcc in base as this makes llvm generate code for the armv6k +variant of the instruction set. + +Introduced here: http://svnweb.freebsd.org/changeset/base/269387 + +Index: tools/clang/lib/Driver/ToolChain.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChain.cpp (revision 269386) ++++ tools/clang/lib/Driver/ToolChain.cpp (revision 269387) +@@ -183,7 +183,8 @@ static const char *getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp (revision 269386) ++++ tools/clang/lib/Driver/Tools.cpp (revision 269387) +@@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } Copied: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff (from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) @@ -0,0 +1,78 @@ +Pull in r216989 from upstream llvm trunk (by Renato Golin): + + MFV: Only emit movw on ARMv6T2+ + +Pull in r216990 from upstream llvm trunk (by Renato Golin): + + Missing test from r216989 + +Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain +test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS +in base doesn't understand this instruction for this target. One would need +to use --integrated-as to get this to build if desired. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271025 + +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td ++++ lib/Target/ARM/ARMInstrInfo.td +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function +Index: test/CodeGen/ARM/carry.ll +=================================================================== +--- test/CodeGen/ARM/carry.ll ++++ test/CodeGen/ARM/carry.ll +@@ -1,4 +1,4 @@ +-; RUN: llc < %s -march=arm | FileCheck %s ++; RUN: llc < %s -mtriple=armv6t2-eabi | FileCheck %s + + define i64 @f1(i64 %a, i64 %b) { + ; CHECK-LABEL: f1: +Index: test/CodeGen/ARM/pr18364-movw.ll +=================================================================== +--- test/CodeGen/ARM/pr18364-movw.ll ++++ test/CodeGen/ARM/pr18364-movw.ll +@@ -0,0 +1,34 @@ ++; RUN: llc < %s -mtriple=armv5te | FileCheck %s --check-prefix=V5 ++; RUN: llc < %s -mtriple=armv6 | FileCheck %s --check-prefix=V6 ++; RUN: llc < %s -mtriple=armv6t2 | FileCheck %s --check-prefix=V6T2 ++; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=V7 ++; PR18364 ++ ++define i64 @f() #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %y = alloca i64, align 8 ++ %z = alloca i64, align 8 ++ store i64 1, i64* %y, align 8 ++ store i64 11579764786944, i64* %z, align 8 ++ %0 = load i64* %y, align 8 ++ %1 = load i64* %z, align 8 ++ %sub = sub i64 %0, %1 ++ ret i64 %sub ++} ++ ++define i64 @g(i64 %a, i32 %b) #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %0 = mul i64 %a, 86400000 ++ %mul = add i64 %0, -210866803200000 ++ %conv = sext i32 %b to i64 ++ %add = add nsw i64 %mul, %conv ++ ret i64 %add ++} Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,8 +1,17 @@ -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 59ba47c..dddc7e7 100644 ---- a/lib/CodeGen/CGDebugInfo.cpp -+++ b/lib/CodeGen/CGDebugInfo.cpp -@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { +Pull in r200797 from upstream clang trunk (by Adrian Prantl): + + Debug info: fix a crasher when when emitting debug info for + not-yet-completed templated types. getTypeSize() needs a complete type. + + rdar://problem/15931354 + +Introduced here: http://svnweb.freebsd.org/changeset/base/271282 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedTy if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; @@ -16,36 +25,44 @@ index 59ba47c..dddc7e7 100644 return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); -diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp -new file mode 100644 -index 0000000..b2b7073 ---- /dev/null -+++ b/test/CodeGenCXX/debug-info-template-fwd.cpp -@@ -0,0 +1,27 @@ +Index: tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp ++++ tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s -+// This test is for a crash when emitting debug info for not-yet-completed -+// types. ++// This test is for a crash when emitting debug info for not-yet-completed types. +// Test that we don't actually emit a forward decl for the offending class: -+// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// CHECK: [ DW_TAG_class_type ] [Derived] {{.*}} [def] +// rdar://problem/15931354 -+template class Derived; ++typedef const struct __CFString * CFStringRef; ++template class Returner {}; ++typedef const __CFString String; + -+template class Base { -+ static Derived *create(); ++template class Derived; ++ ++template ++class Base ++{ ++ static Derived* create(); ++}; ++ ++template ++class Derived : public Base { ++public: ++ static void foo(); +}; + -+template struct Derived : Base { ++class Foo ++{ ++ Foo(); ++ static Returner > all(); +}; + -+Base *f; ++Foo::Foo(){} + -+// During the instantiation of Derived, Base becomes required to be -+// complete - since the declaration has already been emitted (due to 'f', -+// above), we immediately try to build debug info for Base which then -+// requires the (incomplete definition) of Derived which is problematic. -+// -+// (if 'f' is not present, the point at which Base becomes required to be -+// complete during the instantiation of Derived is a no-op because -+// Base was never emitted so we ignore it and carry on until we -+// wire up the base class of Derived in the debug info later on) -+Derived d; ++Returner > Foo::all() ++{ ++ Derived::foo(); ++ return Foo::all(); ++} Modified: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,18 +1,16 @@ -commit 96365aef99ec463375dfdaf6eb260823e0477b6a -Author: Adrian Prantl -Date: Tue Apr 1 17:52:06 2014 +0000 +Pull in r205331 from upstream clang trunk (by Adrian Prantl): - Debug info: fix a crash when emitting IndirectFieldDecls, which were - previously not handled at all. - rdar://problem/16348575 - - git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 82db942..2556cf9 100644 ---- tools/clang/lib/CodeGen/CGDebugInfo.cpp -+++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp -@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, +Introduced here: http://svnweb.freebsd.org/changeset/base/271432 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205330) ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205331) +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. @@ -21,11 +19,10 @@ index 82db942..2556cf9 100644 // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant -diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp -new file mode 100644 -index 0000000..131ceba ---- /dev/null -+++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +Index: tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 0) ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 205331) @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s +// Copied: stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff (from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) @@ -0,0 +1,64 @@ +Pull in r217410 from upstream llvm trunk (by Bob Wilson): + + Set trunc store action to Expand for all X86 targets. + + When compiling without SSE2, isTruncStoreLegal(F64, F32) would return + Legal, whereas with SSE2 it would return Expand. And since the Target + doesn't seem to actually handle a truncstore for double -> float, it + would just output a store of a full double in the space for a float + hence overwriting other bits on the stack. + + Patch by Luqman Aden! + +This should fix clang -O0 on i386 assigning garbage to floats, in +certain scenarios. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271597 + +Index: lib/Target/X86/X86ISelLowering.cpp +=================================================================== +--- lib/Target/X86/X86ISelLowering.cpp (revision 208032) ++++ lib/Target/X86/X86ISelLowering.cpp (working copy) +@@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationActions() { + setTruncStoreAction(MVT::i32, MVT::i8 , Expand); + setTruncStoreAction(MVT::i16, MVT::i8, Expand); + ++ setTruncStoreAction(MVT::f64, MVT::f32, Expand); ++ + // SETOEQ and SETUNE require checking two conditions. + setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); +@@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationActions() { + AddPromotedToType (ISD::SELECT, VT, MVT::v2i64); + } + +- setTruncStoreAction(MVT::f64, MVT::f32, Expand); +- + // Custom lower v2i64 and v2f64 selects. + setOperationAction(ISD::LOAD, MVT::v2f64, Legal); + setOperationAction(ISD::LOAD, MVT::v2i64, Legal); +Index: test/CodeGen/X86/dont-trunc-store-double-to-float.ll +=================================================================== +--- test/CodeGen/X86/dont-trunc-store-double-to-float.ll (revision 0) ++++ test/CodeGen/X86/dont-trunc-store-double-to-float.ll (working copy) +@@ -0,0 +1,20 @@ ++; RUN: llc -march=x86 < %s | FileCheck %s ++ ++; CHECK-LABEL: @bar ++; CHECK: movl $1074339512, ++; CHECK: movl $1374389535, ++; CHECK: movl $1078523331, ++define void @bar() unnamed_addr { ++entry-block: ++ %a = alloca double ++ %b = alloca float ++ ++ store double 3.140000e+00, double* %a ++ %0 = load double* %a ++ ++ %1 = fptrunc double %0 to float ++ ++ store float %1, float* %b ++ ++ ret void ++} From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:31:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E1C2CD0; Fri, 13 Feb 2015 21:31:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 564A7DC9; Fri, 13 Feb 2015 21:31:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLVliu007262; Fri, 13 Feb 2015 21:31:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLVkP1007254; Fri, 13 Feb 2015 21:31:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132131.t1DLVkP1007254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278716 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:31:47 -0000 Author: dim Date: Fri Feb 13 21:31:43 2015 New Revision: 278716 URL: https://svnweb.freebsd.org/changeset/base/278716 Log: MFC r271931: Add a few missing llvm/clang patches, update the other ones to be able to apply with the same patch options onto a fresh upstream llvm/clang 3.4.1 checkout, and use approximately the same header tempate for them. Added: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/9/contrib/llvm/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff (from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) @@ -0,0 +1,34 @@ +Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us +in line with gcc in base as this makes llvm generate code for the armv6k +variant of the instruction set. + +Introduced here: http://svnweb.freebsd.org/changeset/base/269387 + +Index: tools/clang/lib/Driver/ToolChain.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChain.cpp (revision 269386) ++++ tools/clang/lib/Driver/ToolChain.cpp (revision 269387) +@@ -183,7 +183,8 @@ static const char *getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp (revision 269386) ++++ tools/clang/lib/Driver/Tools.cpp (revision 269387) +@@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } Copied: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff (from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) @@ -0,0 +1,78 @@ +Pull in r216989 from upstream llvm trunk (by Renato Golin): + + MFV: Only emit movw on ARMv6T2+ + +Pull in r216990 from upstream llvm trunk (by Renato Golin): + + Missing test from r216989 + +Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain +test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS +in base doesn't understand this instruction for this target. One would need +to use --integrated-as to get this to build if desired. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271025 + +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td ++++ lib/Target/ARM/ARMInstrInfo.td +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function +Index: test/CodeGen/ARM/carry.ll +=================================================================== +--- test/CodeGen/ARM/carry.ll ++++ test/CodeGen/ARM/carry.ll +@@ -1,4 +1,4 @@ +-; RUN: llc < %s -march=arm | FileCheck %s ++; RUN: llc < %s -mtriple=armv6t2-eabi | FileCheck %s + + define i64 @f1(i64 %a, i64 %b) { + ; CHECK-LABEL: f1: +Index: test/CodeGen/ARM/pr18364-movw.ll +=================================================================== +--- test/CodeGen/ARM/pr18364-movw.ll ++++ test/CodeGen/ARM/pr18364-movw.ll +@@ -0,0 +1,34 @@ ++; RUN: llc < %s -mtriple=armv5te | FileCheck %s --check-prefix=V5 ++; RUN: llc < %s -mtriple=armv6 | FileCheck %s --check-prefix=V6 ++; RUN: llc < %s -mtriple=armv6t2 | FileCheck %s --check-prefix=V6T2 ++; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=V7 ++; PR18364 ++ ++define i64 @f() #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %y = alloca i64, align 8 ++ %z = alloca i64, align 8 ++ store i64 1, i64* %y, align 8 ++ store i64 11579764786944, i64* %z, align 8 ++ %0 = load i64* %y, align 8 ++ %1 = load i64* %z, align 8 ++ %sub = sub i64 %0, %1 ++ ret i64 %sub ++} ++ ++define i64 @g(i64 %a, i32 %b) #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %0 = mul i64 %a, 86400000 ++ %mul = add i64 %0, -210866803200000 ++ %conv = sext i32 %b to i64 ++ %add = add nsw i64 %mul, %conv ++ ret i64 %add ++} Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,8 +1,17 @@ -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 59ba47c..dddc7e7 100644 ---- a/lib/CodeGen/CGDebugInfo.cpp -+++ b/lib/CodeGen/CGDebugInfo.cpp -@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { +Pull in r200797 from upstream clang trunk (by Adrian Prantl): + + Debug info: fix a crasher when when emitting debug info for + not-yet-completed templated types. getTypeSize() needs a complete type. + + rdar://problem/15931354 + +Introduced here: http://svnweb.freebsd.org/changeset/base/271282 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedTy if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; @@ -16,36 +25,44 @@ index 59ba47c..dddc7e7 100644 return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); -diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp -new file mode 100644 -index 0000000..b2b7073 ---- /dev/null -+++ b/test/CodeGenCXX/debug-info-template-fwd.cpp -@@ -0,0 +1,27 @@ +Index: tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp ++++ tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s -+// This test is for a crash when emitting debug info for not-yet-completed -+// types. ++// This test is for a crash when emitting debug info for not-yet-completed types. +// Test that we don't actually emit a forward decl for the offending class: -+// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// CHECK: [ DW_TAG_class_type ] [Derived] {{.*}} [def] +// rdar://problem/15931354 -+template class Derived; ++typedef const struct __CFString * CFStringRef; ++template class Returner {}; ++typedef const __CFString String; + -+template class Base { -+ static Derived *create(); ++template class Derived; ++ ++template ++class Base ++{ ++ static Derived* create(); ++}; ++ ++template ++class Derived : public Base { ++public: ++ static void foo(); +}; + -+template struct Derived : Base { ++class Foo ++{ ++ Foo(); ++ static Returner > all(); +}; + -+Base *f; ++Foo::Foo(){} + -+// During the instantiation of Derived, Base becomes required to be -+// complete - since the declaration has already been emitted (due to 'f', -+// above), we immediately try to build debug info for Base which then -+// requires the (incomplete definition) of Derived which is problematic. -+// -+// (if 'f' is not present, the point at which Base becomes required to be -+// complete during the instantiation of Derived is a no-op because -+// Base was never emitted so we ignore it and carry on until we -+// wire up the base class of Derived in the debug info later on) -+Derived d; ++Returner > Foo::all() ++{ ++ Derived::foo(); ++ return Foo::all(); ++} Modified: stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,18 +1,16 @@ -commit 96365aef99ec463375dfdaf6eb260823e0477b6a -Author: Adrian Prantl -Date: Tue Apr 1 17:52:06 2014 +0000 +Pull in r205331 from upstream clang trunk (by Adrian Prantl): - Debug info: fix a crash when emitting IndirectFieldDecls, which were - previously not handled at all. - rdar://problem/16348575 - - git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 82db942..2556cf9 100644 ---- tools/clang/lib/CodeGen/CGDebugInfo.cpp -+++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp -@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, +Introduced here: http://svnweb.freebsd.org/changeset/base/271432 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205330) ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205331) +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. @@ -21,11 +19,10 @@ index 82db942..2556cf9 100644 // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant -diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp -new file mode 100644 -index 0000000..131ceba ---- /dev/null -+++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +Index: tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 0) ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 205331) @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s +// Copied: stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff (from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) @@ -0,0 +1,64 @@ +Pull in r217410 from upstream llvm trunk (by Bob Wilson): + + Set trunc store action to Expand for all X86 targets. + + When compiling without SSE2, isTruncStoreLegal(F64, F32) would return + Legal, whereas with SSE2 it would return Expand. And since the Target + doesn't seem to actually handle a truncstore for double -> float, it + would just output a store of a full double in the space for a float + hence overwriting other bits on the stack. + + Patch by Luqman Aden! + +This should fix clang -O0 on i386 assigning garbage to floats, in +certain scenarios. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271597 + +Index: lib/Target/X86/X86ISelLowering.cpp +=================================================================== +--- lib/Target/X86/X86ISelLowering.cpp (revision 208032) ++++ lib/Target/X86/X86ISelLowering.cpp (working copy) +@@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationActions() { + setTruncStoreAction(MVT::i32, MVT::i8 , Expand); + setTruncStoreAction(MVT::i16, MVT::i8, Expand); + ++ setTruncStoreAction(MVT::f64, MVT::f32, Expand); ++ + // SETOEQ and SETUNE require checking two conditions. + setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); +@@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationActions() { + AddPromotedToType (ISD::SELECT, VT, MVT::v2i64); + } + +- setTruncStoreAction(MVT::f64, MVT::f32, Expand); +- + // Custom lower v2i64 and v2f64 selects. + setOperationAction(ISD::LOAD, MVT::v2f64, Legal); + setOperationAction(ISD::LOAD, MVT::v2i64, Legal); +Index: test/CodeGen/X86/dont-trunc-store-double-to-float.ll +=================================================================== +--- test/CodeGen/X86/dont-trunc-store-double-to-float.ll (revision 0) ++++ test/CodeGen/X86/dont-trunc-store-double-to-float.ll (working copy) +@@ -0,0 +1,20 @@ ++; RUN: llc -march=x86 < %s | FileCheck %s ++ ++; CHECK-LABEL: @bar ++; CHECK: movl $1074339512, ++; CHECK: movl $1374389535, ++; CHECK: movl $1078523331, ++define void @bar() unnamed_addr { ++entry-block: ++ %a = alloca double ++ %b = alloca float ++ ++ store double 3.140000e+00, double* %a ++ %0 = load double* %a ++ ++ %1 = fptrunc double %0 to float ++ ++ store float %1, float* %b ++ ++ ret void ++} From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:32:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967ACF25; Fri, 13 Feb 2015 21:32:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77B0FDD2; Fri, 13 Feb 2015 21:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLW8k5007844; Fri, 13 Feb 2015 21:32:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLW6I8007834; Fri, 13 Feb 2015 21:32:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132132.t1DLW6I8007834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278717 - in stable/10: etc/rc.d sbin share/man/man4 share/mk sys/modules/geom tools/build/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:32:08 -0000 Author: ngie Date: Fri Feb 13 21:32:05 2015 New Revision: 278717 URL: https://svnweb.freebsd.org/changeset/base/278717 Log: MFC r277678: r277678: Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_CCD - copied unchanged from r277678, head/tools/build/options/WITHOUT_CCD Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/geom/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/etc/rc.d/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -21,7 +21,6 @@ FILES= DAEMON \ bootparams \ bridge \ ${_bthidd} \ - ccd \ cleanvar \ cleartmp \ cron \ @@ -185,14 +184,18 @@ _ubthidhci= ubthidhci FILES+= bsnmpd .endif -.if ${MK_IPX} != "no" -_ipxrouted= ipxrouted +.if ${MK_CCD} != "no" +FILES+= ccd .endif .if ${MK_HAST} != "no" FILES+= hastd .endif +.if ${MK_IPX} != "no" +_ipxrouted= ipxrouted +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/sbin/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -8,7 +8,6 @@ SUBDIR=adjkerntz \ badsect \ camcontrol \ - ccdconfig \ clri \ comcontrol \ conscontrol \ @@ -75,6 +74,10 @@ SUBDIR=adjkerntz \ SUBDIR+= atm .endif +.if ${MK_CCD} != "no" +SUBDIR+= ccdconfig +.endif + .if ${MK_CXX} != "no" SUBDIR+= devd .endif Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/share/man/man4/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -91,7 +91,7 @@ MAN= aac.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ - ccd.4 \ + ${_ccd.4} \ cd.4 \ cdce.4 \ ch.4 \ @@ -862,6 +862,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_CCD} != "no" +_ccd.4= ccd.4 +.endif + .if ${MK_ISCSI} != "no" MAN+= iscsi.4 MAN+= iscsi_initiator.4 Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:32:05 2015 (r278717) @@ -266,6 +266,7 @@ __DEFAULT_YES_OPTIONS = \ BZIP2 \ CALENDAR \ CAPSICUM \ + CCD \ CDDL \ CPP \ CROSS_COMPILER \ Modified: stable/10/sys/modules/geom/Makefile ============================================================================== --- stable/10/sys/modules/geom/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/sys/modules/geom/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + SUBDIR= geom_bde \ geom_bsd \ geom_cache \ - geom_ccd \ geom_concat \ geom_eli \ geom_fox \ @@ -31,4 +32,8 @@ SUBDIR= geom_bde \ geom_vol_ffs \ geom_zero +.if ${MK_CCD} != "no" || defined(ALL_MODULES) +SUBDIR+= geom_ccd +.endif + .include Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:32:05 2015 (r278717) @@ -492,6 +492,13 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8 OLD_FILES+=usr/share/man/man1/calendar.1.gz .endif +.if ${MK_CCD} == no +OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=sbin/ccdconfig +OLD_FILES+=usr/share/man/man4/ccd.4.gz +OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz +.endif + .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.2 OLD_LIBS+=lib/libctf.so.2 Copied: stable/10/tools/build/options/WITHOUT_CCD (from r277678, head/tools/build/options/WITHOUT_CCD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_CCD Fri Feb 13 21:32:05 2015 (r278717, copy of r277678, head/tools/build/options/WITHOUT_CCD) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr geom_ccd 4 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:36:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DB0410A; Fri, 13 Feb 2015 21:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D8D9DF0; Fri, 13 Feb 2015 21:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLaIfe008485; Fri, 13 Feb 2015 21:36:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLaHLi008470; Fri, 13 Feb 2015 21:36:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132136.t1DLaHLi008470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278718 - in stable/9: etc/rc.d sbin share/man/man4 share/mk sys/modules/geom tools/build/mk tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:36:19 -0000 Author: ngie Date: Fri Feb 13 21:36:16 2015 New Revision: 278718 URL: https://svnweb.freebsd.org/changeset/base/278718 Log: MFC r278717: r278717: MFC r277678: r277678: Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_CCD - copied unchanged from r278717, stable/10/tools/build/options/WITHOUT_CCD Modified: stable/9/etc/rc.d/Makefile stable/9/sbin/Makefile stable/9/share/man/man4/Makefile stable/9/share/mk/bsd.own.mk stable/9/sys/modules/geom/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/etc/rc.d/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -21,7 +21,6 @@ FILES= DAEMON \ bootparams \ bridge \ ${_bthidd} \ - ccd \ cleanvar \ cleartmp \ cron \ @@ -169,6 +168,10 @@ FILES+= apmd FILES+= bsnmpd .endif +.if ${MK_CCD} != "no" +FILES+= ccd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/9/sbin/Makefile ============================================================================== --- stable/9/sbin/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/sbin/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -9,7 +9,6 @@ SUBDIR=adjkerntz \ atacontrol \ badsect \ camcontrol \ - ccdconfig \ clri \ comcontrol \ conscontrol \ @@ -78,6 +77,10 @@ SUBDIR=adjkerntz \ SUBDIR+= atm .endif +.if ${MK_CCD} != "no" +SUBDIR+= ccdconfig +.endif + .if ${MK_CXX} != "no" SUBDIR+= devd .endif Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/share/man/man4/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -84,7 +84,7 @@ MAN= aac.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ - ccd.4 \ + ${_ccd.4} \ cd.4 \ cdce.4 \ ch.4 \ @@ -800,4 +800,8 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_CCD} != "no" +_ccd.4= ccd.4 +.endif + .include Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:36:16 2015 (r278718) @@ -351,6 +351,7 @@ __DEFAULT_YES_OPTIONS = \ SOURCELESS_UCODE \ BZIP2 \ CALENDAR \ + CCD \ CDDL \ CPP \ CRYPT \ Modified: stable/9/sys/modules/geom/Makefile ============================================================================== --- stable/9/sys/modules/geom/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/sys/modules/geom/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + SUBDIR= geom_bde \ geom_bsd \ geom_cache \ - geom_ccd \ geom_concat \ geom_eli \ geom_fox \ @@ -30,4 +31,8 @@ SUBDIR= geom_bde \ geom_vol_ffs \ geom_zero +.if ${MK_CCD} != "no" || defined(ALL_MODULES) +SUBDIR+= geom_ccd +.endif + .include Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:36:16 2015 (r278718) @@ -661,6 +661,13 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8 OLD_FILES+=usr/share/man/man1/calendar.1.gz .endif +.if ${MK_CCD} == no +OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=sbin/ccdconfig +OLD_FILES+=usr/share/man/man4/ccd.4.gz +OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz +.endif + .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.2 OLD_LIBS+=lib/libctf.so.2 Copied: stable/9/tools/build/options/WITHOUT_CCD (from r278717, stable/10/tools/build/options/WITHOUT_CCD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_CCD Fri Feb 13 21:36:16 2015 (r278718, copy of r278717, stable/10/tools/build/options/WITHOUT_CCD) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr geom_ccd 4 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:41:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B39EF3A1; Fri, 13 Feb 2015 21:41:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9520FEA5; Fri, 13 Feb 2015 21:41:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLfP3b012243; Fri, 13 Feb 2015 21:41:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLfOSU011835; Fri, 13 Feb 2015 21:41:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132141.t1DLfOSU011835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278719 - in stable/9: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:41:25 -0000 Author: ngie Date: Fri Feb 13 21:41:23 2015 New Revision: 278719 URL: https://svnweb.freebsd.org/changeset/base/278719 Log: MFstable/10 r278556: r278556: MFC r277725: r277725: Add MK_HAST knob for building and installing hastd(8), et al Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_HAST - copied unchanged from r278556, stable/10/tools/build/options/WITHOUT_HAST Modified: stable/9/etc/rc.d/Makefile stable/9/sbin/Makefile stable/9/share/examples/Makefile stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/examples/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/etc/rc.d/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -41,7 +41,6 @@ FILES= DAEMON \ geli2 \ gptboot \ gssd \ - hastd \ ${_hcsecd} \ hostid \ hostid_save \ @@ -172,6 +171,10 @@ FILES+= bsnmpd FILES+= ccd .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/9/sbin/Makefile ============================================================================== --- stable/9/sbin/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/sbin/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -30,8 +30,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ iscontrol \ @@ -85,6 +83,11 @@ SUBDIR+= ccdconfig SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif Modified: stable/9/share/examples/Makefile ============================================================================== --- stable/9/share/examples/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/share/examples/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -69,11 +68,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -205,6 +199,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:41:23 2015 (r278719) @@ -374,6 +374,7 @@ __DEFAULT_YES_OPTIONS = \ GPIB \ GPIO \ GROFF \ + HAST \ HTML \ INET \ INET6 \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:41:23 2015 (r278719) @@ -2232,6 +2232,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h Copied: stable/9/tools/build/options/WITHOUT_HAST (from r278556, stable/10/tools/build/options/WITHOUT_HAST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_HAST Fri Feb 13 21:41:23 2015 (r278719, copy of r278556, stable/10/tools/build/options/WITHOUT_HAST) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:44:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF735578; Fri, 13 Feb 2015 21:44:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F911ED6; Fri, 13 Feb 2015 21:44:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLii5H013182; Fri, 13 Feb 2015 21:44:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLiisv013181; Fri, 13 Feb 2015 21:44:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132144.t1DLiisv013181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278720 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:44:44 -0000 Author: ngie Date: Fri Feb 13 21:44:43 2015 New Revision: 278720 URL: https://svnweb.freebsd.org/changeset/base/278720 Log: Regen src.conf(5) Modified: stable/9/share/man/man5/src.conf.5 Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Fri Feb 13 21:41:23 2015 (r278719) +++ stable/9/share/man/man5/src.conf.5 Fri Feb 13 21:44:43 2015 (r278720) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/9/tools/build/options/makeman 263058 2014-03-11 23:04:32Z gjb .\" $FreeBSD$ -.Dd February 11, 2015 +.Dd February 13, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -220,6 +220,12 @@ Set to not build Bluetooth related kerne .It Va WITHOUT_BOOT .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BSDINSTALL +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSDINSTALL 278714 2015-02-13 21:25:56Z ngie +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -251,6 +257,11 @@ Set to build some programs without optio .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . +.It Va WITHOUT_CCD +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CCD 278718 2015-02-13 21:36:16Z ngie +Set to not build +.Xr geom_ccd 4 +and related utilities. .It Va WITHOUT_CDDL .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -485,6 +496,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_HAST 278719 2015-02-13 21:41:23Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: stable/9/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. @@ -990,6 +1006,12 @@ support files such as keyboard maps, fon Set to not build .Xr sysinstall 8 and related programs. +.It Va WITHOUT_TALK +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TALK 278712 2015-02-13 21:21:51Z ngie +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . .It Va WITHOUT_TCSH .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 21:46:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA956C9; Fri, 13 Feb 2015 21:46:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5FAEEB; Fri, 13 Feb 2015 21:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLkNAg013475; Fri, 13 Feb 2015 21:46:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLkNke013474; Fri, 13 Feb 2015 21:46:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132146.t1DLkNke013474@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278721 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:46:24 -0000 Author: ngie Date: Fri Feb 13 21:46:22 2015 New Revision: 278721 URL: https://svnweb.freebsd.org/changeset/base/278721 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Fri Feb 13 21:44:43 2015 (r278720) +++ stable/10/share/man/man5/src.conf.5 Fri Feb 13 21:46:22 2015 (r278721) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd February 10, 2015 +.Dd February 13, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -159,6 +159,12 @@ This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BSDINSTALL +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSDINSTALL 278713 2015-02-13 21:24:32Z ngie +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -193,6 +199,11 @@ Set to not build .It Va WITHOUT_CAPSICUM .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. +.It Va WITHOUT_CCD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CCD 278717 2015-02-13 21:32:05Z ngie +Set to not build +.Xr geom_ccd 4 +and related utilities. .It Va WITHOUT_CDDL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -929,6 +940,12 @@ Set to avoid compiling profiled librarie Set to not build .Xr quota 8 and related programs. +.It Va WITHOUT_RADIUS_SUPPORT +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT 278569 2015-02-11 08:52:29Z ngie +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . .It Va WITHOUT_RCMDS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the @@ -1018,6 +1035,12 @@ support files such as keyboard maps, fon Set to not build .Xr sysinstall 8 and related programs. +.It Va WITHOUT_TALK +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TALK 278710 2015-02-13 21:19:54Z ngie +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . .It Va WITHOUT_TCSH .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:01:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2DDE965; Fri, 13 Feb 2015 22:01:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBABAE3; Fri, 13 Feb 2015 22:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM1G14020150; Fri, 13 Feb 2015 22:01:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM1FPi020144; Fri, 13 Feb 2015 22:01:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132201.t1DM1FPi020144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278722 - in stable/10/sys/arm: allwinner allwinner/a20 freescale/imx rockchip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:01:16 -0000 Author: ian Date: Fri Feb 13 22:01:14 2015 New Revision: 278722 URL: https://svnweb.freebsd.org/changeset/base/278722 Log: MFC r257740, r257739: Switch to using common armv6 bus_space tag. Deleted: stable/10/sys/arm/allwinner/bus_space.c stable/10/sys/arm/freescale/imx/bus_space.c stable/10/sys/arm/rockchip/bus_space.c Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/rockchip/files.rk30xx Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:01:14 2015 (r278722) @@ -17,7 +17,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:01:14 2015 (r278722) @@ -19,5 +19,5 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/aintc.c standard arm/allwinner/if_emac.c optional emac arm/allwinner/timer.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard #arm/allwinner/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:01:14 2015 (r278722) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:01:14 2015 (r278722) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:01:14 2015 (r278722) @@ -15,7 +15,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard Modified: stable/10/sys/arm/rockchip/files.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/files.rk30xx Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/rockchip/files.rk30xx Fri Feb 13 22:01:14 2015 (r278722) @@ -11,7 +11,7 @@ arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard -arm/rockchip/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/rockchip/rk30xx_common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:05:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2469C2E; Fri, 13 Feb 2015 22:05:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD4E124; Fri, 13 Feb 2015 22:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM5bul023173; Fri, 13 Feb 2015 22:05:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM5bxc023172; Fri, 13 Feb 2015 22:05:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132205.t1DM5bxc023172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 22:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278723 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:05:37 -0000 Author: ngie Date: Fri Feb 13 22:05:36 2015 New Revision: 278723 URL: https://svnweb.freebsd.org/changeset/base/278723 Log: Unbreak the build by .include'ing bsd.own.mk Pointyhat to: me Modified: stable/9/share/man/man4/Makefile Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 13 22:01:14 2015 (r278722) +++ stable/9/share/man/man4/Makefile Fri Feb 13 22:05:36 2015 (r278723) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ +.include + MAN= aac.4 \ aacraid.4 \ acpi.4 \ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:05:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3943D5D; Fri, 13 Feb 2015 22:05:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A92812C; Fri, 13 Feb 2015 22:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM5xpf023292; Fri, 13 Feb 2015 22:05:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM5tQV023263; Fri, 13 Feb 2015 22:05:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132205.t1DM5tQV023263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 22:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278724 - in stable/10: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt lib/libc++ lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:05:59 -0000 Author: dim Date: Fri Feb 13 22:05:54 2015 New Revision: 278724 URL: https://svnweb.freebsd.org/changeset/base/278724 Log: Synchronize the default C++ stack in stable/10 with head, by merging almost all recent changes to libc++ and libcxxrt. MFC r256642: Since C++ typeinfo objects are currently not guaranteed to be merged at runtime by the dynamic linker, check for their equality in libcxxrt by not only comparing the typeinfo's name pointers, but also comparing the full names, if necessary. (This is similar to what GNU libstdc++ does in its default configuration.) The 'deep' check can be turned off again by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt. Reviewed by: theraven MFC r270522 (by rdivacky): The standard we compile libc++ with is called c++11 not c++0x. MFC r273066 (by bapt): Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r273382 (by bapt): Fix build by marking the new functions as weak This is a temporary fix MFC r273407 (by bapt): When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy its links dependencies in the least hackish way. Please note that this hacky libstds++ never get installed on the final system Reviewed by: imp MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 MFC r277217: Import libc++ trunk r224926. This fixes a number of bugs, completes C++14 support[1], adds more C++1z features[2], and fixes the following LWG issues[3]: 1450: Contradiction in regex_constants 2003: String exception inconsistency in erase. 2075: Progress guarantees, lock-free property, and scheduling assumptions 2104: unique_lock move-assignment should not be noexcept 2112: User-defined classes that cannot be derived from 2132: std::function ambiguity 2135: Unclear requirement for exceptions thrown in condition_variable::wait() 2142: packaged_task::operator() synchronization too broad? 2182: Container::[const_]reference types are misleadingly specified 2186: Incomplete action on async/launch::deferred 2188: Reverse iterator does not fully support targets that overload operator& 2193: Default constructors for standard library containers are explicit 2205: Problematic postconditions of regex_match and regex_search 2213: Return value of std::regex_replace 2240: Probable misuse of term "function scope" in [thread.condition] 2252: Strong guarantee on vector::push_back() still broken with C++11? 2257: Simplify container requirements with the new algorithms 2258: a.erase(q1, q2) unable to directly return q2 2263: Comparing iterators and allocator pointers with different const-character 2268: Setting a default argument in the declaration of a member function assign of std::basic_string 2271: regex_traits::lookup_classname specification unclear 2272: quoted should use char_traits::eq for character comparison 2278: User-defined literals for Standard Library types 2280: begin / end for arrays should be constexpr and noexcept 2285: make_reverse_iterator 2288: Inconsistent requirements for shared mutexes 2291: std::hash is vulnerable to collision DoS attack 2293: Wrong facet used by num_put::do_put 2299: Effects of inaccessible key_compare::is_transparent type are not clear 2301: Why is std::tie not constexpr? 2304: Complexity of count in unordered associative containers 2306: match_results::reference should be value_type&, not const value_type& 2308: Clarify container destructor requirements w.r.t. std::array 2313: tuple_size should always derive from integral_constant 2314: apply() should return decltype(auto) and use decay_t before tuple_size 2315: weak_ptr should be movable 2316: weak_ptr::lock() should be atomic 2317: The type property queries should be UnaryTypeTraits returning size_t 2320: select_on_container_copy_construction() takes allocators, not containers 2322: Associative(initializer_list, stuff) constructors are underspecified 2323: vector::resize(n, t)'s specification should be simplified 2324: Insert iterator constructors should use addressof() 2329: regex_match()/regex_search() with match_results should forbid temporary strings 2330: regex("meow", regex::icase) is technically forbidden but should be permitted 2332: regex_iterator/regex_token_iterator should forbid temporary regexes 2339: Wording issue in nth_element 2341: Inconsistency between basic_ostream::seekp(pos) and basic_ostream::seekp(off, dir) 2344: quoted()'s interaction with padding is unclear 2346: integral_constant's member functions should be marked noexcept 2350: min, max, and minmax should be constexpr 2356: Stability of erasure in unordered associative containers 2357: Remaining "Assignable" requirement 2359: How does regex_constants::nosubs affect basic_regex::mark_count()? 2360: reverse_iterator::operator*() is unimplementable [1] http://libcxx.llvm.org/cxx1y_status.html [2] http://libcxx.llvm.org/cxx1z_status.html [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html Exp-run: antoine MFC r277944: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC r278010: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd MFC r278016: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() Added: stable/10/contrib/libc++/include/__refstring - copied unchanged from r277217, head/contrib/libc++/include/__refstring stable/10/contrib/libc++/include/experimental/__config - copied unchanged from r277217, head/contrib/libc++/include/experimental/__config stable/10/contrib/libc++/include/experimental/string_view - copied unchanged from r277217, head/contrib/libc++/include/experimental/string_view stable/10/contrib/libc++/include/experimental/type_traits - copied unchanged from r277217, head/contrib/libc++/include/experimental/type_traits stable/10/contrib/libc++/include/experimental/utility - copied unchanged from r277217, head/contrib/libc++/include/experimental/utility stable/10/contrib/libc++/include/module.modulemap - copied unchanged from r277217, head/contrib/libc++/include/module.modulemap Modified: stable/10/contrib/libc++/CREDITS.TXT stable/10/contrib/libc++/LICENSE.TXT stable/10/contrib/libc++/include/__bit_reference stable/10/contrib/libc++/include/__config stable/10/contrib/libc++/include/__debug stable/10/contrib/libc++/include/__functional_03 stable/10/contrib/libc++/include/__functional_base stable/10/contrib/libc++/include/__functional_base_03 stable/10/contrib/libc++/include/__hash_table stable/10/contrib/libc++/include/__locale stable/10/contrib/libc++/include/__mutex_base stable/10/contrib/libc++/include/__sso_allocator stable/10/contrib/libc++/include/__tree stable/10/contrib/libc++/include/__tuple stable/10/contrib/libc++/include/algorithm stable/10/contrib/libc++/include/atomic stable/10/contrib/libc++/include/bitset stable/10/contrib/libc++/include/chrono stable/10/contrib/libc++/include/cmath stable/10/contrib/libc++/include/condition_variable stable/10/contrib/libc++/include/cstddef stable/10/contrib/libc++/include/deque stable/10/contrib/libc++/include/experimental/dynarray stable/10/contrib/libc++/include/experimental/optional stable/10/contrib/libc++/include/ext/__hash stable/10/contrib/libc++/include/ext/hash_map stable/10/contrib/libc++/include/forward_list stable/10/contrib/libc++/include/functional stable/10/contrib/libc++/include/future stable/10/contrib/libc++/include/iomanip stable/10/contrib/libc++/include/ios stable/10/contrib/libc++/include/istream stable/10/contrib/libc++/include/iterator stable/10/contrib/libc++/include/limits stable/10/contrib/libc++/include/list stable/10/contrib/libc++/include/locale stable/10/contrib/libc++/include/map stable/10/contrib/libc++/include/memory stable/10/contrib/libc++/include/mutex stable/10/contrib/libc++/include/new stable/10/contrib/libc++/include/numeric stable/10/contrib/libc++/include/ostream stable/10/contrib/libc++/include/random stable/10/contrib/libc++/include/regex stable/10/contrib/libc++/include/set stable/10/contrib/libc++/include/shared_mutex stable/10/contrib/libc++/include/sstream stable/10/contrib/libc++/include/stdexcept stable/10/contrib/libc++/include/string stable/10/contrib/libc++/include/thread stable/10/contrib/libc++/include/tuple stable/10/contrib/libc++/include/type_traits stable/10/contrib/libc++/include/typeinfo stable/10/contrib/libc++/include/unordered_map stable/10/contrib/libc++/include/unordered_set stable/10/contrib/libc++/include/utility stable/10/contrib/libc++/include/valarray stable/10/contrib/libc++/include/vector stable/10/contrib/libc++/src/algorithm.cpp stable/10/contrib/libc++/src/chrono.cpp stable/10/contrib/libc++/src/condition_variable.cpp stable/10/contrib/libc++/src/debug.cpp stable/10/contrib/libc++/src/exception.cpp stable/10/contrib/libc++/src/future.cpp stable/10/contrib/libc++/src/hash.cpp stable/10/contrib/libc++/src/ios.cpp stable/10/contrib/libc++/src/locale.cpp stable/10/contrib/libc++/src/memory.cpp stable/10/contrib/libc++/src/mutex.cpp stable/10/contrib/libc++/src/new.cpp stable/10/contrib/libc++/src/optional.cpp stable/10/contrib/libc++/src/random.cpp stable/10/contrib/libc++/src/regex.cpp stable/10/contrib/libc++/src/shared_mutex.cpp stable/10/contrib/libc++/src/stdexcept.cpp stable/10/contrib/libc++/src/string.cpp stable/10/contrib/libc++/src/strstream.cpp stable/10/contrib/libc++/src/system_error.cpp stable/10/contrib/libc++/src/thread.cpp stable/10/contrib/libc++/src/valarray.cpp stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libc++/Makefile stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libc++/CREDITS.TXT ============================================================================== --- stable/10/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:54 2015 (r278724) @@ -33,6 +33,10 @@ E: mclow.lists@gmail.com E: marshall@idio.com D: C++14 support, patches and bug fixes. +N: Eric Fiselier +E: eric@efcs.ca +D: LFTS support, patches and bug fixes. + N: Bill Fisher E: william.w.fisher@gmail.com D: Regex bug fixes. Modified: stable/10/contrib/libc++/LICENSE.TXT ============================================================================== --- stable/10/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:54 2015 (r278724) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: stable/10/contrib/libc++/include/__bit_reference ============================================================================== --- stable/10/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:54 2015 (r278724) @@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy(__first, __last, __result); + return _VSTD::copy_backward(__first, __last, __result); } // swap_ranges Modified: stable/10/contrib/libc++/include/__config ============================================================================== --- stable/10/contrib/libc++/include/__config Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__config Fri Feb 13 22:05:54 2015 (r278724) @@ -19,6 +19,11 @@ #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) #endif +#if !_WIN32 +#include +#include // for ELAST on FreeBSD +#endif + #define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -106,6 +111,13 @@ # endif #endif // __sun__ +#if defined(__native_client__) + // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, + // including accesses to the special files under /dev. C++11's + // std::random_device is instead exposed through a NaCl syscall. +# define _LIBCPP_USING_NACL_RANDOM +#endif // defined(__native_client__) + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -194,7 +206,7 @@ #endif #ifndef _LIBCPP_EXCEPTION_ABI -#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS +#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE @@ -203,6 +215,11 @@ #if defined(__clang__) +#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ + !defined(__arm__) +#define _LIBCPP_ALTERNATE_STRING_LAYOUT +#endif + #if __has_feature(cxx_alignas) # define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) @@ -215,14 +232,10 @@ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #endif -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -#ifdef __linux__ -#define _LIBCPP_HAS_NO_UNICODE_CHARS -#else +#if __cplusplus < 201103L typedef __char16_t char16_t; typedef __char32_t char32_t; #endif -#endif #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS @@ -246,6 +259,8 @@ typedef __char32_t char32_t; # define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif +#define _LIBCPP_UNUSED __attribute__((__unused__)) + #if !(__has_feature(cxx_defaulted_functions)) #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #endif // !(__has_feature(cxx_defaulted_functions)) @@ -308,10 +323,16 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if !(__has_feature(cxx_relaxed_constexpr)) +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR +#endif + #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #if defined(__FreeBSD__) #define _LIBCPP_HAS_QUICK_EXIT #define _LIBCPP_HAS_C11_FEATURES +#elif defined(__ANDROID__) +#define _LIBCPP_HAS_QUICK_EXIT #elif defined(__linux__) #include #if __GLIBC_PREREQ(2, 15) @@ -326,13 +347,19 @@ typedef __char32_t char32_t; #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) +# define _NOEXCEPT_OR_FALSE(x) noexcept(x) #else # define _NOEXCEPT throw() # define _NOEXCEPT_(x) +# define _NOEXCEPT_OR_FALSE(x) false #endif #if __has_feature(underlying_type) -# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) +# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#endif + +#if __has_feature(is_literal) +# define _LIBCPP_IS_LITERAL(T) __is_literal(T) #endif // Inline namespaces are available in Clang regardless of C++ dialect. @@ -345,6 +372,10 @@ namespace std { } } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -352,15 +383,33 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED __attribute__((__unused__)) + +#if _GNUC_VER >= 407 +#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) +#endif + #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS #endif #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +// constexpr was added to GCC in 4.6. +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_CONSTEXPR +// Can only use constexpr in c++11 mode. +#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L +#define _LIBCPP_HAS_NO_CONSTEXPR +#endif + +// No version of GCC supports relaxed constexpr rules +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #ifndef __GXX_EXPERIMENTAL_CXX0X__ @@ -374,6 +423,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ @@ -389,9 +439,7 @@ namespace std { #endif #if _GNUC_VER < 404 -#define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS @@ -402,6 +450,11 @@ namespace std { #define _LIBCPP_HAS_NO_NULLPTR #endif +#if _GNUC_VER < 407 +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#endif + #endif // __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { @@ -414,21 +467,28 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER #define _LIBCPP_HAS_NO_CONSTEXPR +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) +#define _LIBCPP_UNUSED #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS -#define _NOEXCEPT throw() +#define _NOEXCEPT throw () #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } @@ -438,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr namespace std { } +#define _LIBCPP_HAS_NO_ASAN + #elif defined(__IBMCPP__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) #define _ATTRIBUTE(x) __attribute__((x)) #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -454,7 +518,6 @@ namespace std { #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS -#define _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_HAS_IS_BASE_OF #if defined(_AIX) @@ -470,13 +533,19 @@ namespace std { } } -#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__ +#define _LIBCPP_HAS_NO_ASAN + +#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t; #endif // _LIBCPP_HAS_NO_UNICODE_CHARS +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif + #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT template struct __static_assert_test; @@ -514,12 +583,20 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __has_feature(cxx_explicit_conversions) +#ifndef __has_builtin +#define __has_builtin(__x) 0 +#endif + +#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) # define _LIBCPP_EXPLICIT explicit #else # define _LIBCPP_EXPLICIT #endif +#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) +# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE +#endif + #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ @@ -545,16 +622,21 @@ template struct __static_asse #endif #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; #endif #ifndef _LIBCPP_EXTERN_TEMPLATE2 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; #endif +#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) +#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) +#endif + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__) #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif + #ifdef __FreeBSD__ #define _DECLARE_C99_LDBL_MATH 1 #endif @@ -567,21 +649,39 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#if defined(__APPLE__) || defined(__FreeBSD__) -#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 -#endif +#if defined(ELAST) +#define _LIBCPP_ELAST ELAST +#elif defined(__linux__) +#define _LIBCPP_ELAST 4095 +#elif defined(_NEWLIB_VERSION) +#define _LIBCPP_ELAST __ELASTERROR +#elif defined(__APPLE__) +// Not _LIBCPP_ELAST needed on Apple +#elif defined(__sun__) +#define _LIBCPP_ELAST ESTALE +#else +// Warn here so that the person doing the libcxx port has an easier time: +#warning This platform's ELAST hasn't been ported yet #endif #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# if defined(__FreeBSD__) +// Making the std::pair copy constructor trivial breaks ABI compatibility with +// earlier versions of libc++ shipped by FreeBSD, so turn it off by default. +// See also http://svnweb.freebsd.org/changeset/base/261801 +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 +# else +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# endif #endif #ifndef _LIBCPP_STD_VER # if __cplusplus <= 201103L # define _LIBCPP_STD_VER 11 +# elif __cplusplus <= 201402L +# define _LIBCPP_STD_VER 14 # else -# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification +# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification # endif #endif // _LIBCPP_STD_VER @@ -592,21 +692,30 @@ template struct __static_asse #endif #if _LIBCPP_STD_VER <= 11 -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 #define _LIBCPP_EXPLICIT_AFTER_CXX11 #define _LIBCPP_DEPRECATED_AFTER_CXX11 #else -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] #endif +#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr +#else +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 +#endif + +#ifndef _LIBCPP_HAS_NO_ASAN +extern "C" void __sanitizer_annotate_contiguous_container( + const void *, const void *, const void *, const void *); +#endif + // Try to find out if RTTI is disabled. // g++ and cl.exe have RTTI on by default and define a macro when it is. // g++ only defines the macro in 4.3.2 and onwards. #if !defined(_LIBCPP_NO_RTTI) -# if defined(__GNUG__) && (__GNUC__ >= 4 && \ - (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI) +# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ + (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) # define _LIBCPP_NO_RTTI # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) # define _LIBCPP_NO_RTTI @@ -617,4 +726,9 @@ template struct __static_asse # define _LIBCPP_WEAK __attribute__((__weak__)) #endif +#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) +# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ + _LIBCPP_HAS_NO_THREADS is defined. +#endif + #endif // _LIBCPP_CONFIG Modified: stable/10/contrib/libc++/include/__debug ============================================================================== --- stable/10/contrib/libc++/include/__debug Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__debug Fri Feb 13 22:05:54 2015 (r278724) @@ -11,19 +11,23 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#include <__config> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #if _LIBCPP_DEBUG_LEVEL >= 1 - # include # include # include # ifndef _LIBCPP_ASSERT # define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort())) # endif +#endif +#ifndef _LIBCPP_ASSERT +# define _LIBCPP_ASSERT(x, m) ((void)0) #endif #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: stable/10/contrib/libc++/include/__functional_03 ============================================================================== --- stable/10/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:54 2015 (r278724) @@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp __base* __f_; template + _LIBCPP_INLINE_VISIBILITY static bool __not_null(const _Fp&) {return true;} template - static bool __not_null(const function<_Rp()>& __p) {return __p;} + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(_R2 (*__p)()) {return __p;} + template + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(const function<_R2()>& __p) {return __p;} public: typedef _Rp result_type; @@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type __mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>) { - __ti(_VSTD::forward::type>(get<_Indx>(__uj))...); + __ti(_VSTD::forward::type>(_VSTD::get<_Indx>(__uj))...); } template @@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; // compiler bug workaround - typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj); + typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj); return __t; -// return _VSTD::forward::type>(get<_Indx>(__uj)); +// return _VSTD::forward::type>(_VSTD::get<_Indx>(__uj)); } template @@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs, __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); + return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...); } template Modified: stable/10/contrib/libc++/include/__functional_base ============================================================================== --- stable/10/contrib/libc++/include/__functional_base Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_base Fri Feb 13 22:05:54 2015 (r278724) @@ -451,10 +451,10 @@ public: } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: stable/10/contrib/libc++/include/__functional_base_03 ============================================================================== --- stable/10/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:54 2015 (r278724) @@ -1027,7 +1027,7 @@ public: typename __invoke_return0::type operator() (_A0& __a0) const { - return __invoke(get(), __a0); + return __invoke(get(), __a0); } template @@ -1035,7 +1035,7 @@ public: typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return __invoke(get(), __a0, __a1); + return __invoke(get(), __a0, __a1); } template @@ -1043,14 +1043,14 @@ public: typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return __invoke(get(), __a0, __a1, __a2); + return __invoke(get(), __a0, __a1, __a2); } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: stable/10/contrib/libc++/include/__hash_table ============================================================================== --- stable/10/contrib/libc++/include/__hash_table Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__hash_table Fri Feb 13 22:05:54 2015 (r278724) @@ -20,11 +20,7 @@ #include <__undef_min_max> -#ifdef _LIBCPP_DEBUG -# include <__debug> -#else -# define _LIBCPP_ASSERT(x, m) ((void)0) -#endif +#include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Modified: stable/10/contrib/libc++/include/__locale ============================================================================== --- stable/10/contrib/libc++/include/__locale Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__locale Fri Feb 13 22:05:54 2015 (r278724) @@ -21,11 +21,22 @@ #include #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) # include -#elif _AIX +#elif defined(_AIX) # include -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) +#elif defined(__ANDROID__) +// Android gained the locale aware functions in L (API level 21) +# include +# if __ANDROID_API__ <= 20 +# include +# endif +#elif defined(__sun__) +# include +#elif defined(_NEWLIB_VERSION) +# include +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) # include -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ +#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -341,13 +352,15 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; +#elif defined(__ANDROID__) + typedef unsigned char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; @@ -357,7 +370,12 @@ public: static const mask alpha = _CTYPE_A; static const mask digit = _CTYPE_D; static const mask punct = _CTYPE_P; +# if defined(__ANDROID__) + static const mask xdigit = _CTYPE_X | _CTYPE_D; +# else static const mask xdigit = _CTYPE_X; +# endif + # if defined(__NetBSD__) static const mask blank = _CTYPE_BL; # else Modified: stable/10/contrib/libc++/include/__mutex_base ============================================================================== --- stable/10/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:54 2015 (r278724) @@ -22,6 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef _LIBCPP_HAS_NO_THREADS + class _LIBCPP_TYPE_VIS mutex { pthread_mutex_t __m_; @@ -254,19 +256,13 @@ void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT {__x.swap(__y);} -struct _LIBCPP_TYPE_VIS cv_status +//enum class cv_status +_LIBCPP_DECLARE_STRONG_ENUM(cv_status) { - enum __lx { - no_timeout, - timeout - }; - - __lx __v_; - - _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {} - _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} - + no_timeout, + timeout }; +_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status) class _LIBCPP_TYPE_VIS condition_variable { @@ -288,7 +284,7 @@ public: void notify_one() _NOEXCEPT; void notify_all() _NOEXCEPT; - void wait(unique_lock& __lk); + void wait(unique_lock& __lk) _NOEXCEPT; template void wait(unique_lock& __lk, _Predicate __pred); @@ -319,8 +315,9 @@ public: private: void __do_timed_wait(unique_lock& __lk, - chrono::time_point); + chrono::time_point) _NOEXCEPT; }; +#endif // !_LIBCPP_HAS_NO_THREADS template inline _LIBCPP_INLINE_VISIBILITY @@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _ return __r; } +#ifndef _LIBCPP_HAS_NO_THREADS template void condition_variable::wait(unique_lock& __lk, _Predicate __pred) @@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock _VSTD::move(__pred)); } +#endif // !_LIBCPP_HAS_NO_THREADS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___MUTEX_BASE Copied: stable/10/contrib/libc++/include/__refstring (from r277217, head/contrib/libc++/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/libc++/include/__refstring Fri Feb 13 22:05:54 2015 (r278724, copy of r277217, head/contrib/libc++/include/__refstring) @@ -0,0 +1,139 @@ +//===------------------------ __refstring ---------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___REFSTRING +#define _LIBCPP___REFSTRING + +#include <__config> +#include +#include +#if __APPLE__ +#include +#include +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +class _LIBCPP_HIDDEN __libcpp_refstring +{ +private: + const char* str_; + + typedef int count_t; + + struct _Rep_base + { + std::size_t len; + std::size_t cap; + count_t count; + }; + + static + _Rep_base* + rep_from_data(const char *data_) _NOEXCEPT + { + char *data = const_cast(data_); + return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base)); + } + static + char * + data_from_rep(_Rep_base *rep) _NOEXCEPT + { + char *data = reinterpret_cast(rep); + return data + sizeof(*rep); + } + +#if __APPLE__ + static + const char* + compute_gcc_empty_string_storage() _NOEXCEPT + { + void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); + if (handle == nullptr) + return nullptr; + void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE"); + if (sym == nullptr) + return nullptr; + return data_from_rep(reinterpret_cast<_Rep_base *>(sym)); + } + + static + const char* + get_gcc_empty_string_storage() _NOEXCEPT + { + static const char* p = compute_gcc_empty_string_storage(); + return p; + } + + bool + uses_refcount() const + { + return str_ != get_gcc_empty_string_storage(); + } +#else + bool + uses_refcount() const + { + return true; + } +#endif + +public: + explicit __libcpp_refstring(const char* msg) { + std::size_t len = strlen(msg); + _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1)); + rep->len = len; + rep->cap = len; + rep->count = 0; + char *data = data_from_rep(rep); + std::memcpy(data, msg, len + 1); + str_ = data; + } + + __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_) + { + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + } + + __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT + { + bool adjust_old_count = uses_refcount(); + struct _Rep_base *old_rep = rep_from_data(str_); + str_ = s.str_; + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + if (adjust_old_count) + { + if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0) + { + ::operator delete(old_rep); + } + } + return *this; + } + + ~__libcpp_refstring() + { + if (uses_refcount()) + { + _Rep_base* rep = rep_from_data(str_); + if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0) + { + ::operator delete(rep); + } + } + } + + const char* c_str() const _NOEXCEPT {return str_;} +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif //_LIBCPP___REFSTRING Modified: stable/10/contrib/libc++/include/__sso_allocator ============================================================================== --- stable/10/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:54 2015 (r278724) @@ -55,14 +55,14 @@ public: __allocated_ = true; return (pointer)&buf_; } - return static_cast(::operator new(__n * sizeof(_Tp))); + return static_cast(_VSTD::__allocate(__n * sizeof(_Tp))); } _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) { if (__p == (pointer)&buf_) __allocated_ = false; else - ::operator delete(__p); + _VSTD::__deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} Modified: stable/10/contrib/libc++/include/__tree ============================================================================== --- stable/10/contrib/libc++/include/__tree Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__tree Fri Feb 13 22:05:54 2015 (r278724) @@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase __begin_node() = __r.__ptr_; --size(); __node_allocator& __na = __node_alloc(); - __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__np)); + __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __node_traits::deallocate(__na, __np, 1); return __r; } Modified: stable/10/contrib/libc++/include/__tuple ============================================================================== --- stable/10/contrib/libc++/include/__tuple Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__tuple Fri Feb 13 22:05:54 2015 (r278724) @@ -27,6 +27,32 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// __lazy_and + +template +struct __lazy_and_impl; + +template +struct __lazy_and_impl : false_type {}; + +template <> +struct __lazy_and_impl : true_type {}; + +template +struct __lazy_and_impl : integral_constant {}; + +template +struct __lazy_and_impl : __lazy_and_impl<_Hp::type::value, _Tp...> {}; + +template +struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {}; + +// __lazy_not + +template +struct __lazy_not : integral_constant {}; + + template class _LIBCPP_TYPE_VIS_ONLY tuple_size; template @@ -219,19 +245,30 @@ struct __make_tuple_types // __tuple_convertible -template +template struct __tuple_convertible_imp : public false_type {}; template -struct __tuple_convertible_imp, __tuple_types<_Up0, _Up...> > +struct __tuple_convertible_imp<__tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> > : public integral_constant::value && - __tuple_convertible_imp, __tuple_types<_Up...> >::value> {}; + __tuple_convertible_imp<__tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {}; template <> -struct __tuple_convertible_imp, __tuple_types<> > +struct __tuple_convertible_imp<__tuple_types<>, __tuple_types<> > : public true_type {}; +template +struct __tuple_convertible_apply : public false_type {}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:07:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6200EAE; Fri, 13 Feb 2015 22:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDAB140; Fri, 13 Feb 2015 22:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM7owq023606; Fri, 13 Feb 2015 22:07:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM7kBH023579; Fri, 13 Feb 2015 22:07:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132207.t1DM7kBH023579@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 22:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278725 - in stable/9: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt etc/mtree lib/libc++ lib/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:07:50 -0000 Author: dim Date: Fri Feb 13 22:07:45 2015 New Revision: 278725 URL: https://svnweb.freebsd.org/changeset/base/278725 Log: Synchronize the (non-default) libc++/libcxxrt C++ stack in stable/9 with head, by merging almost all recent changes to libc++ and libcxxrt. MFC r255206 (by theraven): Add a c++/v1/tr1 include directory containing symlinks to all of the standard headrs. Lots of third-party code expects to find C++03 headers under tr1 because that's where GNU decided to hide them. This should fix ports that expect them there. MFC r256642: Since C++ typeinfo objects are currently not guaranteed to be merged at runtime by the dynamic linker, check for their equality in libcxxrt by not only comparing the typeinfo's name pointers, but also comparing the full names, if necessary. (This is similar to what GNU libstdc++ does in its default configuration.) The 'deep' check can be turned off again by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt. Reviewed by: theraven MFC r270522 (by rdivacky): The standard we compile libc++ with is called c++11 not c++0x. MFC r273066 (by bapt): Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r273382 (by bapt): Fix build by marking the new functions as weak This is a temporary fix MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 MFC r277217: Import libc++ trunk r224926. This fixes a number of bugs, completes C++14 support[1], adds more C++1z features[2], and fixes the following LWG issues[3]: 1450: Contradiction in regex_constants 2003: String exception inconsistency in erase. 2075: Progress guarantees, lock-free property, and scheduling assumptions 2104: unique_lock move-assignment should not be noexcept 2112: User-defined classes that cannot be derived from 2132: std::function ambiguity 2135: Unclear requirement for exceptions thrown in condition_variable::wait() 2142: packaged_task::operator() synchronization too broad? 2182: Container::[const_]reference types are misleadingly specified 2186: Incomplete action on async/launch::deferred 2188: Reverse iterator does not fully support targets that overload operator& 2193: Default constructors for standard library containers are explicit 2205: Problematic postconditions of regex_match and regex_search 2213: Return value of std::regex_replace 2240: Probable misuse of term "function scope" in [thread.condition] 2252: Strong guarantee on vector::push_back() still broken with C++11? 2257: Simplify container requirements with the new algorithms 2258: a.erase(q1, q2) unable to directly return q2 2263: Comparing iterators and allocator pointers with different const-character 2268: Setting a default argument in the declaration of a member function assign of std::basic_string 2271: regex_traits::lookup_classname specification unclear 2272: quoted should use char_traits::eq for character comparison 2278: User-defined literals for Standard Library types 2280: begin / end for arrays should be constexpr and noexcept 2285: make_reverse_iterator 2288: Inconsistent requirements for shared mutexes 2291: std::hash is vulnerable to collision DoS attack 2293: Wrong facet used by num_put::do_put 2299: Effects of inaccessible key_compare::is_transparent type are not clear 2301: Why is std::tie not constexpr? 2304: Complexity of count in unordered associative containers 2306: match_results::reference should be value_type&, not const value_type& 2308: Clarify container destructor requirements w.r.t. std::array 2313: tuple_size should always derive from integral_constant 2314: apply() should return decltype(auto) and use decay_t before tuple_size 2315: weak_ptr should be movable 2316: weak_ptr::lock() should be atomic 2317: The type property queries should be UnaryTypeTraits returning size_t 2320: select_on_container_copy_construction() takes allocators, not containers 2322: Associative(initializer_list, stuff) constructors are underspecified 2323: vector::resize(n, t)'s specification should be simplified 2324: Insert iterator constructors should use addressof() 2329: regex_match()/regex_search() with match_results should forbid temporary strings 2330: regex("meow", regex::icase) is technically forbidden but should be permitted 2332: regex_iterator/regex_token_iterator should forbid temporary regexes 2339: Wording issue in nth_element 2341: Inconsistency between basic_ostream::seekp(pos) and basic_ostream::seekp(off, dir) 2344: quoted()'s interaction with padding is unclear 2346: integral_constant's member functions should be marked noexcept 2350: min, max, and minmax should be constexpr 2356: Stability of erasure in unordered associative containers 2357: Remaining "Assignable" requirement 2359: How does regex_constants::nosubs affect basic_regex::mark_count()? 2360: reverse_iterator::operator*() is unimplementable [1] http://libcxx.llvm.org/cxx1y_status.html [2] http://libcxx.llvm.org/cxx1z_status.html [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html Exp-run: antoine MFC r277944: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC r278010: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd MFC r278016: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() Added: stable/9/contrib/libc++/include/__refstring - copied unchanged from r277217, head/contrib/libc++/include/__refstring stable/9/contrib/libc++/include/experimental/__config - copied unchanged from r277217, head/contrib/libc++/include/experimental/__config stable/9/contrib/libc++/include/experimental/string_view - copied unchanged from r277217, head/contrib/libc++/include/experimental/string_view stable/9/contrib/libc++/include/experimental/type_traits - copied unchanged from r277217, head/contrib/libc++/include/experimental/type_traits stable/9/contrib/libc++/include/experimental/utility - copied unchanged from r277217, head/contrib/libc++/include/experimental/utility stable/9/contrib/libc++/include/module.modulemap - copied unchanged from r277217, head/contrib/libc++/include/module.modulemap Modified: stable/9/contrib/libc++/CREDITS.TXT stable/9/contrib/libc++/LICENSE.TXT stable/9/contrib/libc++/include/__bit_reference stable/9/contrib/libc++/include/__config stable/9/contrib/libc++/include/__debug stable/9/contrib/libc++/include/__functional_03 stable/9/contrib/libc++/include/__functional_base stable/9/contrib/libc++/include/__functional_base_03 stable/9/contrib/libc++/include/__hash_table stable/9/contrib/libc++/include/__locale stable/9/contrib/libc++/include/__mutex_base stable/9/contrib/libc++/include/__sso_allocator stable/9/contrib/libc++/include/__tree stable/9/contrib/libc++/include/__tuple stable/9/contrib/libc++/include/algorithm stable/9/contrib/libc++/include/atomic stable/9/contrib/libc++/include/bitset stable/9/contrib/libc++/include/chrono stable/9/contrib/libc++/include/cmath stable/9/contrib/libc++/include/condition_variable stable/9/contrib/libc++/include/cstddef stable/9/contrib/libc++/include/deque stable/9/contrib/libc++/include/experimental/dynarray stable/9/contrib/libc++/include/experimental/optional stable/9/contrib/libc++/include/ext/__hash stable/9/contrib/libc++/include/ext/hash_map stable/9/contrib/libc++/include/forward_list stable/9/contrib/libc++/include/functional stable/9/contrib/libc++/include/future stable/9/contrib/libc++/include/iomanip stable/9/contrib/libc++/include/ios stable/9/contrib/libc++/include/istream stable/9/contrib/libc++/include/iterator stable/9/contrib/libc++/include/limits stable/9/contrib/libc++/include/list stable/9/contrib/libc++/include/locale stable/9/contrib/libc++/include/map stable/9/contrib/libc++/include/memory stable/9/contrib/libc++/include/mutex stable/9/contrib/libc++/include/new stable/9/contrib/libc++/include/numeric stable/9/contrib/libc++/include/ostream stable/9/contrib/libc++/include/random stable/9/contrib/libc++/include/regex stable/9/contrib/libc++/include/set stable/9/contrib/libc++/include/shared_mutex stable/9/contrib/libc++/include/sstream stable/9/contrib/libc++/include/stdexcept stable/9/contrib/libc++/include/string stable/9/contrib/libc++/include/thread stable/9/contrib/libc++/include/tuple stable/9/contrib/libc++/include/type_traits stable/9/contrib/libc++/include/typeinfo stable/9/contrib/libc++/include/unordered_map stable/9/contrib/libc++/include/unordered_set stable/9/contrib/libc++/include/utility stable/9/contrib/libc++/include/valarray stable/9/contrib/libc++/include/vector stable/9/contrib/libc++/src/algorithm.cpp stable/9/contrib/libc++/src/chrono.cpp stable/9/contrib/libc++/src/condition_variable.cpp stable/9/contrib/libc++/src/debug.cpp stable/9/contrib/libc++/src/exception.cpp stable/9/contrib/libc++/src/future.cpp stable/9/contrib/libc++/src/hash.cpp stable/9/contrib/libc++/src/ios.cpp stable/9/contrib/libc++/src/locale.cpp stable/9/contrib/libc++/src/memory.cpp stable/9/contrib/libc++/src/mutex.cpp stable/9/contrib/libc++/src/new.cpp stable/9/contrib/libc++/src/optional.cpp stable/9/contrib/libc++/src/random.cpp stable/9/contrib/libc++/src/regex.cpp stable/9/contrib/libc++/src/shared_mutex.cpp stable/9/contrib/libc++/src/stdexcept.cpp stable/9/contrib/libc++/src/string.cpp stable/9/contrib/libc++/src/strstream.cpp stable/9/contrib/libc++/src/system_error.cpp stable/9/contrib/libc++/src/thread.cpp stable/9/contrib/libc++/src/valarray.cpp stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/etc/mtree/BSD.include.dist stable/9/lib/libc++/Makefile stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/etc/ (props changed) stable/9/etc/mtree/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc++/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/9/contrib/libc++/CREDITS.TXT ============================================================================== --- stable/9/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/CREDITS.TXT Fri Feb 13 22:07:45 2015 (r278725) @@ -33,6 +33,10 @@ E: mclow.lists@gmail.com E: marshall@idio.com D: C++14 support, patches and bug fixes. +N: Eric Fiselier +E: eric@efcs.ca +D: LFTS support, patches and bug fixes. + N: Bill Fisher E: william.w.fisher@gmail.com D: Regex bug fixes. Modified: stable/9/contrib/libc++/LICENSE.TXT ============================================================================== --- stable/9/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/LICENSE.TXT Fri Feb 13 22:07:45 2015 (r278725) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: stable/9/contrib/libc++/include/__bit_reference ============================================================================== --- stable/9/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__bit_reference Fri Feb 13 22:07:45 2015 (r278725) @@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy(__first, __last, __result); + return _VSTD::copy_backward(__first, __last, __result); } // swap_ranges Modified: stable/9/contrib/libc++/include/__config ============================================================================== --- stable/9/contrib/libc++/include/__config Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__config Fri Feb 13 22:07:45 2015 (r278725) @@ -19,6 +19,11 @@ #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) #endif +#if !_WIN32 +#include +#include // for ELAST on FreeBSD +#endif + #define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -106,6 +111,13 @@ # endif #endif // __sun__ +#if defined(__native_client__) + // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, + // including accesses to the special files under /dev. C++11's + // std::random_device is instead exposed through a NaCl syscall. +# define _LIBCPP_USING_NACL_RANDOM +#endif // defined(__native_client__) + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -194,7 +206,7 @@ #endif #ifndef _LIBCPP_EXCEPTION_ABI -#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS +#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE @@ -203,6 +215,11 @@ #if defined(__clang__) +#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ + !defined(__arm__) +#define _LIBCPP_ALTERNATE_STRING_LAYOUT +#endif + #if __has_feature(cxx_alignas) # define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) @@ -215,14 +232,10 @@ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #endif -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -#ifdef __linux__ -#define _LIBCPP_HAS_NO_UNICODE_CHARS -#else +#if __cplusplus < 201103L typedef __char16_t char16_t; typedef __char32_t char32_t; #endif -#endif #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS @@ -246,6 +259,8 @@ typedef __char32_t char32_t; # define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif +#define _LIBCPP_UNUSED __attribute__((__unused__)) + #if !(__has_feature(cxx_defaulted_functions)) #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #endif // !(__has_feature(cxx_defaulted_functions)) @@ -308,10 +323,16 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if !(__has_feature(cxx_relaxed_constexpr)) +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR +#endif + #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #if defined(__FreeBSD__) #define _LIBCPP_HAS_QUICK_EXIT #define _LIBCPP_HAS_C11_FEATURES +#elif defined(__ANDROID__) +#define _LIBCPP_HAS_QUICK_EXIT #elif defined(__linux__) #include #if __GLIBC_PREREQ(2, 15) @@ -326,13 +347,19 @@ typedef __char32_t char32_t; #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) +# define _NOEXCEPT_OR_FALSE(x) noexcept(x) #else # define _NOEXCEPT throw() # define _NOEXCEPT_(x) +# define _NOEXCEPT_OR_FALSE(x) false #endif #if __has_feature(underlying_type) -# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) +# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#endif + +#if __has_feature(is_literal) +# define _LIBCPP_IS_LITERAL(T) __is_literal(T) #endif // Inline namespaces are available in Clang regardless of C++ dialect. @@ -345,6 +372,10 @@ namespace std { } } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -352,15 +383,33 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED __attribute__((__unused__)) + +#if _GNUC_VER >= 407 +#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) +#endif + #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS #endif #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +// constexpr was added to GCC in 4.6. +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_CONSTEXPR +// Can only use constexpr in c++11 mode. +#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L +#define _LIBCPP_HAS_NO_CONSTEXPR +#endif + +// No version of GCC supports relaxed constexpr rules +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #ifndef __GXX_EXPERIMENTAL_CXX0X__ @@ -374,6 +423,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ @@ -389,9 +439,7 @@ namespace std { #endif #if _GNUC_VER < 404 -#define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS @@ -402,6 +450,11 @@ namespace std { #define _LIBCPP_HAS_NO_NULLPTR #endif +#if _GNUC_VER < 407 +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#endif + #endif // __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { @@ -414,21 +467,28 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER #define _LIBCPP_HAS_NO_CONSTEXPR +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) +#define _LIBCPP_UNUSED #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS -#define _NOEXCEPT throw() +#define _NOEXCEPT throw () #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } @@ -438,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr namespace std { } +#define _LIBCPP_HAS_NO_ASAN + #elif defined(__IBMCPP__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) #define _ATTRIBUTE(x) __attribute__((x)) #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -454,7 +518,6 @@ namespace std { #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS -#define _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_HAS_IS_BASE_OF #if defined(_AIX) @@ -470,13 +533,19 @@ namespace std { } } -#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__ +#define _LIBCPP_HAS_NO_ASAN + +#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t; #endif // _LIBCPP_HAS_NO_UNICODE_CHARS +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif + #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT template struct __static_assert_test; @@ -514,12 +583,20 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __has_feature(cxx_explicit_conversions) +#ifndef __has_builtin +#define __has_builtin(__x) 0 +#endif + +#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) # define _LIBCPP_EXPLICIT explicit #else # define _LIBCPP_EXPLICIT #endif +#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) +# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE +#endif + #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ @@ -545,16 +622,21 @@ template struct __static_asse #endif #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; #endif #ifndef _LIBCPP_EXTERN_TEMPLATE2 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; #endif +#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) +#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) +#endif + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__) #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif + #ifdef __FreeBSD__ #define _DECLARE_C99_LDBL_MATH 1 #endif @@ -567,21 +649,39 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#if defined(__APPLE__) || defined(__FreeBSD__) -#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 -#endif +#if defined(ELAST) +#define _LIBCPP_ELAST ELAST +#elif defined(__linux__) +#define _LIBCPP_ELAST 4095 +#elif defined(_NEWLIB_VERSION) +#define _LIBCPP_ELAST __ELASTERROR +#elif defined(__APPLE__) +// Not _LIBCPP_ELAST needed on Apple +#elif defined(__sun__) +#define _LIBCPP_ELAST ESTALE +#else +// Warn here so that the person doing the libcxx port has an easier time: +#warning This platform's ELAST hasn't been ported yet #endif #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# if defined(__FreeBSD__) +// Making the std::pair copy constructor trivial breaks ABI compatibility with +// earlier versions of libc++ shipped by FreeBSD, so turn it off by default. +// See also http://svnweb.freebsd.org/changeset/base/261801 +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 +# else +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# endif #endif #ifndef _LIBCPP_STD_VER # if __cplusplus <= 201103L # define _LIBCPP_STD_VER 11 +# elif __cplusplus <= 201402L +# define _LIBCPP_STD_VER 14 # else -# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification +# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification # endif #endif // _LIBCPP_STD_VER @@ -592,21 +692,30 @@ template struct __static_asse #endif #if _LIBCPP_STD_VER <= 11 -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 #define _LIBCPP_EXPLICIT_AFTER_CXX11 #define _LIBCPP_DEPRECATED_AFTER_CXX11 #else -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] #endif +#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr +#else +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 +#endif + +#ifndef _LIBCPP_HAS_NO_ASAN +extern "C" void __sanitizer_annotate_contiguous_container( + const void *, const void *, const void *, const void *); +#endif + // Try to find out if RTTI is disabled. // g++ and cl.exe have RTTI on by default and define a macro when it is. // g++ only defines the macro in 4.3.2 and onwards. #if !defined(_LIBCPP_NO_RTTI) -# if defined(__GNUG__) && (__GNUC__ >= 4 && \ - (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI) +# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ + (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) # define _LIBCPP_NO_RTTI # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) # define _LIBCPP_NO_RTTI @@ -617,4 +726,9 @@ template struct __static_asse # define _LIBCPP_WEAK __attribute__((__weak__)) #endif +#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) +# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ + _LIBCPP_HAS_NO_THREADS is defined. +#endif + #endif // _LIBCPP_CONFIG Modified: stable/9/contrib/libc++/include/__debug ============================================================================== --- stable/9/contrib/libc++/include/__debug Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__debug Fri Feb 13 22:07:45 2015 (r278725) @@ -11,19 +11,23 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#include <__config> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #if _LIBCPP_DEBUG_LEVEL >= 1 - # include # include # include # ifndef _LIBCPP_ASSERT # define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort())) # endif +#endif +#ifndef _LIBCPP_ASSERT +# define _LIBCPP_ASSERT(x, m) ((void)0) #endif #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: stable/9/contrib/libc++/include/__functional_03 ============================================================================== --- stable/9/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_03 Fri Feb 13 22:07:45 2015 (r278725) @@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp __base* __f_; template + _LIBCPP_INLINE_VISIBILITY static bool __not_null(const _Fp&) {return true;} template - static bool __not_null(const function<_Rp()>& __p) {return __p;} + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(_R2 (*__p)()) {return __p;} + template + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(const function<_R2()>& __p) {return __p;} public: typedef _Rp result_type; @@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type __mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>) { - __ti(_VSTD::forward::type>(get<_Indx>(__uj))...); + __ti(_VSTD::forward::type>(_VSTD::get<_Indx>(__uj))...); } template @@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; // compiler bug workaround - typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj); + typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj); return __t; -// return _VSTD::forward::type>(get<_Indx>(__uj)); +// return _VSTD::forward::type>(_VSTD::get<_Indx>(__uj)); } template @@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs, __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); + return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...); } template Modified: stable/9/contrib/libc++/include/__functional_base ============================================================================== --- stable/9/contrib/libc++/include/__functional_base Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_base Fri Feb 13 22:07:45 2015 (r278725) @@ -451,10 +451,10 @@ public: } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: stable/9/contrib/libc++/include/__functional_base_03 ============================================================================== --- stable/9/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:07:45 2015 (r278725) @@ -1027,7 +1027,7 @@ public: typename __invoke_return0::type operator() (_A0& __a0) const { - return __invoke(get(), __a0); + return __invoke(get(), __a0); } template @@ -1035,7 +1035,7 @@ public: typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return __invoke(get(), __a0, __a1); + return __invoke(get(), __a0, __a1); } template @@ -1043,14 +1043,14 @@ public: typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return __invoke(get(), __a0, __a1, __a2); + return __invoke(get(), __a0, __a1, __a2); } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: stable/9/contrib/libc++/include/__hash_table ============================================================================== --- stable/9/contrib/libc++/include/__hash_table Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__hash_table Fri Feb 13 22:07:45 2015 (r278725) @@ -20,11 +20,7 @@ #include <__undef_min_max> -#ifdef _LIBCPP_DEBUG -# include <__debug> -#else -# define _LIBCPP_ASSERT(x, m) ((void)0) -#endif +#include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Modified: stable/9/contrib/libc++/include/__locale ============================================================================== --- stable/9/contrib/libc++/include/__locale Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__locale Fri Feb 13 22:07:45 2015 (r278725) @@ -21,11 +21,22 @@ #include #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) # include -#elif _AIX +#elif defined(_AIX) # include -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) +#elif defined(__ANDROID__) +// Android gained the locale aware functions in L (API level 21) +# include +# if __ANDROID_API__ <= 20 +# include +# endif +#elif defined(__sun__) +# include +#elif defined(_NEWLIB_VERSION) +# include +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) # include -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ +#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -341,13 +352,15 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; +#elif defined(__ANDROID__) + typedef unsigned char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; @@ -357,7 +370,12 @@ public: static const mask alpha = _CTYPE_A; static const mask digit = _CTYPE_D; static const mask punct = _CTYPE_P; +# if defined(__ANDROID__) + static const mask xdigit = _CTYPE_X | _CTYPE_D; +# else static const mask xdigit = _CTYPE_X; +# endif + # if defined(__NetBSD__) static const mask blank = _CTYPE_BL; # else Modified: stable/9/contrib/libc++/include/__mutex_base ============================================================================== --- stable/9/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__mutex_base Fri Feb 13 22:07:45 2015 (r278725) @@ -22,6 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef _LIBCPP_HAS_NO_THREADS + class _LIBCPP_TYPE_VIS mutex { pthread_mutex_t __m_; @@ -254,19 +256,13 @@ void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT {__x.swap(__y);} -struct _LIBCPP_TYPE_VIS cv_status +//enum class cv_status +_LIBCPP_DECLARE_STRONG_ENUM(cv_status) { - enum __lx { - no_timeout, - timeout - }; - - __lx __v_; - - _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {} - _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} - + no_timeout, + timeout }; +_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status) class _LIBCPP_TYPE_VIS condition_variable { @@ -288,7 +284,7 @@ public: void notify_one() _NOEXCEPT; void notify_all() _NOEXCEPT; - void wait(unique_lock& __lk); + void wait(unique_lock& __lk) _NOEXCEPT; template void wait(unique_lock& __lk, _Predicate __pred); @@ -319,8 +315,9 @@ public: private: void __do_timed_wait(unique_lock& __lk, - chrono::time_point); + chrono::time_point) _NOEXCEPT; }; +#endif // !_LIBCPP_HAS_NO_THREADS template inline _LIBCPP_INLINE_VISIBILITY @@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _ return __r; } +#ifndef _LIBCPP_HAS_NO_THREADS template void condition_variable::wait(unique_lock& __lk, _Predicate __pred) @@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock _VSTD::move(__pred)); } +#endif // !_LIBCPP_HAS_NO_THREADS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___MUTEX_BASE Copied: stable/9/contrib/libc++/include/__refstring (from r277217, head/contrib/libc++/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/libc++/include/__refstring Fri Feb 13 22:07:45 2015 (r278725, copy of r277217, head/contrib/libc++/include/__refstring) @@ -0,0 +1,139 @@ +//===------------------------ __refstring ---------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___REFSTRING +#define _LIBCPP___REFSTRING + +#include <__config> +#include +#include +#if __APPLE__ +#include +#include +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +class _LIBCPP_HIDDEN __libcpp_refstring +{ +private: + const char* str_; + + typedef int count_t; + + struct _Rep_base + { + std::size_t len; + std::size_t cap; + count_t count; + }; + + static + _Rep_base* + rep_from_data(const char *data_) _NOEXCEPT + { + char *data = const_cast(data_); + return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base)); + } + static + char * + data_from_rep(_Rep_base *rep) _NOEXCEPT + { + char *data = reinterpret_cast(rep); + return data + sizeof(*rep); + } + +#if __APPLE__ + static + const char* + compute_gcc_empty_string_storage() _NOEXCEPT + { + void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); + if (handle == nullptr) + return nullptr; + void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE"); + if (sym == nullptr) + return nullptr; + return data_from_rep(reinterpret_cast<_Rep_base *>(sym)); + } + + static + const char* + get_gcc_empty_string_storage() _NOEXCEPT + { + static const char* p = compute_gcc_empty_string_storage(); + return p; + } + + bool + uses_refcount() const + { + return str_ != get_gcc_empty_string_storage(); + } +#else + bool + uses_refcount() const + { + return true; + } +#endif + +public: + explicit __libcpp_refstring(const char* msg) { + std::size_t len = strlen(msg); + _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1)); + rep->len = len; + rep->cap = len; + rep->count = 0; + char *data = data_from_rep(rep); + std::memcpy(data, msg, len + 1); + str_ = data; + } + + __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_) + { + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + } + + __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT + { + bool adjust_old_count = uses_refcount(); + struct _Rep_base *old_rep = rep_from_data(str_); + str_ = s.str_; + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + if (adjust_old_count) + { + if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0) + { + ::operator delete(old_rep); + } + } + return *this; + } + + ~__libcpp_refstring() + { + if (uses_refcount()) + { + _Rep_base* rep = rep_from_data(str_); + if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0) + { + ::operator delete(rep); + } + } + } + + const char* c_str() const _NOEXCEPT {return str_;} +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif //_LIBCPP___REFSTRING Modified: stable/9/contrib/libc++/include/__sso_allocator ============================================================================== --- stable/9/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__sso_allocator Fri Feb 13 22:07:45 2015 (r278725) @@ -55,14 +55,14 @@ public: __allocated_ = true; return (pointer)&buf_; } - return static_cast(::operator new(__n * sizeof(_Tp))); + return static_cast(_VSTD::__allocate(__n * sizeof(_Tp))); } _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) { if (__p == (pointer)&buf_) __allocated_ = false; else - ::operator delete(__p); + _VSTD::__deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} Modified: stable/9/contrib/libc++/include/__tree ============================================================================== --- stable/9/contrib/libc++/include/__tree Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__tree Fri Feb 13 22:07:45 2015 (r278725) @@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase __begin_node() = __r.__ptr_; --size(); __node_allocator& __na = __node_alloc(); - __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__np)); + __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __node_traits::deallocate(__na, __np, 1); return __r; } Modified: stable/9/contrib/libc++/include/__tuple ============================================================================== --- stable/9/contrib/libc++/include/__tuple Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__tuple Fri Feb 13 22:07:45 2015 (r278725) @@ -27,6 +27,32 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// __lazy_and + +template +struct __lazy_and_impl; + +template +struct __lazy_and_impl : false_type {}; + +template <> +struct __lazy_and_impl : true_type {}; + +template +struct __lazy_and_impl : integral_constant {}; + +template +struct __lazy_and_impl : __lazy_and_impl<_Hp::type::value, _Tp...> {}; + +template +struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {}; + +// __lazy_not + +template +struct __lazy_not : integral_constant {}; + + template class _LIBCPP_TYPE_VIS_ONLY tuple_size; template @@ -219,19 +245,30 @@ struct __make_tuple_types // __tuple_convertible -template +template struct __tuple_convertible_imp : public false_type {}; template -struct __tuple_convertible_imp, __tuple_types<_Up0, _Up...> > +struct __tuple_convertible_imp<__tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> > : public integral_constant::value && - __tuple_convertible_imp, __tuple_types<_Up...> >::value> {}; + __tuple_convertible_imp<__tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {}; template <> -struct __tuple_convertible_imp, __tuple_types<> > +struct __tuple_convertible_imp<__tuple_types<>, __tuple_types<> > : public true_type {}; +template +struct __tuple_convertible_apply : public false_type {}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:08:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 495BEFE9; Fri, 13 Feb 2015 22:08:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1937314F; Fri, 13 Feb 2015 22:08:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM8KDj023744; Fri, 13 Feb 2015 22:08:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM8KHK023741; Fri, 13 Feb 2015 22:08:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132208.t1DM8KHK023741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278726 - in stable/10/sys: arm/conf arm/s3c2xx0 arm/samsung/s3c2xx0 dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:08:21 -0000 Author: ian Date: Fri Feb 13 22:08:19 2015 New Revision: 278726 URL: https://svnweb.freebsd.org/changeset/base/278726 Log: MFC r272103: Move s3c2xx0 into the samsung directory. Added: stable/10/sys/arm/samsung/s3c2xx0/ - copied from r272103, head/sys/arm/samsung/s3c2xx0/ Deleted: stable/10/sys/arm/s3c2xx0/ Modified: stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NOTES stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/arm/conf/LN2410SBC Fri Feb 13 22:08:19 2015 (r278726) @@ -19,7 +19,7 @@ ident LN2410SBC -include "../s3c2xx0/std.ln2410sbc" +include "../samsung/s3c2xx0/std.ln2410sbc" #To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/arm/conf/NOTES Fri Feb 13 22:08:19 2015 (r278726) @@ -19,7 +19,7 @@ files "../mv/discovery/files.db78xxx" files "../mv/kirkwood/files.kirkwood" files "../mv/orion/files.db88f5xxx" files "../mv/orion/files.ts7800" -files "../s3c2xx0/files.s3c2xx0" +files "../samsung/s3c2xx0/files.s3c2xx0" files "../xscale/i80321/files.ep80219" files "../xscale/i80321/files.i80219" files "../xscale/i80321/files.i80321" Modified: stable/10/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Fri Feb 13 22:08:19 2015 (r278726) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include static device_probe_t ohci_s3c24x0_probe; static device_attach_t ohci_s3c24x0_attach; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:08:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8442427B for ; Fri, 13 Feb 2015 22:08:24 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40BB7150 for ; Fri, 13 Feb 2015 22:08:24 +0000 (UTC) Received: by pdjy10 with SMTP id y10so21965751pdj.13 for ; Fri, 13 Feb 2015 14:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=wmRCk1tX0Mu0rXZ0fEYiO7RHCqMArGNnUPEAFUFCJTI=; b=LhQILhYt7Z/PuXUApTIm+7iausmRwbkg66vQQKD1RQnBqgIamHwiO/EPav5w4CEl2s 4Ekiy+WOLuYEY9Fe9zGBmwyhlmX8tsMkN2mYpRCUHgN4umKawNAetbzqsAEHnVqjCCPC SVt8G2eLCVa4VWhwXD8E4nNGn2jnm4H0xDkNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=wmRCk1tX0Mu0rXZ0fEYiO7RHCqMArGNnUPEAFUFCJTI=; b=Lg1X5RT5ufMtD+HDH4e4JxcKYiR/V23fSMByPjJOpuTFkpAcZK78X7p/uCiBDyee1N QiQzlQKK7Q2yPjMjfSl6FhtSqPQKzd4q/sGJ4z/iA8Xti1AxWSRpcASPrelaA/wpgaiO 5FjxJmOc5R7XgNGSartIzsiHjLBt/G4E5mDG7a8bkQ9LO/LIXvZQQTrtM+S2haRIRIZ7 SQdMSZBF8m/MlqRpCs84eehCjNXfnr85oUMZTf+WpauNRRIdjiS5ap0IbtM6OSkFjDYj RqJ8/4NGgbz15u7+f0PwAs5VT0Es1JagiaQxGWL2usw2PgmN6eYmJwkpKkkMVGEfGd1o 9VAw== X-Gm-Message-State: ALoCoQmx65ZMeybHgInG6brIBfwsU4DnV932q+LA4Mw3lwGfcdiERdsK+MZ4akTG30/8cgSxFHPp X-Received: by 10.66.66.7 with SMTP id b7mr2165859pat.9.1423865297980; Fri, 13 Feb 2015 14:08:17 -0800 (PST) Received: from [10.64.24.11] ([69.53.236.236]) by mx.google.com with ESMTPSA id bi11sm7711793pdb.8.2015.02.13.14.08.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Feb 2015 14:08:16 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 From: Randall Stewart In-Reply-To: <20150213212128.GG15484@FreeBSD.org> Date: Fri, 13 Feb 2015 17:08:12 -0500 Message-Id: <1655B9AB-AC55-49EE-ADB6-F355F578915A@netflix.com> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <1903622.i3cFFNVYcL@ralph.baldwin.cx> <20150213212128.GG15484@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, John Baldwin , Eric van Gyzen , svn-src-all@freebsd.org, Randall Stewart , svn-src-head@freebsd.org, zont@FreeBSD.org, rstone@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:08:24 -0000 On Feb 13, 2015, at 4:21 PM, Gleb Smirnoff wrote: > On Mon, Feb 09, 2015 at 03:11:21PM -0500, John Baldwin wrote: > J> On Monday, February 09, 2015 07:28:12 PM Randall Stewart wrote: > J> > Author: rrs > J> > Date: Mon Feb 9 19:28:11 2015 > J> > New Revision: 278472 > J> > URL: https://svnweb.freebsd.org/changeset/base/278472 > J> >=20 > J> > Log: > J> > This fixes a bug in the way that the LLE timers for nd6 > J> > and arp were being used. They basically would pass in the > J> > mutex to the callout_init. Because they used this method > J> > to the callout system, it was possible to "stop" the callout. > J> > When flushing the table and you stopped the running callout, = the > J> > callout_stop code would return 1 indicating that it was going > J> > to stop the callout (that was about to run on the callout_wheel = blocked > J> > by the function calling the stop). Now when 1 was returned, it = would > J> > lower the reference count one extra time for the stopped timer, = then > J> > a few lines later delete the memory. Of course the = callout_wheel was > J> > stuck in the lock code and would then crash since it was = accessing > J> > freed memory. By using callout_init(c, 1) we always get a 0 = back > J> > and the reference counting bug does not rear its head. We do = have > J> > to make a few adjustments to the callouts themselves though to = make > J> > sure it does the proper thing if rescheduled as well as gets = the lock. > J> >=20 > J> > Commented upon by hiren and sbruno > J> > See Phabricator D1777 for more details. > J> >=20 > J> > Commented upon by hiren and sbruno > J> > Reviewed by: adrian, jhb and bz > J> > Sponsored by: Netflix Inc. > J>=20 > J> Eh, I looked at it, but I really, really don't like it. I think=20 > J> callout_init_*() should be preferred to CALLOUT_MPSAFE whenever = possible as it=20 > J> is less race-prone. I think this should probably be fixed by = adding Hans'=20 > J> callout_drain_async() instead, though this is fine as a temporary = workaround. >=20 > I second concerns. Please look at kern/165863 and r238990 that fixed = it. > Transition from CALLOUT_MPSAFE to callout_init_rw() was intentional > and fixed races. >=20 > I added to Cc guys who helped to track down that races. May be someone = still > has test scripts at hand. AFAIR, there were some that allowed to put a = box > down quite quickly. Well without it we can also put a box down quickly.. at least Sbruno and = Hiren seem to be able to.. you end up with deleted memory being accessed by the callout = code. I can look at kern/165863 and 238990.. let me go see what I can see ;0 >=20 > --=20 > Totus tuus, Glebius. -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:25:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24E0A4EC; Fri, 13 Feb 2015 22:25:31 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA7837D; Fri, 13 Feb 2015 22:25:30 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 31E6DCF892; Fri, 13 Feb 2015 14:25:24 -0800 (PST) Date: Fri, 13 Feb 2015 14:25:23 -0800 From: hiren panchasara To: Peter Holm Subject: Re: svn commit: r278623 - head/sys/kern Message-ID: <20150213222523.GD19044@strugglingcoder.info> References: <201502121331.t1CDV9jR086269@svn.freebsd.org> <20150213182901.GC19044@strugglingcoder.info> <20150213191106.GA30783@x2.osted.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="F8dlzb82+Fcn6AgP" Content-Disposition: inline In-Reply-To: <20150213191106.GA30783@x2.osted.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:25:31 -0000 --F8dlzb82+Fcn6AgP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/13/15 at 08:11P, Peter Holm wrote: > On Fri, Feb 13, 2015 at 10:29:01AM -0800, hiren panchasara wrote: > > On 02/12/15 at 01:31P, Randall Stewart wrote: > > > Author: rrs > > > Date: Thu Feb 12 13:31:08 2015 > > > New Revision: 278623 > > > URL: https://svnweb.freebsd.org/changeset/base/278623 > > >=20 > > > Log: > > > This fixes a bug I in-advertantly inserted when I updated the callo= ut > > > code in my last commit. The cc_exec_next is used to track the next > > > when a direct call is being made from callout. It is *never* used > > > in the in-direct method. When macro-izing I made it so that it > > > would separate out direct/vs/non-direct. This is incorrect and can > > > cause panics as Peter Holm has found for me (Thanks so much Peter f= or > > > all your help in this). What this change does is restore that behav= ior > > > but also get rid of the cc_next from the array and instead make it > > > be part of the base callout structure. This way no one else will get > > > confused since we will never use it for non-direct. > > > =20 > > > Reviewed by: Peter Holm and more importantly tested by him ;-) > > > MFC after: 3 days. > > > Sponsored by: Netflix Inc. > >=20 > > Can I get more info/backtraces for the panic, please? > >=20 >=20 > Sure. >=20 > These two panics were seen: >=20 > http://people.freebsd.org/~pho/stress/log/rrs004.txt > http://people.freebsd.org/~pho/stress/log/rrs005.txt Thank you, Peter. cheers Hiren --F8dlzb82+Fcn6AgP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU3nnTXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lwnoIAIIEExjvNO8cBGXP6h+KmODm uhOTSbSLiSFwdNsZCySIWRo/HAJ0rwACKvP+1hp4YHzQfpNt8LXyELVa6hGN+Dtj 1ieRG1X0Prx7mvFjEzXlOpsDiCJ5UCs+MSn8HdJttXCRiOsCqmsdzlxRMyolahHe 3E1seziYoGoNs+0Hic2zGzso+hFDzTGtWqIMBfZPJKkRVB4tsMdYTUbMqRInpDNt jaryLhi5FvfDpyGqUMHDQB1VbWJjq9dzxK9RjAbZKdSasZOeaBV0AnvGoCenmAve rEhFYzdLNw6YSf9IjDCN2EdXYonhFk2BQapNlLSVJjVKgKI8g6YOAzOq6G2AH7M= =R9L8 -----END PGP SIGNATURE----- --F8dlzb82+Fcn6AgP-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:27:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6F6E65D for ; Fri, 13 Feb 2015 22:27:46 +0000 (UTC) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 743EE39F for ; Fri, 13 Feb 2015 22:27:46 +0000 (UTC) Received: by pdbfl12 with SMTP id fl12so22122626pdb.2 for ; Fri, 13 Feb 2015 14:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=rYFPt1hjx02a79I+zHK+Hiro5J6ZtyyGELeL1DBgHHs=; b=Hs9W8FonpsDskpCepsl3JyahvEx0rqFyV5Lsslx+jD05ztidE2JuIs50q9tcjljPiy XZkgqN9kX1DAcDlVzJQyHRHUGW0m7HYFzeINEHwOtxSRFjoJlQhyp0VkwJ75atXAV5ZQ tVfAJg0vm03LB/LE06yDecfnsl37HSwmqF5Lc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=rYFPt1hjx02a79I+zHK+Hiro5J6ZtyyGELeL1DBgHHs=; b=GW+5hSkfv25Bey2q37ofV4FujVSbqQ2GLNnHdov0zbZ6WklSFoyG+IwpgZMkV3jvWH h+fxeRMAzEKMtDN2j3SwGKb7D9x69hDp+NL9CnoZ1NMPFGG9tiqig3UbcBU/pm2TXfnN A4jm5jtLzTyjU1I6vsU24TK8Hv7c2uIuHPbczEwvkJkqE8DqNcS8gRSdME4XloVM6ff9 dl2t0Oomujj7vqPC3wahaE+g6lyhbT/sQGtZjfTb6jwFwQy0QuFPxJ1/tEKDhVnRTMKN KnCLI/a22NGVCW8KEnKN5htg8ABXSHE/dA8xK2XvHzS5NNxxyOgqjjS3LAFe+6eEUAuC A8rQ== X-Gm-Message-State: ALoCoQlKBBdW8/ShGDEtUd71WkdnPhZ8xd3grTWhZuiPKtKARj0YWQgWVo++SAzfi4McLCTj/rrR X-Received: by 10.69.27.42 with SMTP id jd10mr19020947pbd.97.1423866466011; Fri, 13 Feb 2015 14:27:46 -0800 (PST) Received: from [10.64.24.11] ([69.53.236.236]) by mx.google.com with ESMTPSA id c9sm7667877pdm.51.2015.02.13.14.27.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Feb 2015 14:27:44 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 From: Randall Stewart In-Reply-To: <20150213212128.GG15484@FreeBSD.org> Date: Fri, 13 Feb 2015 17:27:40 -0500 Message-Id: <89BA29F2-C617-40DE-90E5-F3EC9C17AEC8@netflix.com> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <1903622.i3cFFNVYcL@ralph.baldwin.cx> <20150213212128.GG15484@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, John Baldwin , Eric van Gyzen , svn-src-all@freebsd.org, Randall Stewart , svn-src-head@freebsd.org, zont@FreeBSD.org, rstone@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:27:46 -0000 Gleb: Ok here is the diff of the arp timer function that this changed made = (238990): **************************** arptimer(void *arg) { + struct llentry *lle =3D (struct llentry *)arg; struct ifnet *ifp; - struct llentry *lle; - int pkts_dropped; + size_t pkts_dropped; =20 - KASSERT(arg !=3D NULL, ("%s: arg NULL", __func__)); - lle =3D (struct llentry *)arg; + if (lle->la_flags & LLE_STATIC) { + LLE_WUNLOCK(lle); + return; + } + ifp =3D lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); + + if (lle->la_flags !=3D LLE_DELETED) { + int evt; + + if (lle->la_flags & LLE_VALID) + evt =3D LLENTRY_EXPIRED; + else + evt =3D LLENTRY_TIMEDOUT; + EVENTHANDLER_INVOKE(lle_event, lle, evt); + } + + callout_stop(&lle->la_timer); + + /* XXX: LOR avoidance. We still have ref on lle. */ + LLE_WUNLOCK(lle); IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if (lle->la_flags & LLE_STATIC) - LLE_WUNLOCK(lle); - else { - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) { - callout_stop(&lle->la_timer); - LLE_REMREF(lle); =20 - if (lle->la_flags !=3D LLE_DELETED) { - int evt; - - if (lle->la_flags & LLE_VALID) - evt =3D LLENTRY_EXPIRED; - else - evt =3D LLENTRY_TIMEDOUT; - EVENTHANDLER_INVOKE(lle_event, lle, = evt); - } - - pkts_dropped =3D llentry_free(lle); - ARPSTAT_ADD(dropped, pkts_dropped); - ARPSTAT_INC(timeouts); - } else { -#ifdef DIAGNOSTIC - struct sockaddr *l3addr =3D L3_ADDR(lle); - log(LOG_INFO, - "arptimer issue: %p, IPv4 address: = \"%s\"\n", lle, - inet_ntoa( - ((const struct sockaddr_in = *)l3addr)->sin_addr)); -#endif - LLE_WUNLOCK(lle); - } - } + LLE_REMREF(lle); + pkts_dropped =3D llentry_free(lle); IF_AFDATA_UNLOCK(ifp); + ARPSTAT_ADD(dropped, pkts_dropped); + ARPSTAT_INC(timeouts); CURVNET_RESTORE(); } ****************************** And I can see *what* the problem was.. If you look at the lines: - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) { This is the *incorrect* way to write this code it should have been: if (callout_pending(&lle->la_timer) && !callout_active(&lle->la_timer)) { To properly do the MPSAFE thing.. take a look at the callout manual.. So the original author just mixed up the test..=20 The idea is after you get the lock you check if its pending again, if so someone has restarted it.. and if its not active, then someone has stopped it. They check if it was *not* pending.. which is almost always the case since the callout code removes the pending flag and thats what you want to be there. So not pending would always be true..=20 I don=92t see that this old code did the callout_deactive().. but I = think the callout_stop() does that I guess.. I think the problem was that the original code was wrong and that the fix yes, avoided one race but put in another. I do think a callout_async_drain is the right thing, but that will take = a while to get right. Peter Holm (thank you so much) has been pounding on this, = if you could find another test to add.. that would be great. I think this will = work the way it is.. R On Feb 13, 2015, at 4:21 PM, Gleb Smirnoff wrote: > 165863 -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:32:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E12980B; Fri, 13 Feb 2015 22:32:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7429E637; Fri, 13 Feb 2015 22:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DMW7sL037125; Fri, 13 Feb 2015 22:32:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DMW3qZ037103; Fri, 13 Feb 2015 22:32:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132232.t1DMW3qZ037103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278727 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/at91 arm/broadcom/bcm2835 arm/cavium/cns11xx arm/freescale/imx arm/freescale/vybrid arm/include arm/lpc arm/mv ar... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:32:07 -0000 Author: ian Date: Fri Feb 13 22:32:02 2015 New Revision: 278727 URL: https://svnweb.freebsd.org/changeset/base/278727 Log: MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471, r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516: Add inline implementations of arm bus_space_read/write_N(). Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. Use the explicit member initializer style to init the bus_space struct. Use arm/bus_space-v6.c for all armv6 systems Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6. Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct so that they all fit in a single cache line. Added: stable/10/sys/arm/arm/bus_space_base.c - copied, changed from r277472, head/sys/arm/arm/bus_space_base.c Deleted: stable/10/sys/arm/arm/bus_space-v6.c stable/10/sys/arm/lpc/lpc_space.c stable/10/sys/arm/mv/bus_space.c stable/10/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c stable/10/sys/arm/versatile/bus_space.c stable/10/sys/arm/versatile/versatile_pci_bus_space.c stable/10/sys/arm/versatile/versatile_pci_bus_space.h stable/10/sys/arm/xilinx/zy7_bus_space.c stable/10/sys/arm/xscale/i80321/obio_space.c stable/10/sys/arm/xscale/i8134x/obio_space.c Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/arm/bus_space_asm_generic.S stable/10/sys/arm/arm/bus_space_generic.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/files.at91 stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/cavium/cns11xx/econa.c stable/10/sys/arm/cavium/cns11xx/files.econa stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/include/bus.h stable/10/sys/arm/lpc/files.lpc stable/10/sys/arm/mv/files.mv stable/10/sys/arm/rockchip/files.rk30xx stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/arm/samsung/s3c2xx0/files.s3c2xx0 stable/10/sys/arm/samsung/s3c2xx0/s3c24x0.c stable/10/sys/arm/samsung/s3c2xx0/s3c2xx0var.h stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c stable/10/sys/arm/ti/files.ti stable/10/sys/arm/versatile/files.versatile stable/10/sys/arm/versatile/versatile_pci.c stable/10/sys/arm/xilinx/files.zynq7 stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/files.ep80219 stable/10/sys/arm/xscale/i80321/files.i80219 stable/10/sys/arm/xscale/i80321/files.i80321 stable/10/sys/arm/xscale/i80321/files.iq31244 stable/10/sys/arm/xscale/i80321/i80321_space.c stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i80321/obio.c stable/10/sys/arm/xscale/i80321/obiovar.h stable/10/sys/arm/xscale/i80321/uart_cpu_i80321.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/i8134x/files.i81342 stable/10/sys/arm/xscale/i8134x/i81342_space.c stable/10/sys/arm/xscale/i8134x/obio.c stable/10/sys/arm/xscale/i8134x/obiovar.h stable/10/sys/arm/xscale/i8134x/uart_cpu_i81342.c stable/10/sys/arm/xscale/ixp425/avila_ata.c stable/10/sys/arm/xscale/ixp425/cambria_exp_space.c stable/10/sys/arm/xscale/ixp425/ixp425_a4x_space.c stable/10/sys/arm/xscale/ixp425/ixp425_pci_space.c stable/10/sys/arm/xscale/ixp425/ixp425_space.c stable/10/sys/arm/xscale/pxa/pxa_space.c stable/10/sys/dev/usb/controller/ehci_ixp4xx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:32:02 2015 (r278727) @@ -17,7 +17,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -arm/allwinner/a10_common.c standard +arm/arm/bus_space_base.c standard +arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:32:02 2015 (r278727) @@ -19,5 +19,5 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/aintc.c standard arm/allwinner/if_emac.c optional emac arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -#arm/allwinner/console.c standard +arm/arm/bus_space_base.c standard +#arm/allwinner/console.c standard Modified: stable/10/sys/arm/arm/bus_space_asm_generic.S ============================================================================== --- stable/10/sys/arm/arm/bus_space_asm_generic.S Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/arm/bus_space_asm_generic.S Fri Feb 13 22:32:02 2015 (r278727) @@ -52,10 +52,10 @@ ENTRY(generic_bs_r_1) RET END(generic_bs_r_1) -ENTRY(generic_armv4_bs_r_2) +ENTRY(generic_bs_r_2) ldrh r0, [r1, r2] RET -END(generic_armv4_bs_r_2) +END(generic_bs_r_2) ENTRY(generic_bs_r_4) ldr r0, [r1, r2] @@ -71,10 +71,10 @@ ENTRY(generic_bs_w_1) RET END(generic_bs_w_1) -ENTRY(generic_armv4_bs_w_2) +ENTRY(generic_bs_w_2) strh r3, [r1, r2] RET -END(generic_armv4_bs_w_2) +END(generic_bs_w_2) ENTRY(generic_bs_w_4) str r3, [r1, r2] @@ -100,7 +100,7 @@ ENTRY(generic_bs_rm_1) RET END(generic_bs_rm_1) -ENTRY(generic_armv4_bs_rm_2) +ENTRY(generic_bs_rm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -113,7 +113,7 @@ ENTRY(generic_armv4_bs_rm_2) bne 1b RET -END(generic_armv4_bs_rm_2) +END(generic_bs_rm_2) ENTRY(generic_bs_rm_4) add r0, r1, r2 @@ -149,7 +149,7 @@ ENTRY(generic_bs_wm_1) RET END(generic_bs_wm_1) -ENTRY(generic_armv4_bs_wm_2) +ENTRY(generic_bs_wm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -162,7 +162,7 @@ ENTRY(generic_armv4_bs_wm_2) bne 1b RET -END(generic_armv4_bs_wm_2) +END(generic_bs_wm_2) ENTRY(generic_bs_wm_4) add r0, r1, r2 @@ -198,7 +198,7 @@ ENTRY(generic_bs_rr_1) RET END(generic_bs_rr_1) -ENTRY(generic_armv4_bs_rr_2) +ENTRY(generic_bs_rr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -211,7 +211,7 @@ ENTRY(generic_armv4_bs_rr_2) bne 1b RET -END(generic_armv4_bs_rr_2) +END(generic_bs_rr_2) ENTRY(generic_bs_rr_4) add r0, r1, r2 @@ -247,7 +247,7 @@ ENTRY(generic_bs_wr_1) RET END(generic_bs_wr_1) -ENTRY(generic_armv4_bs_wr_2) +ENTRY(generic_bs_wr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -260,7 +260,7 @@ ENTRY(generic_armv4_bs_wr_2) bne 1b RET -END(generic_armv4_bs_wr_2) +END(generic_bs_wr_2) ENTRY(generic_bs_wr_4) add r0, r1, r2 @@ -295,7 +295,7 @@ ENTRY(generic_bs_sr_1) RET END(generic_bs_sr_1) -ENTRY(generic_armv4_bs_sr_2) +ENTRY(generic_bs_sr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -307,7 +307,7 @@ ENTRY(generic_armv4_bs_sr_2) bne 1b RET -END(generic_armv4_bs_sr_2) +END(generic_bs_sr_2) ENTRY(generic_bs_sr_4) add r0, r1, r2 @@ -327,7 +327,7 @@ END(generic_bs_sr_4) * copy region */ -ENTRY(generic_armv4_bs_c_2) +ENTRY(generic_bs_c_2) add r0, r1, r2 ldr r2, [sp, #0] add r1, r2, r3 @@ -356,5 +356,5 @@ ENTRY(generic_armv4_bs_c_2) bne 3b RET -END(generic_armv4_bs_c_2) +END(generic_bs_c_2) Copied and modified: stable/10/sys/arm/arm/bus_space_base.c (from r277472, head/sys/arm/arm/bus_space_base.c) ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed Jan 21 03:44:29 2015 (r277472, copy source) +++ stable/10/sys/arm/arm/bus_space_base.c Fri Feb 13 22:32:02 2015 (r278727) @@ -45,7 +45,7 @@ bs_protos(generic); * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ -static struct bus_space arm_base_tag = { +static struct bus_space arm_base_bus_space __aligned(CACHE_LINE_SIZE) = { /* privdata is whatever the implementer wants; unused in base tag */ .bs_privdata = NULL, @@ -153,5 +153,7 @@ static struct bus_space arm_base_tag = { }; #ifdef FDT -bus_space_tag_t fdtbus_bs_tag = &arm_base_tag; +bus_space_tag_t fdtbus_bs_tag = &arm_base_bus_space; #endif + +bus_space_tag_t arm_base_bs_tag = &arm_base_bus_space; Modified: stable/10/sys/arm/arm/bus_space_generic.c ============================================================================== --- stable/10/sys/arm/arm/bus_space_generic.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/arm/bus_space_generic.c Fri Feb 13 22:32:02 2015 (r278727) @@ -53,11 +53,18 @@ __FBSDID("$FreeBSD$"); #include #include +void +generic_bs_unimplemented(void) +{ + + panic("unimplemented bus_space function called"); +} + /* Prototypes for all the bus_space structure functions */ bs_protos(generic); int -generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +generic_bs_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { void *va; @@ -74,7 +81,7 @@ generic_bs_map(void *t, bus_addr_t bpa, } int -generic_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, +generic_bs_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -84,21 +91,21 @@ generic_bs_alloc(void *t, bus_addr_t rst void -generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +generic_bs_unmap(bus_space_tag_t t, bus_space_handle_t h, bus_size_t size) { pmap_unmapdev((vm_offset_t)h, size); } void -generic_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +generic_bs_free(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) { panic("generic_bs_free(): not implemented"); } int -generic_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_subregion(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -107,7 +114,7 @@ generic_bs_subregion(void *t, bus_space_ } void -generic_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_barrier(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t len, int flags) { Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/at91/at91.c Fri Feb 13 22:32:02 2015 (r278727) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); uint32_t at91_master_clock; static int -at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +at91_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { vm_paddr_t pa, endpa; @@ -77,23 +77,18 @@ at91_bs_map(void *t, bus_addr_t bpa, bus } static void -at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +at91_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { - vm_offset_t va, endva; + vm_offset_t va; - if (t == 0) - return; - va = trunc_page((vm_offset_t)t); + va = (vm_offset_t)h; if (va >= AT91_BASE && va <= AT91_BASE + 0xff00000) return; - endva = round_page((vm_offset_t)t + size); - - /* Free the kernel virtual mapping. */ - kva_free(va, endva - va); + pmap_unmapdev(va, size); } static int -at91_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +at91_bs_subregion(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -102,7 +97,7 @@ at91_bs_subregion(void *t, bus_space_han } static void -at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, +at91_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, int a) { } @@ -121,113 +116,112 @@ bus_dma_get_range_nb(void) } bs_protos(generic); -bs_protos(generic_armv4); struct bus_space at91_bs_tag = { - /* cookie */ - (void *) 0, + /* privdata is whatever the implementer wants; unused in base tag */ + .bs_privdata = NULL, /* mapping/unmapping */ - at91_bs_map, - at91_bs_unmap, - at91_bs_subregion, + .bs_map = at91_bs_map, + .bs_unmap = at91_bs_unmap, + .bs_subregion = at91_bs_subregion, /* allocation/deallocation */ - NULL, - NULL, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - at91_barrier, + .bs_barrier = at91_barrier, /* read (single) */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, + .bs_r_1 = NULL, /* Use inline code in bus.h */ + .bs_r_2 = NULL, /* Use inline code in bus.h */ + .bs_r_4 = NULL, /* Use inline code in bus.h */ + .bs_r_8 = NULL, /* Use inline code in bus.h */ /* read multiple */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = BS_UNIMPLEMENTED, /* write (single) */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, + .bs_w_1 = NULL, /* Use inline code in bus.h */ + .bs_w_2 = NULL, /* Use inline code in bus.h */ + .bs_w_4 = NULL, /* Use inline code in bus.h */ + .bs_w_8 = NULL, /* Use inline code in bus.h */ /* write multiple */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ - NULL, - generic_armv4_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = BS_UNIMPLEMENTED, /* set multiple */ - NULL, - NULL, - NULL, - NULL, + .bs_sm_1 = BS_UNIMPLEMENTED, + .bs_sm_2 = BS_UNIMPLEMENTED, + .bs_sm_4 = BS_UNIMPLEMENTED, + .bs_sm_8 = BS_UNIMPLEMENTED, /* set region */ - NULL, - generic_armv4_bs_sr_2, - generic_bs_sr_4, - NULL, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ - NULL, - generic_armv4_bs_c_2, - NULL, - NULL, - - /* read (single) stream */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, + .bs_c_1 = BS_UNIMPLEMENTED, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = BS_UNIMPLEMENTED, + .bs_c_8 = BS_UNIMPLEMENTED, + + /* read stream (single) */ + .bs_r_1_s = NULL, /* Use inline code in bus.h */ + .bs_r_2_s = NULL, /* Use inline code in bus.h */ + .bs_r_4_s = NULL, /* Use inline code in bus.h */ + .bs_r_8_s = NULL, /* Use inline code in bus.h */ /* read multiple stream */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = BS_UNIMPLEMENTED, /* read region stream */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) stream */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = BS_UNIMPLEMENTED, + + /* write stream (single) */ + .bs_w_1_s = NULL, /* Use inline code in bus.h */ + .bs_w_2_s = NULL, /* Use inline code in bus.h */ + .bs_w_4_s = NULL, /* Use inline code in bus.h */ + .bs_w_8_s = NULL, /* Use inline code in bus.h */ /* write multiple stream */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = BS_UNIMPLEMENTED, /* write region stream */ - NULL, - generic_armv4_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = BS_UNIMPLEMENTED, }; #ifndef FDT Modified: stable/10/sys/arm/at91/files.at91 ============================================================================== --- stable/10/sys/arm/at91/files.at91 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/at91/files.at91 Fri Feb 13 22:32:02 2015 (r278727) @@ -1,4 +1,5 @@ # $FreeBSD$ +arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Feb 13 22:32:02 2015 (r278727) @@ -16,7 +16,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.c standard dev/usb/controller/dwc_otg_fdt.c optional dwcotg -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard Modified: stable/10/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/econa.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/cavium/cns11xx/econa.c Fri Feb 13 22:32:02 2015 (r278727) @@ -56,117 +56,7 @@ unsigned int CPU_clock = 200000000; unsigned int AHB_clock; unsigned int APB_clock; -bs_protos(generic); -bs_protos(generic_armv4); - -struct bus_space econa_bs_tag = { - /* cookie */ - (void *) 0, - - /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, - - /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, - - /* barrier */ - generic_bs_barrier, - - /* read (single) */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region */ - NULL, - NULL, - NULL, - NULL, - - /* set multiple */ - NULL, - NULL, - NULL, - NULL, - - /* set region */ - NULL, - NULL, - NULL, - NULL, - - /* copy */ - NULL, - NULL, - NULL, - NULL, - - /* read (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* read multiple stream */ - NULL, - generic_armv4_bs_rm_2, - NULL, - NULL, - - /* read region stream */ - NULL, - NULL, - NULL, - NULL, - - /* write (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* write multiple stream */ - NULL, - generic_armv4_bs_wm_2, - NULL, - NULL, - - /* write region stream */ - NULL, - NULL, - NULL, - NULL -}; - -bus_space_tag_t obio_tag = &econa_bs_tag; +bus_space_tag_t obio_tag; static int econa_probe(device_t dev) @@ -465,8 +355,10 @@ econa_attach(device_t dev) struct econa_softc *sc = device_get_softc(dev); int i; + obio_tag = arm_base_bs_tag; + econa_softc = sc; - sc->ec_st = &econa_bs_tag; + sc->ec_st = arm_base_bs_tag; sc->ec_sh = ECONA_IO_BASE; sc->dev = dev; if (bus_space_subregion(sc->ec_st, sc->ec_sh, ECONA_PIC_BASE, @@ -548,7 +440,7 @@ econa_alloc_resource(device_t dev, devic rle->res = rman_reserve_resource(&sc->ec_mem_rman, start, end, count, flags, child); if (rle->res != NULL) { - rman_set_bustag(rle->res, &econa_bs_tag); + rman_set_bustag(rle->res, arm_base_bs_tag); rman_set_bushandle(rle->res, start); } break; Modified: stable/10/sys/arm/cavium/cns11xx/files.econa ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/files.econa Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/cavium/cns11xx/files.econa Fri Feb 13 22:32:02 2015 (r278727) @@ -6,6 +6,7 @@ arm/cavium/cns11xx/timer.c standard arm/cavium/cns11xx/uart_bus_ec.c optional uart arm/cavium/cns11xx/uart_cpu_ec.c optional uart dev/uart/uart_dev_ns8250.c optional uart +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/cavium/cns11xx/ehci_ebus.c optional ehci arm/cavium/cns11xx/ohci_ec.c optional ohci Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:32:02 2015 (r278727) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:32:02 2015 (r278727) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:32:02 2015 (r278727) @@ -15,7 +15,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Fri Feb 13 22:32:02 2015 (r278727) @@ -9,7 +9,7 @@ arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Modified: stable/10/sys/arm/include/bus.h ============================================================================== --- stable/10/sys/arm/include/bus.h Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/include/bus.h Fri Feb 13 22:32:02 2015 (r278727) @@ -79,172 +79,180 @@ #define BUS_SPACE_MAP_LINEAR 0x02 #define BUS_SPACE_MAP_PREFETCHABLE 0x04 +/* + * Bus space for ARM. + * + * The functions used most often are grouped together at the beginning to ensure + * that all the data fits into a single cache line. The inline implementations + * of single read/write access these values a lot. + */ struct bus_space { - /* cookie */ - void *bs_cookie; + /* Read/write single and barrier: the most commonly used functions. */ + uint8_t (*bs_r_1)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + void (*bs_w_1)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_4)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_barrier)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, bus_size_t, int); + + /* Backlink to parent (if copied), and implementation private data. */ + struct bus_space *bs_parent; + void *bs_privdata; /* mapping/unmapping */ - int (*bs_map) (void *, bus_addr_t, bus_size_t, + int (*bs_map) (bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap) (void *, bus_space_handle_t, bus_size_t); - int (*bs_subregion) (void *, bus_space_handle_t, + void (*bs_unmap) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + int (*bs_subregion) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); /* allocation/deallocation */ - int (*bs_alloc) (void *, bus_addr_t, bus_addr_t, + int (*bs_alloc) (bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t, bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *); - void (*bs_free) (void *, bus_space_handle_t, + void (*bs_free) (bus_space_tag_t, bus_space_handle_t, bus_size_t); - /* get kernel virtual address */ - /* barrier */ - void (*bs_barrier) (void *, bus_space_handle_t, - bus_size_t, bus_size_t, int); - - /* read (single) */ - u_int8_t (*bs_r_1) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8) (void *, bus_space_handle_t, bus_size_t); + /* Read single, the less commonly used functions. */ + uint16_t (*bs_r_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple */ - void (*bs_rm_1) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region */ - void (*bs_rr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); - /* write (single) */ - void (*bs_w_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + /* Write single, the less commonly used functions. */ + void (*bs_w_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple */ - void (*bs_wm_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region */ - void (*bs_wr_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* set multiple */ - void (*bs_sm_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sm_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* set region */ - void (*bs_sr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* copy */ - void (*bs_c_1) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_2) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_4) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_8) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); /* read stream (single) */ - u_int8_t (*bs_r_1_s) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2_s) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4_s) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8_s) (void *, bus_space_handle_t, bus_size_t); + uint8_t (*bs_r_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint16_t (*bs_r_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple stream */ - void (*bs_rm_1_s) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2_s) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region stream */ - void (*bs_rr_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* write stream (single) */ - void (*bs_w_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + void (*bs_w_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_w_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple stream */ - void (*bs_wm_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region stream */ - void (*bs_wr_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); }; +extern bus_space_tag_t arm_base_bs_tag; /* * Utility macros; INTERNAL USE ONLY. @@ -252,51 +260,69 @@ struct bus_space { #define __bs_c(a,b) __CONCAT(a,b) #define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 22:55:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1233C97; Fri, 13 Feb 2015 22:55:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB61E873; Fri, 13 Feb 2015 22:55:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DMtQjq047109; Fri, 13 Feb 2015 22:55:26 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DMtQ3K047108; Fri, 13 Feb 2015 22:55:26 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201502132255.t1DMtQ3K047108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Fri, 13 Feb 2015 22:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278728 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:55:27 -0000 Author: thomas Date: Fri Feb 13 22:55:25 2015 New Revision: 278728 URL: https://svnweb.freebsd.org/changeset/base/278728 Log: (backup_kernel_finddir, backup_kernel, install_files): Add missing references to $BASEDIR, in order to allow correct operation when updating a system mounted at another location than / (e.g. when updating an alternate Boot Environment). Reviewed by: cperciva MFC after: 1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Feb 13 22:32:02 2015 (r278727) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Feb 13 22:55:25 2015 (r278728) @@ -2634,14 +2634,14 @@ backup_kernel_finddir () { while true ; do # Pathname does not exist, so it is OK use that name # for backup directory. - if [ ! -e $BACKUPKERNELDIR ]; then + if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then return 0 fi # If directory do exist, we only use if it has our # marker file. - if [ -d $BACKUPKERNELDIR -a \ - -e $BACKUPKERNELDIR/.freebsd-update ]; then + if [ -d $BASEDIR/$BACKUPKERNELDIR -a \ + -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then return 0 fi @@ -2649,7 +2649,7 @@ backup_kernel_finddir () { # the end and try again. CNT=$((CNT + 1)) if [ $CNT -gt 9 ]; then - echo "Could not find valid backup dir ($BACKUPKERNELDIR)" + echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)" exit 1 fi BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`" @@ -2676,17 +2676,17 @@ backup_kernel () { # Remove old kernel backup files. If $BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then + rm -fr $BASEDIR/$BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR - mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mkdir -p $BASEDIR/$BACKUPKERNELDIR + mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \ + mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2704,8 +2704,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f @@ -2803,7 +2803,7 @@ install_files () { # Update linker.hints if necessary if [ -s INDEX-OLD -o -s INDEX-NEW ]; then - kldxref -R /boot/ 2>/dev/null + kldxref -R ${BASEDIR}/boot/ 2>/dev/null fi # We've finished updating the kernel. @@ -2854,14 +2854,14 @@ Kernel updates have been installed. Ple install_delete INDEX-OLD INDEX-NEW || return 1 # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. - if [ /etc/master.passwd -nt /etc/spwd.db ] || - [ /etc/master.passwd -nt /etc/pwd.db ]; then - pwd_mkdb /etc/master.passwd + if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then + pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. - if [ /etc/login.conf -nt /etc/login.conf.db ]; then - cap_mkdb /etc/login.conf + if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then + cap_mkdb ${BASEDIR}/etc/login.conf fi # We've finished installing the world and deleting old files From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:19:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14A8BF45; Fri, 13 Feb 2015 23:19:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F37E4A3B; Fri, 13 Feb 2015 23:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNJZ1M057046; Fri, 13 Feb 2015 23:19:35 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNJZuP057045; Fri, 13 Feb 2015 23:19:35 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201502132319.t1DNJZuP057045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Fri, 13 Feb 2015 23:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278729 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:19:36 -0000 Author: sjg Date: Fri Feb 13 23:19:35 2015 New Revision: 278729 URL: https://svnweb.freebsd.org/changeset/base/278729 Log: sbspace: size of bleft, mleft must match sockbuf fields to avoid overflow on amd64 Submitted by: anshukla@juniper.net Obtained from: Juniper Networks Modified: head/sys/sys/sockbuf.h Modified: head/sys/sys/sockbuf.h ============================================================================== --- head/sys/sys/sockbuf.h Fri Feb 13 22:55:25 2015 (r278728) +++ head/sys/sys/sockbuf.h Fri Feb 13 23:19:35 2015 (r278729) @@ -212,7 +212,7 @@ sbused(struct sockbuf *sb) static inline long sbspace(struct sockbuf *sb) { - long bleft, mleft; + int bleft, mleft; /* size should match sockbuf fields */ #if 0 SOCKBUF_LOCK_ASSERT(sb); From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:30:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B54D4216; Fri, 13 Feb 2015 23:30:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9597ABEB; Fri, 13 Feb 2015 23:30:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNUnXU062417; Fri, 13 Feb 2015 23:30:49 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNUnR6062414; Fri, 13 Feb 2015 23:30:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132330.t1DNUnR6062414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278730 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:30:49 -0000 Author: ian Date: Fri Feb 13 23:30:48 2015 New Revision: 278730 URL: https://svnweb.freebsd.org/changeset/base/278730 Log: MFC r277532, r277533: Add Maxmem global for arm. Modified: stable/10/sys/arm/arm/physmem.c stable/10/sys/arm/include/md_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/physmem.c ============================================================================== --- stable/10/sys/arm/arm/physmem.c Fri Feb 13 23:19:35 2015 (r278729) +++ stable/10/sys/arm/arm/physmem.c Fri Feb 13 23:30:48 2015 (r278730) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* @@ -86,8 +87,12 @@ static size_t excnt; vm_paddr_t phys_avail[MAX_AVAIL_ENTRIES + 2]; /* +2 to allow for a pair */ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES + 2]; /* of zeroes to terminate. */ -/* This is the total number of hardware pages, excluded or not. */ +/* + * realmem is the total number of hardware pages, excluded or not. + * Maxmem is one greater than the last physical page number. + */ long realmem; +long Maxmem; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; @@ -152,8 +157,8 @@ arm_physmem_print_tables() * * Returns the number of pages of non-excluded memory added to the avail list. */ -static long -regions_to_avail(vm_paddr_t *avail, uint32_t exflags) +static size_t +regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail) { size_t acnt, exi, hwi; vm_paddr_t end, start, xend, xstart; @@ -236,7 +241,9 @@ regions_to_avail(vm_paddr_t *avail, uint panic("Not enough space in the dump/phys_avail arrays"); } - return (availmem); + if (pavail) + *pavail = availmem; + return (acnt); } /* @@ -311,13 +318,23 @@ void arm_physmem_exclude_region(vm_paddr /* * Process all the regions added earlier into the global avail lists. + * + * Updates the kernel global 'physmem' with the number of physical pages + * available for use (all pages not in any exclusion region). + * + * Updates the kernel global 'Maxmem' with the page number one greater then the + * last page of physical memory in the system. */ void arm_physmem_init_kernel_globals(void) { + size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP); - physmem = regions_to_avail(phys_avail, EXFLAG_NOALLOC); + regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL); + nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem); + if (nextidx == 0) + panic("No memory entries in phys_avail"); + Maxmem = atop(phys_avail[nextidx - 1]); } #ifdef DDB Modified: stable/10/sys/arm/include/md_var.h ============================================================================== --- stable/10/sys/arm/include/md_var.h Fri Feb 13 23:19:35 2015 (r278729) +++ stable/10/sys/arm/include/md_var.h Fri Feb 13 23:30:48 2015 (r278730) @@ -33,6 +33,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ +extern long Maxmem; extern char sigcode[]; extern int szsigcode; extern uint32_t *vm_page_dump; From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:32:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FBAB36F; Fri, 13 Feb 2015 23:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79E82C05; Fri, 13 Feb 2015 23:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNW41g065558; Fri, 13 Feb 2015 23:32:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNW4YC065557; Fri, 13 Feb 2015 23:32:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132332.t1DNW4YC065557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278731 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:32:04 -0000 Author: ian Date: Fri Feb 13 23:32:03 2015 New Revision: 278731 URL: https://svnweb.freebsd.org/changeset/base/278731 Log: MFC r277523: Add last_fault_code when DEBUG is defined. Modified: stable/10/sys/arm/arm/trap-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/trap-v6.c ============================================================================== --- stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 23:30:48 2015 (r278730) +++ stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 23:32:03 2015 (r278731) @@ -67,6 +67,10 @@ __FBSDID("$FreeBSD$"); extern char fusubailout[]; +#ifdef DEBUG +int last_fault_code; /* For the benefit of pmap_fault_fixup() */ +#endif + struct ksig { int sig; u_long code; @@ -457,6 +461,10 @@ abort_handler(struct trapframe *tf, int if (prefetch) ftype |= VM_PROT_EXECUTE; +#ifdef DEBUG + last_fault_code = fsr; +#endif + #ifndef ARM_NEW_PMAP if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, usermode)) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:34:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 554DB4C8; Fri, 13 Feb 2015 23:34:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33423C1A; Fri, 13 Feb 2015 23:34:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNYfTg065921; Fri, 13 Feb 2015 23:34:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNYeE0065919; Fri, 13 Feb 2015 23:34:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132334.t1DNYeE0065919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278732 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:34:41 -0000 Author: ian Date: Fri Feb 13 23:34:40 2015 New Revision: 278732 URL: https://svnweb.freebsd.org/changeset/base/278732 Log: MFC r277555, r277568: Enable all sd device clocks on imx6. Add imx5/6 pinmux driver support for encoded input register configs. Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c stable/10/sys/arm/freescale/imx/imx_iomux.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri Feb 13 23:32:03 2015 (r278731) +++ stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri Feb 13 23:34:40 2015 (r278732) @@ -95,7 +95,7 @@ ccm_init_gates(struct ccm_softc *sc) WR4(sc, CCM_CCGR3, 0x3ff00000); /* DDR memory controller */ WR4(sc, CCM_CCGR4, 0x0000f300); /* pl301 bus crossbar */ WR4(sc, CCM_CCGR5, 0x0f000000); /* uarts */ - WR4(sc, CCM_CCGR6, 0x000000cc); /* usdhc 1 & 3 */ + WR4(sc, CCM_CCGR6, 0x000000ff); /* usdhc 1-4 */ } static int Modified: stable/10/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_iomux.c Fri Feb 13 23:32:03 2015 (r278731) +++ stable/10/sys/arm/freescale/imx/imx_iomux.c Fri Feb 13 23:34:40 2015 (r278732) @@ -117,10 +117,36 @@ WR4(struct iomux_softc *sc, bus_size_t o bus_write_4(sc->mem_res, off, val); } +static void +iomux_configure_input(struct iomux_softc *sc, uint32_t reg, uint32_t val) +{ + u_int select, mask, shift, width; + + /* If register and value are zero, there is nothing to configure. */ + if (reg == 0 && val == 0) + return; + + /* + * If the config value has 0xff in the high byte it is encoded: + * 31 23 15 7 0 + * | 0xff | shift | width | select | + * We need to mask out the old select value and OR in the new, using a + * mask of the given width and shifting the values up by shift. + */ + if ((val & 0xff000000) == 0xff000000) { + select = val & 0x000000ff; + width = (val & 0x0000ff00) >> 8; + shift = (val & 0x00ff0000) >> 16; + mask = ((1u << width) - 1) << shift; + val = (RD4(sc, reg) & ~mask) | (select << shift); + } + WR4(sc, reg, val); +} + static int iomux_configure_pins(device_t dev, phandle_t cfgxref) { - struct iomux_softc * sc; + struct iomux_softc *sc; struct pincfg *cfgtuples, *cfg; phandle_t cfgnode; int i, ntuples; @@ -137,8 +163,7 @@ iomux_configure_pins(device_t dev, phand for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) { sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0; WR4(sc, cfg->mux_reg, cfg->mux_val | sion); - if (cfg->input_reg != 0) - WR4(sc, cfg->input_reg, cfg->input_val); + iomux_configure_input(sc, cfg->input_reg, cfg->input_val); if ((cfg->padconf_val & PADCONF_NONE) == 0) WR4(sc, cfg->padconf_reg, cfg->padconf_val); if (bootverbose) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:35:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DB57600; Fri, 13 Feb 2015 23:35:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7EAC23; Fri, 13 Feb 2015 23:35:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNZxNu066157; Fri, 13 Feb 2015 23:35:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNZxr9066156; Fri, 13 Feb 2015 23:35:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201502132335.t1DNZxr9066156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 13 Feb 2015 23:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278733 - head/lib/libiconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:35:59 -0000 Author: bdrewery Date: Fri Feb 13 23:35:58 2015 New Revision: 278733 URL: https://svnweb.freebsd.org/changeset/base/278733 Log: Remove disconnected (and broken) directory libiconv. It was added in the initial citrus import in r219019 but never used as iconv is just built with libc. A libiconv.so was handled by lib/libiconv_compat for a while but removed in r257583. Deleted: head/lib/libiconv/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:37:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF3E974A; Fri, 13 Feb 2015 23:37:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9175C37; Fri, 13 Feb 2015 23:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNbCQP066371; Fri, 13 Feb 2015 23:37:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNbCrV066370; Fri, 13 Feb 2015 23:37:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132337.t1DNbCrV066370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278734 - stable/10/sys/dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:37:13 -0000 Author: ian Date: Fri Feb 13 23:37:11 2015 New Revision: 278734 URL: https://svnweb.freebsd.org/changeset/base/278734 Log: MFC r277655, r277989: Reimplement fdt_clock_register_provider() correctly. Modified: stable/10/sys/dev/fdt/fdt_clock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fdt/fdt_clock.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_clock.c Fri Feb 13 23:35:58 2015 (r278733) +++ stable/10/sys/dev/fdt/fdt_clock.c Fri Feb 13 23:37:11 2015 (r278734) @@ -149,7 +149,8 @@ void fdt_clock_register_provider(device_t provider) { - OF_device_register_xref(OF_xref_from_device(provider), provider); + OF_device_register_xref( + OF_xref_from_node(ofw_bus_get_node(provider)), provider); } void From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:37:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56F8D87B; Fri, 13 Feb 2015 23:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4116EC3C; Fri, 13 Feb 2015 23:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNbvr2066491; Fri, 13 Feb 2015 23:37:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNbvSP066490; Fri, 13 Feb 2015 23:37:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132337.t1DNbvSP066490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278735 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:37:57 -0000 Author: ian Date: Fri Feb 13 23:37:56 2015 New Revision: 278735 URL: https://svnweb.freebsd.org/changeset/base/278735 Log: MFC r278031: Remove a stale comment. Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Fri Feb 13 23:37:11 2015 (r278734) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Fri Feb 13 23:37:56 2015 (r278735) @@ -835,8 +835,6 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - /* Be careful not to access map from here on. */ - bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); if (bufzone != NULL && dmat->alignment <= bufzone->size && From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:38:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF5F79B2; Fri, 13 Feb 2015 23:38:22 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6199AC47; Fri, 13 Feb 2015 23:38:21 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1DNcCtw033825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Feb 2015 02:38:12 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1DNcB49033824; Sat, 14 Feb 2015 02:38:11 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 14 Feb 2015 02:38:11 +0300 From: Gleb Smirnoff To: Randall Stewart Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150213233811.GH15484@FreeBSD.org> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <1903622.i3cFFNVYcL@ralph.baldwin.cx> <20150213212128.GG15484@FreeBSD.org> <89BA29F2-C617-40DE-90E5-F3EC9C17AEC8@netflix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <89BA29F2-C617-40DE-90E5-F3EC9C17AEC8@netflix.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers@freebsd.org, John Baldwin , Eric van Gyzen , svn-src-all@freebsd.org, Randall Stewart , svn-src-head@freebsd.org, zont@FreeBSD.org, rstone@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:38:23 -0000 Randall, thanks a lot for investigating that. On Fri, Feb 13, 2015 at 05:27:40PM -0500, Randall Stewart wrote: R> Gleb: R> R> Ok here is the diff of the arp timer function that this changed made (238990): R> **************************** R> arptimer(void *arg) R> { R> + struct llentry *lle = (struct llentry *)arg; R> struct ifnet *ifp; R> - struct llentry *lle; R> - int pkts_dropped; R> + size_t pkts_dropped; R> R> - KASSERT(arg != NULL, ("%s: arg NULL", __func__)); R> - lle = (struct llentry *)arg; R> + if (lle->la_flags & LLE_STATIC) { R> + LLE_WUNLOCK(lle); R> + return; R> + } R> + R> ifp = lle->lle_tbl->llt_ifp; R> CURVNET_SET(ifp->if_vnet); R> + R> + if (lle->la_flags != LLE_DELETED) { R> + int evt; R> + R> + if (lle->la_flags & LLE_VALID) R> + evt = LLENTRY_EXPIRED; R> + else R> + evt = LLENTRY_TIMEDOUT; R> + EVENTHANDLER_INVOKE(lle_event, lle, evt); R> + } R> + R> + callout_stop(&lle->la_timer); R> + R> + /* XXX: LOR avoidance. We still have ref on lle. */ R> + LLE_WUNLOCK(lle); R> IF_AFDATA_LOCK(ifp); R> LLE_WLOCK(lle); R> - if (lle->la_flags & LLE_STATIC) R> - LLE_WUNLOCK(lle); R> - else { R> - if (!callout_pending(&lle->la_timer) && R> - callout_active(&lle->la_timer)) { R> - callout_stop(&lle->la_timer); R> - LLE_REMREF(lle); R> R> - if (lle->la_flags != LLE_DELETED) { R> - int evt; R> - R> - if (lle->la_flags & LLE_VALID) R> - evt = LLENTRY_EXPIRED; R> - else R> - evt = LLENTRY_TIMEDOUT; R> - EVENTHANDLER_INVOKE(lle_event, lle, evt); R> - } R> - R> - pkts_dropped = llentry_free(lle); R> - ARPSTAT_ADD(dropped, pkts_dropped); R> - ARPSTAT_INC(timeouts); R> - } else { R> -#ifdef DIAGNOSTIC R> - struct sockaddr *l3addr = L3_ADDR(lle); R> - log(LOG_INFO, R> - "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, R> - inet_ntoa( R> - ((const struct sockaddr_in *)l3addr)->sin_addr)); R> -#endif R> - LLE_WUNLOCK(lle); R> - } R> - } R> + LLE_REMREF(lle); R> + pkts_dropped = llentry_free(lle); R> IF_AFDATA_UNLOCK(ifp); R> + ARPSTAT_ADD(dropped, pkts_dropped); R> + ARPSTAT_INC(timeouts); R> CURVNET_RESTORE(); R> } R> ****************************** R> R> And I can see *what* the problem was.. If you look at the lines: R> - if (!callout_pending(&lle->la_timer) && R> - callout_active(&lle->la_timer)) { R> R> This is the *incorrect* way to write this code it should have been: R> if (callout_pending(&lle->la_timer) && R> !callout_active(&lle->la_timer)) { R> R> To properly do the MPSAFE thing.. take a look at the callout manual.. R> So the original author just mixed up the test.. R> R> The idea is after you get the lock you check if its pending again, if R> so someone has restarted it.. and if its not active, then someone has R> stopped it. R> R> They check if it was *not* pending.. which is almost always the case R> since the callout code removes the pending flag and thats what you want R> to be there. So not pending would always be true.. R> R> I don’t see that this old code did the callout_deactive().. but I think R> the callout_stop() does that I guess.. R> R> I think the problem was that the original code was wrong and that R> the fix yes, avoided one race but put in another. R> R> I do think a callout_async_drain is the right thing, but that will take a while R> to get right. Peter Holm (thank you so much) has been pounding on this, if you R> could find another test to add.. that would be great. I think this will work R> the way it is.. R> R> R R> R> R> R> R> R> R> On Feb 13, 2015, at 4:21 PM, Gleb Smirnoff wrote: R> R> > 165863 R> R> -------- R> Randall Stewart R> rrs@netflix.com R> 803-317-4952 R> R> R> R> R> -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:44:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66925B8F; Fri, 13 Feb 2015 23:44:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 513E9D05; Fri, 13 Feb 2015 23:44:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNi0QY070718; Fri, 13 Feb 2015 23:44:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNi0Ji070717; Fri, 13 Feb 2015 23:44:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132344.t1DNi0Ji070717@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278736 - stable/10/sys/boot/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:44:00 -0000 Author: ian Date: Fri Feb 13 23:43:59 2015 New Revision: 278736 URL: https://svnweb.freebsd.org/changeset/base/278736 Log: MFC r278032: Do not skip setting the memory 'reg' property if the fdt data already contains one. Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Fri Feb 13 23:37:56 2015 (r278735) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Fri Feb 13 23:43:59 2015 (r278736) @@ -566,17 +566,6 @@ fdt_fixup_memory(struct fdt_mem_region * return; } - if ((reg = (uint32_t *)fdt_getprop(fdtp, memory, "reg", - &len)) != NULL) { - - if (fdt_reg_valid(reg, len, addr_cells, size_cells) == 0) - /* - * Do not apply fixup if existing 'reg' property - * seems to be valid. - */ - return; - } - len = (addr_cells + size_cells) * realmrno * sizeof(uint32_t); sb = buf = (uint8_t *)malloc(len); if (!buf) From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:56:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 722C0E99 for ; Fri, 13 Feb 2015 23:56:35 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35C14E0C for ; Fri, 13 Feb 2015 23:56:35 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNuZMF052984 for ; Fri, 13 Feb 2015 23:56:35 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1DNuY6N052979 for svn-src-all@freebsd.org; Fri, 13 Feb 2015 23:56:34 GMT (envelope-from bdrewery) Received: (qmail 49879 invoked from network); 13 Feb 2015 17:56:33 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 13 Feb 2015 17:56:33 -0600 Message-ID: <54DE8F32.2090500@FreeBSD.org> Date: Fri, 13 Feb 2015 17:56:34 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: phabric-admin@FreeBSD.org Subject: Phabricator + 'Reviewed by' [was Re: svn commit: r278472 - in head/sys: netinet netinet6] References: <201502091928.t19JSC5P066293@svn.freebsd.org> <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> In-Reply-To: <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CHPCqFm4vFQ6uQJe43XLi1G1hE8sR8FNn" Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:56:35 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CHPCqFm4vFQ6uQJe43XLi1G1hE8sR8FNn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/9/2015 3:45 PM, Bjoern A. Zeeb wrote: >> Commented upon by hiren and sbruno >> See Phabricator D1777 for more details. >> >> Commented upon by hiren and sbruno >> Reviewed by: adrian, jhb and bz > I have not reviewed this; as a matter of fact you are aware that I sti= ll wanted to do that. >=20 Something about Phabricator is not jiving with our commit terminology. This has happened before as well with other commits. I'm sure everyone is good-intentioned as well. There's not 1 person on D1777 who has 'accepted' it. That is what warrants a 'Reviewed by' to me. It's clear to me, but seems unclear to others. I really think the reviewer list needs to be split up. Rather than using icons, use separate lists. Reviewers requested: accepted: commented: changes requested:. --=20 Regards, Bryan Drewery --CHPCqFm4vFQ6uQJe43XLi1G1hE8sR8FNn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU3o83AAoJEDXXcbtuRpfPbO4IAK82RIVhFWKAH8z5hdPgzTlL X//0xTRpXCrTrUH0v/ZYsEyrZ7AtquybHaZ+QPYoL/vFwnst24FvXkOe2DReDMD0 ej0h7bmYHzhPP9i5sKNLr/xRZ/ngj09pgDL0UHhJJ5Ax60nDvtpIvSQdkAl6gGad 2SdXhYVy596406WfjWA95gf1a2Mc6npoQ+lCO8BobOKnwsu140xIYIGP4bAtIpKb kgW9YKo491n4UzWg7FgqpH1im13DNTdzl9CgJa+UxkfW1CF8sO0ER/sjmH3B3KCn zSsaydw85xOdFhygRuNcHfW3NWhCaiYVH27i6KZ2Dx9KuFCMxrJmelw/Z8x1vV0= =7Ofk -----END PGP SIGNATURE----- --CHPCqFm4vFQ6uQJe43XLi1G1hE8sR8FNn-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 13 23:57:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CBE9FEB; Fri, 13 Feb 2015 23:57:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0744DE1C; Fri, 13 Feb 2015 23:57:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNvKp0075916; Fri, 13 Feb 2015 23:57:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNvKda075915; Fri, 13 Feb 2015 23:57:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201502132357.t1DNvKda075915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 13 Feb 2015 23:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278737 - head/usr.sbin/flowctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:57:21 -0000 Author: glebius Date: Fri Feb 13 23:57:20 2015 New Revision: 278737 URL: https://svnweb.freebsd.org/changeset/base/278737 Log: Use less ugly code to allocate buffer of SORCVBUF_SIZE. Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c ============================================================================== --- head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:43:59 2015 (r278736) +++ head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:57:20 2015 (r278737) @@ -222,10 +222,12 @@ ctl_show(int argc, char **argv) static void do_show(int version, void (*func)(struct ngnf_show_header *)) { - struct ng_mesg ng_mesg[SORCVBUF_SIZE]; + char buf[SORCVBUF_SIZE]; + struct ng_mesg *ng_mesg; struct ngnf_show_header req, *resp; int token, nread; + ng_mesg = (struct ng_mesg *)buf; req.version = version; req.hash_id = req.list_id = 0; From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:03:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10541222; Sat, 14 Feb 2015 00:03:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5137ECA; Sat, 14 Feb 2015 00:03:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E03iR5080908; Sat, 14 Feb 2015 00:03:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E03i00080903; Sat, 14 Feb 2015 00:03:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201502140003.t1E03i00080903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 14 Feb 2015 00:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278738 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 00:03:45 -0000 Author: markj Date: Sat Feb 14 00:03:43 2015 New Revision: 278738 URL: https://svnweb.freebsd.org/changeset/base/278738 Log: Tweak the fds test program so that it actually compiles. Also use 0 instead of -1 for the bogus ioctl command so that dmesg doesn't get spammed with sign extension warnings when the test program runs. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Fri Feb 13 23:57:20 2015 (r278737) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Sat Feb 14 00:03:43 2015 (r278738) @@ -26,6 +26,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include + #include #include #include @@ -69,7 +71,7 @@ main(int argc, char *argv[]) */ if (sigsetjmp(env, 1) == 0) { for (;;) - (void) ioctl(-1, -1, NULL); + (void) ioctl(-1, 0, NULL); } /* @@ -80,20 +82,19 @@ main(int argc, char *argv[]) fds[n++] = open(file, O_WRONLY); fds[n++] = open(file, O_RDWR); - fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC | - O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC | - O_SYNC | O_TRUNC | O_XATTR, 0666); + fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | + O_NOCTTY | O_NONBLOCK | O_NDELAY | O_SYNC | O_TRUNC | 0666); fds[n++] = open(file, O_RDWR); (void) lseek(fds[n - 1], 123, SEEK_SET); /* * Once we have all the file descriptors in the state we want to test, - * issue a bogus ioctl() on each fd with cmd -1 and arg NULL to whack + * issue a bogus ioctl() on each fd with cmd 0 and arg NULL to whack * our DTrace script into recording the content of the fds[] array. */ for (i = 0; i < n; i++) - (void) ioctl(fds[i], -1, NULL); + (void) ioctl(fds[i], 0, NULL); assert(n <= sizeof (fds) / sizeof (fds[0])); exit(0); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d Fri Feb 13 23:57:20 2015 (r278737) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d Sat Feb 14 00:03:43 2015 (r278738) @@ -36,7 +36,7 @@ syscall::ioctl:entry } syscall::ioctl:entry -/pid == $1 && arg0 != -1u && arg1 == -1u && arg2 == NULL/ +/pid == $1 && arg0 != -1u && arg1 == 0 && arg2 == NULL/ { printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name); printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:05:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99A39389; Sat, 14 Feb 2015 00:05:43 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 218C4EDB; Sat, 14 Feb 2015 00:05:42 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1E05emp034273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Feb 2015 03:05:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1E05eut034272; Sat, 14 Feb 2015 03:05:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 14 Feb 2015 03:05:40 +0300 From: Gleb Smirnoff To: julian@FreeBSD.org, mav@FreeBSD.org Subject: Re: svn commit: r278640 - head/sys/netgraph Message-ID: <20150214000540.GI15484@FreeBSD.org> References: <201502122220.t1CMKY8t040498@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502122220.t1CMKY8t040498@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 00:05:43 -0000 Hi! On Thu, Feb 12, 2015 at 10:20:34PM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Thu Feb 12 22:20:34 2015 T> New Revision: 278640 T> URL: https://svnweb.freebsd.org/changeset/base/278640 T> T> Log: T> Revise default limit for maximum of netgraph data items. T> With modern internet speeds the limit can be reached even T> on a single L2TP link. Actually any ng_item of data type requires an mbuf to be connected to it, and thus I suggest to use mbuf limits to drive ng_item limits. If we got an item leak with mbufs being properly freed, then we've got a bug to fix, and any limit won't work in long run time. I never evidenced such a bug, but there complaints on hitting limit at traffic bursts. As said, with previous 512 item limit I experienced that even on a laptop. Any objections on removing the limit, guys? T> Modified: T> head/sys/netgraph/ng_base.c T> T> Modified: head/sys/netgraph/ng_base.c T> ============================================================================== T> --- head/sys/netgraph/ng_base.c Thu Feb 12 21:20:28 2015 (r278639) T> +++ head/sys/netgraph/ng_base.c Thu Feb 12 22:20:34 2015 (r278640) T> @@ -2952,7 +2952,7 @@ uma_zone_t ng_qzone; T> uma_zone_t ng_qdzone; T> static int numthreads = 0; /* number of queue threads */ T> static int maxalloc = 4096;/* limit the damage of a leak */ T> -static int maxdata = 512; /* limit the damage of a DoS */ T> +static int maxdata = 4096; /* limit the damage of a DoS */ T> T> SYSCTL_INT(_net_graph, OID_AUTO, threads, CTLFLAG_RDTUN, &numthreads, T> 0, "Number of queue processing threads"); T> -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:23:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74C755F2; Sat, 14 Feb 2015 00:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFE8CA; Sat, 14 Feb 2015 00:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E0Nslq090571; Sat, 14 Feb 2015 00:23:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E0Nspc090570; Sat, 14 Feb 2015 00:23:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502140023.t1E0Nspc090570@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 14 Feb 2015 00:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278739 - head/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 00:23:54 -0000 Author: delphij Date: Sat Feb 14 00:23:53 2015 New Revision: 278739 URL: https://svnweb.freebsd.org/changeset/base/278739 Log: Disallow pattern spaces which would cause intermediate calculations to overflow size_t. Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon) Security: CERT VU#695940 MFC after: 3 days Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Sat Feb 14 00:03:43 2015 (r278738) +++ head/lib/libc/regex/regcomp.c Sat Feb 14 00:23:53 2015 (r278739) @@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg, struct parse *p = &pa; int i; size_t len; + size_t maxlen; #ifdef REDEBUG # define GOODFLAGS(f) (f) #else @@ -213,7 +214,23 @@ regcomp(regex_t * __restrict preg, g = (struct re_guts *)malloc(sizeof(struct re_guts)); if (g == NULL) return(REG_ESPACE); + /* + * Limit the pattern space to avoid a 32-bit overflow on buffer + * extension. Also avoid any signed overflow in case of conversion + * so make the real limit based on a 31-bit overflow. + * + * Likely not applicable on 64-bit systems but handle the case + * generically (who are we to stop people from using ~715MB+ + * patterns?). + */ + maxlen = ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3; + if (len >= maxlen) { + free((char *)g); + return(REG_ESPACE); + } p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ + assert(p->ssize >= len); + p->strip = (sop *)malloc(p->ssize * sizeof(sop)); p->slen = 0; if (p->strip == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:36:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3CF1AD0 for ; Sat, 14 Feb 2015 00:36:58 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1D3A1E9 for ; Sat, 14 Feb 2015 00:36:58 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E0awYH073288 for ; Sat, 14 Feb 2015 00:36:58 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1E0awgK073286 for svn-src-all@freebsd.org; Sat, 14 Feb 2015 00:36:58 GMT (envelope-from bdrewery) Received: (qmail 1477 invoked from network); 13 Feb 2015 18:36:54 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 13 Feb 2015 18:36:54 -0600 Message-ID: <54DE98AC.6030309@FreeBSD.org> Date: Fri, 13 Feb 2015 18:37:00 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278739 - head/lib/libc/regex References: <201502140023.t1E0Nspc090570@svn.freebsd.org> In-Reply-To: <201502140023.t1E0Nspc090570@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uTloE2vHloF2tHifITEeF6uufJiomIxOU" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 00:36:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uTloE2vHloF2tHifITEeF6uufJiomIxOU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/13/2015 6:23 PM, Xin LI wrote: > Author: delphij > Date: Sat Feb 14 00:23:53 2015 > New Revision: 278739 > URL: https://svnweb.freebsd.org/changeset/base/278739 >=20 > Log: > Disallow pattern spaces which would cause intermediate calculations t= o > overflow size_t. > =20 > Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c di= llon) > Security: CERT VU#695940 > MFC after: 3 days >=20 > Modified: > head/lib/libc/regex/regcomp.c >=20 > Modified: head/lib/libc/regex/regcomp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/regex/regcomp.c Sat Feb 14 00:03:43 2015 (r278738) > +++ head/lib/libc/regex/regcomp.c Sat Feb 14 00:23:53 2015 (r278739) > @@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg, > struct parse *p =3D &pa; > int i; > size_t len; > + size_t maxlen; > #ifdef REDEBUG > # define GOODFLAGS(f) (f) > #else > @@ -213,7 +214,23 @@ regcomp(regex_t * __restrict preg, > g =3D (struct re_guts *)malloc(sizeof(struct re_guts)); > if (g =3D=3D NULL) > return(REG_ESPACE); > + /* > + * Limit the pattern space to avoid a 32-bit overflow on buffer > + * extension. Also avoid any signed overflow in case of conversion > + * so make the real limit based on a 31-bit overflow. > + * > + * Likely not applicable on 64-bit systems but handle the case > + * generically (who are we to stop people from using ~715MB+ > + * patterns?). > + */ > + maxlen =3D ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3; > + if (len >=3D maxlen) { > + free((char *)g); I was planning to submit a patch for review to remove all of this casting / and discuss. In this example the malloc is casted to struct re_gets* but the free is casted to char *. Why different and why cast in free at all? --=20 Regards, Bryan Drewery --uTloE2vHloF2tHifITEeF6uufJiomIxOU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU3pitAAoJEDXXcbtuRpfPTRYH/2m4BQpQq5cS9w9U2P4vo/al Ka4lJYfbB6kY6QvEWO3A6OmvBwSGQFgm3nfSO8+Gc6o0ObkHvlJvuoaaYOEGyaBJ JJ3d4jfME10R+H11SI/f19BWZJxDCdwOdV0yF3lmTG1pGM/XCNHt8vfZmKCONp3z LOKrdZ4QU4ErI5HYkPBOPYrT7CD+Sv9744Um/ME1UE3ahOBDILMqgJxtvKVV+iCB /j3LzzH0nVpc79KWRnEDgzJQP8PJqVsZPrKf2ynpqb6YRN16zuWxV3qs61TYlewZ zfkImFbcNzIuWU/hg/gO2Q7hstCMyBHr59QvaUh5xRMB/un3xOci7TAyq6DR37s= =0uVo -----END PGP SIGNATURE----- --uTloE2vHloF2tHifITEeF6uufJiomIxOU-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:39:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DF69C3A for ; Sat, 14 Feb 2015 00:39:22 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 489E8204 for ; Sat, 14 Feb 2015 00:39:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E0dMf3073342 for ; Sat, 14 Feb 2015 00:39:22 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1E0dMXL073336 for svn-src-all@freebsd.org; Sat, 14 Feb 2015 00:39:22 GMT (envelope-from bdrewery) Received: (qmail 47521 invoked from network); 13 Feb 2015 18:39:20 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 13 Feb 2015 18:39:20 -0600 Message-ID: <54DE993E.2050704@FreeBSD.org> Date: Fri, 13 Feb 2015 18:39:26 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278739 - head/lib/libc/regex References: <201502140023.t1E0Nspc090570@svn.freebsd.org> <54DE98AC.6030309@FreeBSD.org> In-Reply-To: <54DE98AC.6030309@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XV4t4u5GLRr2JBPaELjg2ekmusK66dkmG" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 00:39:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XV4t4u5GLRr2JBPaELjg2ekmusK66dkmG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/13/2015 6:37 PM, Bryan Drewery wrote: > On 2/13/2015 6:23 PM, Xin LI wrote: >> Author: delphij >> Date: Sat Feb 14 00:23:53 2015 >> New Revision: 278739 >> URL: https://svnweb.freebsd.org/changeset/base/278739 >> >> Log: >> Disallow pattern spaces which would cause intermediate calculations = to >> overflow size_t. >> =20 >> Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c d= illon) >> Security: CERT VU#695940 >> MFC after: 3 days >> >> Modified: >> head/lib/libc/regex/regcomp.c >> >> Modified: head/lib/libc/regex/regcomp.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libc/regex/regcomp.c Sat Feb 14 00:03:43 2015 (r278738) >> +++ head/lib/libc/regex/regcomp.c Sat Feb 14 00:23:53 2015 (r278739) >> @@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg, >> struct parse *p =3D &pa; >> int i; >> size_t len; >> + size_t maxlen; >> #ifdef REDEBUG >> # define GOODFLAGS(f) (f) >> #else >> @@ -213,7 +214,23 @@ regcomp(regex_t * __restrict preg, >> g =3D (struct re_guts *)malloc(sizeof(struct re_guts)); >> if (g =3D=3D NULL) >> return(REG_ESPACE); >> + /* >> + * Limit the pattern space to avoid a 32-bit overflow on buffer >> + * extension. Also avoid any signed overflow in case of conversion >> + * so make the real limit based on a 31-bit overflow. >> + * >> + * Likely not applicable on 64-bit systems but handle the case >> + * generically (who are we to stop people from using ~715MB+ >> + * patterns?). >> + */ >> + maxlen =3D ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3; >> + if (len >=3D maxlen) { >> + free((char *)g); >=20 > I was planning to submit a patch for review to remove all of this > casting / and discuss. To be clear, I only mean in free(3) calls. >=20 > In this example the malloc is casted to struct re_gets* but the free is= > casted to char *. Why different and why cast in free at all? >=20 >=20 >=20 --=20 Regards, Bryan Drewery --XV4t4u5GLRr2JBPaELjg2ekmusK66dkmG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU3pk+AAoJEDXXcbtuRpfP9ekH/3LbKjYD+FTCcFbK76jSwXia /EOPoJFpXT4IUV/PJqLh3F1BVZ0bKD0Q7niqSvkemw63bFnH5qRaYzhFLLv4+6ix hCeOrZo+dA+UPZ9utfXTv/TTOnLWX3z5BPR52GK84ISqZqWyO+Zb494o9iGJNZKy BAZsXPqj16Q68E7BNfN3aVbN6bGD0I1JV9bgJDnHgK00a9YUoiDffuD9lHVAZOay yMlokROC2rBGBKe01GuCp/xs3rHuw56oJLT86eqopzvrCvLvEv708W9nRuo5j3ML JMFlGKzbef1NDmXanfM4yDYF7fZOK/qZlSbBihes0AHn47DgWqy5bDI22eTa2b4= =utS4 -----END PGP SIGNATURE----- --XV4t4u5GLRr2JBPaELjg2ekmusK66dkmG-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 01:04:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CEB71B6; Sat, 14 Feb 2015 01:04:12 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0E7687; Sat, 14 Feb 2015 01:04:12 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 9BCE9246E4; Fri, 13 Feb 2015 17:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1423875851; x=1423890251; bh=dK/tH0sfF0DN8F/p1oaLXQauAevD6+XC0TEyKn2fBek=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=y16E6aiAMI3jBYYOHIH54ItfsmwkkyIgQGfWwFGZgJe1ad+Vn0K6f95ZsDDRxBKuy 1HIp9qTEhPNYEDx7IjOuOveQrJeSg7tFILusE4VBCtj02wTwZfUPDL6OoQ7HbdiMAb kTibit5cQXysdeGQBip7xFJ8p/pUWlfRXd8qO+WU= Message-ID: <54DE9F0B.50805@delphij.net> Date: Fri, 13 Feb 2015 17:04:11 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Bryan Drewery , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278739 - head/lib/libc/regex References: <201502140023.t1E0Nspc090570@svn.freebsd.org> <54DE98AC.6030309@FreeBSD.org> In-Reply-To: <54DE98AC.6030309@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 01:04:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/13/15 16:37, Bryan Drewery wrote: > On 2/13/2015 6:23 PM, Xin LI wrote: >> Author: delphij Date: Sat Feb 14 00:23:53 2015 New Revision: >> 278739 URL: https://svnweb.freebsd.org/changeset/base/278739 >> >> Log: Disallow pattern spaces which would cause intermediate >> calculations to overflow size_t. >> >> Obtained from: DragonFly >> (2841837793bd095a82f477e9c370cfe6cfb3862c dillon) Security: CERT >> VU#695940 MFC after: 3 days >> >> Modified: head/lib/libc/regex/regcomp.c >> >> Modified: head/lib/libc/regex/regcomp.c >> ============================================================================== >> >> - --- head/lib/libc/regex/regcomp.c Sat Feb 14 00:03:43 2015 (r278738) >> +++ head/lib/libc/regex/regcomp.c Sat Feb 14 00:23:53 2015 >> (r278739) @@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg, >> struct parse *p = &pa; int i; size_t len; + size_t maxlen; #ifdef >> REDEBUG # define GOODFLAGS(f) (f) #else @@ -213,7 +214,23 @@ >> regcomp(regex_t * __restrict preg, g = (struct re_guts >> *)malloc(sizeof(struct re_guts)); if (g == NULL) >> return(REG_ESPACE); + /* + * Limit the pattern space to avoid a >> 32-bit overflow on buffer + * extension. Also avoid any signed >> overflow in case of conversion + * so make the real limit based >> on a 31-bit overflow. + * + * Likely not applicable on 64-bit >> systems but handle the case + * generically (who are we to stop >> people from using ~715MB+ + * patterns?). + */ + maxlen = >> ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3; + if (len >= maxlen) { + >> free((char *)g); > > I was planning to submit a patch for review to remove all of this > casting / and discuss. > > In this example the malloc is casted to struct re_gets* but the > free is casted to char *. Why different and why cast in free at > all? No, I don't think there is legitimate reason to do casts in these places (both malloc and free's), these casts are not functional, and should be eliminated per style(9). In DragonFly, I think the cast was done mainly to match what's done in the rest of regex code, which is the traditional BSD way of handling third party code. If, however, you would like to remove them altogether, please feel free to do so once it's considered ready to go, as regex(3) is mostly unmaintained nowadays, and there is no upstream anymore. PS: Gabor have proposed to replace Spencer regex(3) with TRE but that was never finished, which would require some work (probably a good SoC project?). My $0.02 recommendation is to leave the code as-is for now. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.1 (FreeBSD) iQIcBAEBCgAGBQJU3p8IAAoJEJW2GBstM+nsF7gP/j/5V5BsPObh1aOSkM4fSsd+ l68ZuBw+YbCcbFs7EMjpFx7prqL+KyZ29Cq5blpROVMz94cV6jmqVE8O2D1WXNbk V6E4DxX//T2SfHjLnTPKBGn3Pdx/Gi3sLpkzGhAwqhPOVXCS56sOFt2fuAMfC7oq k9OOLUHjtcocEG7p/xk0fRhM9GLylnIdpZqGVugb+QmxI9coo6DgsFXddKSnLzwe D15j73sxQ9zgfWu3LThIFm1oE9MvbllUn/kiilZNPrfKljOoANiz2NwbY2kNBeM5 jjM1YpYKsqGuLEZx0UA0GnAJe7jW5yrMGxCTImLd/K9AWg48YzaB+76oQ6JQgSWh 6prDpse7BNdzSeTBf8VCX0fyLW7XWHDqCl3f2L3ZL/mF6zydVFfsKCfgYiHeUJzl 3e5GlVSyszz/fK0QPcau7KVO+FT/1dmbMBRDFhlC4ziITLvPe2ycxE15DvrhcVGM ifVTTEpH0tUv/e3Ac9lW9siENdssVfx9kx/pY5mfVU3bTntYCK8bGM7Nk7ayJQz5 A2C8oJP1bE41mqjGDihi0+aiZHmuW6WvPeRwM0okGuH7Lma4gQZrzs8hN826evY1 DueeYGrinqx5T8uN/HEQRkgFfyE/n5YDJvOwOmKQlOlz+m0hF7nX3kSTwUMZAmEZ o8rTmSN9k2e5Mu/0Ejd5 =8I1d -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 01:33:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41DAE46B; Sat, 14 Feb 2015 01:33:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAAE926; Sat, 14 Feb 2015 01:33:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E1XCHx023369; Sat, 14 Feb 2015 01:33:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E1XCMf023368; Sat, 14 Feb 2015 01:33:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502140133.t1E1XCMf023368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 14 Feb 2015 01:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278740 - stable/10/usr.bin/svn/svn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 01:33:12 -0000 Author: gjb Date: Sat Feb 14 01:33:11 2015 New Revision: 278740 URL: https://svnweb.freebsd.org/changeset/base/278740 Log: MFC r278603, r278607: r278603: Ensure ORGANIZATION_NAME is quoted when ORGANIZATION could contain strings of two or more words. r278607: Reduce number of lines to set ORGANIZATION_NAME in freebsd-organization.h. PR: 197540 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/svn/svn/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/svn/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/svn/Makefile Sat Feb 14 00:23:53 2015 (r278739) +++ stable/10/usr.bin/svn/svn/Makefile Sat Feb 14 01:33:11 2015 (r278740) @@ -59,7 +59,7 @@ DPSRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: - @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \ + @echo "#define ORGANIZATION_NAME \"$$(eval echo ${ORGANIZATION})\"" \ > freebsd-organization.h .endif From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 04:28:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5C6287E; Sat, 14 Feb 2015 04:28:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0044BF3; Sat, 14 Feb 2015 04:28:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E4StaE003537; Sat, 14 Feb 2015 04:28:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E4SqDr003523; Sat, 14 Feb 2015 04:28:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502140428.t1E4SqDr003523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 04:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278741 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 04:28:56 -0000 Author: adrian Date: Sat Feb 14 04:28:51 2015 New Revision: 278741 URL: https://svnweb.freebsd.org/changeset/base/278741 Log: Update the AR9300 HAL to the latest public available HAL from QCA. I've been sitting on this for a year or so now; I've finally tested it on enough devices to be reasonably sure it won't cause too much drama. But, if you see issues, please email me. Tested (all STA mode): PCIe: * AR9380 * AR9390 * AR9580 * AR9462 * AR9485 SoC: * QCA9550 * AR9331 * AR9342 Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini head/sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 14 04:28:51 2015 (r278741) @@ -576,6 +576,9 @@ struct ath_hal_9300 { u_int8_t ah_tx_chainmask; /* tx chain mask */ u_int8_t ah_rx_chainmask; /* rx chain mask */ + /* optional tx chainmask */ + u_int8_t ah_tx_chainmaskopt; + u_int8_t ah_tx_cal_chainmask; /* tx cal chain mask */ u_int8_t ah_rx_cal_chainmask; /* rx cal chain mask */ @@ -845,6 +848,7 @@ struct ath_hal_9300 { HAL_BOOL ah_aic_enabled; u_int32_t ah_aic_sram[ATH_AIC_MAX_BT_CHANNEL]; #endif + #endif /* ATH_SUPPORT_MCI */ u_int8_t ah_cac_quiet_enabled; #if ATH_WOW_OFFLOAD @@ -852,6 +856,14 @@ struct ath_hal_9300 { u_int32_t ah_mcast_filter_u32_set; #endif HAL_BOOL ah_reduced_self_gen_mask; + HAL_BOOL ah_chip_reset_done; + HAL_BOOL ah_abort_txdma_norx; + /* store previous passive RX Cal info */ + HAL_BOOL ah_skip_rx_iq_cal; + HAL_BOOL ah_rx_cal_complete; /* previous rx cal completed or not */ + u_int32_t ah_rx_cal_chan; /* chan on which rx cal is done */ + u_int32_t ah_rx_cal_chan_flag; + u_int32_t ah_rx_cal_corr[AR9300_MAX_CHAINS]; /* Local additions for FreeBSD */ /* @@ -877,7 +889,6 @@ struct ath_hal_9300 { struct ar9300NfLimits nf_2GHz; struct ar9300NfLimits nf_5GHz; struct ar9300NfLimits *nfp; - }; #define AH9300(_ah) ((struct ath_hal_9300 *)(_ah)) @@ -1194,7 +1205,8 @@ extern HAL_BOOL ar9300_get_channel_edge extern HAL_BOOL ar9300_fill_capability_info(struct ath_hal *ah); extern void ar9300_beacon_init(struct ath_hal *ah, - u_int32_t next_beacon, u_int32_t beacon_period, HAL_OPMODE opmode); + u_int32_t next_beacon, u_int32_t beacon_period, + u_int32_t beacon_period_fraction, HAL_OPMODE opmode); extern void ar9300_set_sta_beacon_timers(struct ath_hal *ah, const HAL_BEACON_STATE *); @@ -1217,12 +1229,19 @@ extern HAL_BOOL ar9300_set_key_cache_en extern HAL_BOOL ar9300_set_key_cache_entry(struct ath_hal *ah, u_int16_t entry, const HAL_KEYVAL *k, const u_int8_t *mac, int xor_key); extern HAL_BOOL ar9300_print_keycache(struct ath_hal *ah); +#if ATH_SUPPORT_KEYPLUMB_WAR +extern HAL_BOOL ar9300_check_key_cache_entry(struct ath_hal *ah, u_int16_t entry, + const HAL_KEYVAL *k, int xorKey); +#endif extern void ar9300_get_mac_address(struct ath_hal *ah, u_int8_t *mac); extern HAL_BOOL ar9300_set_mac_address(struct ath_hal *ah, const u_int8_t *); extern void ar9300_get_bss_id_mask(struct ath_hal *ah, u_int8_t *mac); extern HAL_BOOL ar9300_set_bss_id_mask(struct ath_hal *, const u_int8_t *); extern HAL_STATUS ar9300_select_ant_config(struct ath_hal *ah, u_int32_t cfg); +extern u_int32_t ar9300_ant_ctrl_common_get(struct ath_hal *ah, HAL_BOOL is_2ghz); +extern HAL_BOOL ar9300_ant_swcom_sel(struct ath_hal *ah, u_int8_t ops, + u_int32_t *common_tbl1, u_int32_t *common_tbl2); extern HAL_BOOL ar9300_set_regulatory_domain(struct ath_hal *ah, u_int16_t reg_domain, HAL_STATUS *stats); extern u_int ar9300_get_wireless_modes(struct ath_hal *ah); @@ -1397,6 +1416,8 @@ extern HAL_BOOL ar9300_set_tx_power_limi u_int16_t extra_txpow, u_int16_t tpc_in_db); extern void ar9300_chain_noise_floor(struct ath_hal *ah, int16_t *nf_buf, struct ieee80211_channel *chan, int is_scan); +extern int16_t ar9300_get_nf_from_reg(struct ath_hal *ah, struct ieee80211_channel *chan, int wait_time); +extern int ar9300_get_rx_nf_offset(struct ath_hal *ah, struct ieee80211_channel *chan, int8_t *nf_pwr, int8_t *nf_cal); extern HAL_BOOL ar9300_load_nf(struct ath_hal *ah, int16_t nf[]); extern HAL_RFGAIN ar9300_get_rfgain(struct ath_hal *ah); @@ -1681,6 +1702,8 @@ extern void ar9300_tx99_start(struct ath extern void ar9300_tx99_stop(struct ath_hal *ah); #endif /* ATH_SUPPORT_HTC */ #endif /* ATH_TX99_DIAG */ +extern HAL_BOOL ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array); +extern void ar9300_set_txchainmaskopt(struct ath_hal *ah, u_int8_t mask); enum { AR9300_COEFF_TX_TYPE = 0, Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Feb 14 04:28:51 2015 (r278741) @@ -302,6 +302,7 @@ static const struct ath_hal_private ar93 ar9300_get_desc_info, /* ah_get_desc_info */ ar9300_select_ant_config, /* ah_select_ant_config */ ar9300_ant_ctrl_common_get, /* ah_ant_ctrl_common_get */ + ar9300_ant_swcom_sel, /* ah_ant_swcom_sel */ ar9300_enable_tpc, /* ah_enable_tpc */ AH_NULL, /* ah_olpc_temp_compensation */ #if ATH_SUPPORT_CRDC @@ -319,7 +320,9 @@ static const struct ath_hal_private ar93 ar9300_set_key_cache_entry, /* ah_set_key_cache_entry */ ar9300_set_key_cache_entry_mac, /* ah_set_key_cache_entry_mac */ ar9300_print_keycache, /* ah_print_key_cache */ - +#if ATH_SUPPORT_KEYPLUMB_WAR + ar9300_check_key_cache_entry, /* ah_check_key_cache_entry */ +#endif /* Power Management Functions */ ar9300_set_power_mode, /* ah_set_power_mode */ ar9300_set_sm_power_mode, /* ah_set_sm_ps_mode */ @@ -342,6 +345,8 @@ static const struct ath_hal_private ar93 /* Get Channel Noise */ ath_hal_get_chan_noise, /* ah_get_chan_noise */ ar9300_chain_noise_floor, /* ah_get_chain_noise_floor */ + ar9300_get_nf_from_reg, /* ah_get_nf_from_reg */ + ar9300_get_rx_nf_offset, /* ah_get_rx_nf_offset */ /* Beacon Functions */ ar9300_beacon_init, /* ah_beacon_init */ @@ -499,11 +504,11 @@ static const struct ath_hal_private ar93 #else AH_NULL, AH_NULL, - ar9300TX99TgtChannelPwrUpdate, /* ah_tx99channelpwrupdate */ - ar9300TX99TgtStart, /* ah_tx99start */ - ar9300TX99TgtStop, /* ah_tx99stop */ - ar9300TX99TgtChainmskSetup, /* ah_tx99_chainmsk_setup */ - ar9300TX99SetSingleCarrier, /* ah_tx99_set_single_carrier */ + ar9300_tx99_channel_pwr_update, /* ah_tx99channelpwrupdate */ + ar9300_tx99_start, /* ah_tx99start */ + ar9300_tx99_stop, /* ah_tx99stop */ + ar9300_tx99_chainmsk_setup, /* ah_tx99_chainmsk_setup */ + ar9300_tx99_set_single_carrier, /* ah_tx99_set_single_carrier */ #endif #endif ar9300_chk_rssi_update_tx_pwr, @@ -525,6 +530,8 @@ static const struct ath_hal_private ar93 ar9300_dump_keycache, /* ah_dump_keycache */ ar9300_is_ani_noise_spur, /* ah_is_ani_noise_spur */ ar9300_set_hw_beacon_proc, /* ah_set_hw_beacon_proc */ + ar9300_set_ctl_pwr, /* ah_set_ctl_pwr */ + ar9300_set_txchainmaskopt, /* ah_set_txchainmaskopt */ }, ar9300_get_channel_edges, /* ah_get_channel_edges */ @@ -838,6 +845,18 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC /* Enable RIFS */ ahp->ah_rifs_enabled = AH_TRUE; + /* by default, stop RX also in abort txdma, due to + "Unable to stop TxDMA" msg observed */ + ahp->ah_abort_txdma_norx = AH_TRUE; + + /* do not use optional tx chainmask by default */ + ahp->ah_tx_chainmaskopt = 0; + + ahp->ah_skip_rx_iq_cal = AH_FALSE; + ahp->ah_rx_cal_complete = AH_FALSE; + ahp->ah_rx_cal_chan = 0; + ahp->ah_rx_cal_chan_flag = 0; + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: This Mac Chip Rev 0x%02x.%x is \n", __func__, ahpriv->ah_macVersion, Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c Sat Feb 14 04:28:51 2015 (r278741) @@ -34,7 +34,8 @@ extern u_int32_t ar9300_num_tx_pending(s */ void ar9300_beacon_init(struct ath_hal *ah, - u_int32_t next_beacon, u_int32_t beacon_period, HAL_OPMODE opmode) + u_int32_t next_beacon, u_int32_t beacon_period, + u_int32_t beacon_period_fraction, HAL_OPMODE opmode) { u_int32_t beacon_period_usec; @@ -52,6 +53,11 @@ ar9300_beacon_init(struct ath_hal *ah, beacon_period_usec = ONE_EIGHTH_TU_TO_USEC(beacon_period & HAL_BEACON_PERIOD_TU8); + + /* Add the fraction adjustment lost due to unit conversions. */ + beacon_period_usec += beacon_period_fraction; + + OS_REG_WRITE(ah, AR_BEACON_PERIOD, beacon_period_usec); OS_REG_WRITE(ah, AR_DMA_BEACON_PERIOD, beacon_period_usec); OS_REG_WRITE(ah, AR_SWBA_PERIOD, beacon_period_usec); Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat Feb 14 04:28:51 2015 (r278741) @@ -1200,6 +1200,44 @@ ar9300_noise_floor_cal_or_power_get(stru return nf_use; } +/* + * Return the Rx NF offset for specific channel. + * The values saved in EEPROM/OTP/Flash is converted through the following way: + * ((_p) - NOISE_PWR_DATA_OFFSET) << 2 + * So we need to convert back to the original values. + */ +int ar9300_get_rx_nf_offset(struct ath_hal *ah, struct ieee80211_channel *chan, int8_t *nf_pwr, int8_t *nf_cal) { + HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan); + int8_t rx_nf_pwr, rx_nf_cal; + int i; + //HALASSERT(ichan); + + /* Fill 0 if valid internal channel is not found */ + if (ichan == AH_NULL) { + OS_MEMZERO(nf_pwr, sizeof(nf_pwr[0])*OSPREY_MAX_CHAINS); + OS_MEMZERO(nf_cal, sizeof(nf_cal[0])*OSPREY_MAX_CHAINS); + return -1; + } + + for (i = 0; i < OSPREY_MAX_CHAINS; i++) { + if ((rx_nf_pwr = ar9300_noise_floor_cal_or_power_get(ah, ichan->channel, i, 0)) == 1) { + nf_pwr[i] = 0; + } else { + //printk("%s: raw nf_pwr[%d] = %d\n", __func__, i, rx_nf_pwr); + nf_pwr[i] = NOISE_PWR_DBM_2_INT(rx_nf_pwr); + } + + if ((rx_nf_cal = ar9300_noise_floor_cal_or_power_get(ah, ichan->channel, i, 1)) == 1) { + nf_cal[i] = 0; + } else { + //printk("%s: raw nf_cal[%d] = %d\n", __func__, i, rx_nf_cal); + nf_cal[i] = NOISE_PWR_DBM_2_INT(rx_nf_cal); + } + } + + return 0; +} + int32_t ar9300_rx_gain_index_get(struct ath_hal *ah) { ar9300_eeprom_t *eep = &AH9300(ah)->ah_eeprom; @@ -1530,6 +1568,61 @@ u_int16_t ar9300_ant_ctrl_chain_get(stru return 0; } +/* + * Select the usage of antenna via the RF switch. + * Default values are loaded from eeprom. + */ +HAL_BOOL ar9300_ant_swcom_sel(struct ath_hal *ah, u_int8_t ops, + u_int32_t *common_tbl1, u_int32_t *common_tbl2) +{ + ar9300_eeprom_t *eep = &AH9300(ah)->ah_eeprom; + struct ath_hal_private *ap = AH_PRIVATE(ah); + const struct ieee80211_channel *curchan = ap->ah_curchan; + enum { + ANT_SELECT_OPS_GET, + ANT_SELECT_OPS_SET, + }; + + if (AR_SREV_JUPITER(ah) || AR_SREV_SCORPION(ah)) + return AH_FALSE; + + if (!curchan) + return AH_FALSE; + +#define AR_SWITCH_TABLE_COM_ALL (0xffff) +#define AR_SWITCH_TABLE_COM_ALL_S (0) +#define AR_SWITCH_TABLE_COM2_ALL (0xffffff) +#define AR_SWITCH_TABLE_COM2_ALL_S (0) + switch (ops) { + case ANT_SELECT_OPS_GET: + *common_tbl1 = OS_REG_READ_FIELD(ah, AR_PHY_SWITCH_COM, + AR_SWITCH_TABLE_COM_ALL); + *common_tbl2 = OS_REG_READ_FIELD(ah, AR_PHY_SWITCH_COM_2, + AR_SWITCH_TABLE_COM2_ALL); + break; + case ANT_SELECT_OPS_SET: + OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, + AR_SWITCH_TABLE_COM_ALL, *common_tbl1); + OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, + AR_SWITCH_TABLE_COM2_ALL, *common_tbl2); + + /* write back to eeprom */ + if (IEEE80211_IS_CHAN_2GHZ(curchan)) { + eep->modal_header_2g.ant_ctrl_common = *common_tbl1; + eep->modal_header_2g.ant_ctrl_common2 = *common_tbl2; + } else { + eep->modal_header_5g.ant_ctrl_common = *common_tbl1; + eep->modal_header_5g.ant_ctrl_common2 = *common_tbl2; + } + + break; + default: + break; + } + + return AH_TRUE; +} + HAL_BOOL ar9300_ant_ctrl_apply(struct ath_hal *ah, HAL_BOOL is_2ghz) { u_int32_t value; @@ -2412,16 +2505,31 @@ ar9300_eeprom_set_power_per_rate_table( HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan); #endif - tx_chainmask = chainmask ? chainmask : ahp->ah_tx_chainmask; + if (chainmask) + tx_chainmask = chainmask; + else + tx_chainmask = ahp->ah_tx_chainmaskopt ? + ahp->ah_tx_chainmaskopt :ahp->ah_tx_chainmask; ar9300_get_channel_centers(ah, chan, ¢ers); +#if 1 if (IEEE80211_IS_CHAN_2GHZ(chan)) { ahp->twice_antenna_gain = p_eep_data->modal_header_2g.antenna_gain; } else { ahp->twice_antenna_gain = p_eep_data->modal_header_5g.antenna_gain; } +#else + if (IEEE80211_IS_CHAN_2GHZ(chan)) { + ahp->twice_antenna_gain = AH_MAX(p_eep_data->modal_header_2g.antenna_gain, + AH_PRIVATE(ah)->ah_antenna_gain_2g); + } else { + ahp->twice_antenna_gain = AH_MAX(p_eep_data->modal_header_5g.antenna_gain, + AH_PRIVATE(ah)->ah_antenna_gain_5g); + } +#endif + /* Save max allowed antenna gain to ease future lookups */ ahp->twice_antenna_reduction = twice_antenna_reduction; @@ -2958,7 +3066,8 @@ ar9300_eeprom_set_transmit_power(struct } max_power_level = target_power_val_t2[i]; /* Adjusting the ah_max_power_level based on chains and antennaGain*/ - switch (ar9300_get_ntxchains(ahp->ah_tx_chainmask)) + switch (ar9300_get_ntxchains(((ahp->ah_tx_chainmaskopt > 0) ? + ahp->ah_tx_chainmaskopt : ahp->ah_tx_chainmask))) { case 1: break; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Feb 14 04:28:51 2015 (r278741) @@ -606,7 +606,7 @@ ar9300_freebsd_beacon_init(struct ath_ha uint32_t beacon_period) { - ar9300_beacon_init(ah, next_beacon, beacon_period, + ar9300_beacon_init(ah, next_beacon, beacon_period, 0, AH_PRIVATE(ah)->ah_opmode); } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Sat Feb 14 04:28:51 2015 (r278741) @@ -35,6 +35,7 @@ #define ATH_SUPPORT_PAPRD 1 #define ATH_SUPPORT_TxBF 0 #define AH_PRIVATE_DIAG 1 +#define ATH_SUPPORT_KEYPLUMB_WAR 0 /* XXX need to reverify these; they came in with qcamain */ #define ATH_SUPPORT_FAST_CC 0 Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c Sat Feb 14 04:28:51 2015 (r278741) @@ -436,3 +436,156 @@ void ar9300_dump_keycache(struct ath_hal } #undef AH_KEY_REG_SIZE } + +#if ATH_SUPPORT_KEYPLUMB_WAR +/* + * Check the contents of the specified key cache entry + * and any associated MIC entry. + */ + HAL_BOOL +ar9300_check_key_cache_entry(struct ath_hal *ah, u_int16_t entry, + const HAL_KEYVAL *k, int xorKey) +{ + const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; + u_int32_t key0, key1, key2, key3, key4; + u_int32_t keyType; + u_int32_t xorMask = xorKey ? + (KEY_XOR << 24 | KEY_XOR << 16 | KEY_XOR << 8 | KEY_XOR) : 0; + struct ath_hal_9300 *ahp = AH9300(ah); + + + if (entry >= pCap->hal_key_cache_size) { + HALDEBUG(ah, HAL_DEBUG_KEYCACHE, + "%s: entry %u out of range\n", __func__, entry); + return AH_FALSE; + } + switch (k->kv_type) { + case HAL_CIPHER_AES_OCB: + keyType = AR_KEYTABLE_TYPE_AES; + break; + case HAL_CIPHER_AES_CCM: + if (!pCap->hal_cipher_aes_ccm_support) { + HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: AES-CCM not supported by " + "mac rev 0x%x\n", + __func__, AH_PRIVATE(ah)->ah_macRev); + return AH_FALSE; + } + keyType = AR_KEYTABLE_TYPE_CCM; + break; + case HAL_CIPHER_TKIP: + keyType = AR_KEYTABLE_TYPE_TKIP; + if (IS_MIC_ENABLED(ah) && entry + 64 >= pCap->hal_key_cache_size) { + HALDEBUG(ah, HAL_DEBUG_KEYCACHE, + "%s: entry %u inappropriate for TKIP\n", + __func__, entry); + return AH_FALSE; + } + break; + case HAL_CIPHER_WEP: + if (k->kv_len < 40 / NBBY) { + HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: WEP key length %u too small\n", + __func__, k->kv_len); + return AH_FALSE; + } + if (k->kv_len <= 40 / NBBY) { + keyType = AR_KEYTABLE_TYPE_40; + } else if (k->kv_len <= 104 / NBBY) { + keyType = AR_KEYTABLE_TYPE_104; + } else { + keyType = AR_KEYTABLE_TYPE_128; + } + break; + case HAL_CIPHER_CLR: + keyType = AR_KEYTABLE_TYPE_CLR; + return AH_TRUE; + default: + HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: cipher %u not supported\n", + __func__, k->kv_type); + return AH_TRUE; + } + + key0 = LE_READ_4(k->kv_val + 0) ^ xorMask; + key1 = (LE_READ_2(k->kv_val + 4) ^ xorMask) & 0xffff; + key2 = LE_READ_4(k->kv_val + 6) ^ xorMask; + key3 = (LE_READ_2(k->kv_val + 10) ^ xorMask) & 0xffff; + key4 = LE_READ_4(k->kv_val + 12) ^ xorMask; + if (k->kv_len <= 104 / NBBY) { + key4 &= 0xff; + } + + /* + * Note: key cache hardware requires that each double-word + * pair be written in even/odd order (since the destination is + * a 64-bit register). Don't reorder these writes w/o + * considering this! + */ + if (keyType == AR_KEYTABLE_TYPE_TKIP && IS_MIC_ENABLED(ah)) { + u_int16_t micentry = entry + 64; /* MIC goes at slot+64 */ + + + /* + * Invalidate the encrypt/decrypt key until the MIC + * key is installed so pending rx frames will fail + * with decrypt errors rather than a MIC error. + */ + if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(entry)) == key0) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY1(entry)) == key1) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY2(entry)) == key2) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY3(entry)) == key3) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY4(entry)) == key4) && + ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(entry)) & AR_KEY_TYPE) == (keyType & AR_KEY_TYPE))) + { + + /* + * since the AR_MISC_MODE register was written with the contents of + * ah_miscMode (if any) in ar9300Attach, just check ah_miscMode and + * save a pci read per key set. + */ + if (ahp->ah_misc_mode & AR_PCU_MIC_NEW_LOC_ENA) { + u_int32_t mic0,mic1,mic2,mic3,mic4; + /* + * both RX and TX mic values can be combined into + * one cache slot entry. + * 8*N + 800 31:0 RX Michael key 0 + * 8*N + 804 15:0 TX Michael key 0 [31:16] + * 8*N + 808 31:0 RX Michael key 1 + * 8*N + 80C 15:0 TX Michael key 0 [15:0] + * 8*N + 810 31:0 TX Michael key 1 + * 8*N + 814 15:0 reserved + * 8*N + 818 31:0 reserved + * 8*N + 81C 14:0 reserved + * 15 key valid == 0 + */ + /* RX mic */ + mic0 = LE_READ_4(k->kv_mic + 0); + mic2 = LE_READ_4(k->kv_mic + 4); + /* TX mic */ + mic1 = LE_READ_2(k->kv_txmic + 2) & 0xffff; + mic3 = LE_READ_2(k->kv_txmic + 0) & 0xffff; + mic4 = LE_READ_4(k->kv_txmic + 4); + if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(micentry)) == mic0) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY1(micentry)) == mic1) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY2(micentry)) == mic2) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY3(micentry)) == mic3) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY4(micentry)) == mic4) && + ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(micentry)) & AR_KEY_TYPE) == (AR_KEYTABLE_TYPE_CLR & AR_KEY_TYPE))) { + return AH_TRUE; + } + + } else { + return AH_TRUE; + } + } + } else { + if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(entry)) == key0) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY1(entry)) == key1) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY2(entry)) == key2) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY3(entry)) == key3) && + (OS_REG_READ(ah, AR_KEYTABLE_KEY4(entry)) == key4) && + ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(entry)) & AR_KEY_TYPE) == (keyType & AR_KEY_TYPE))) { + return AH_TRUE; + } + } + return AH_FALSE; +} +#endif Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Sat Feb 14 04:28:51 2015 (r278741) @@ -1697,10 +1697,10 @@ ar9300_get_bb_panic_info(struct ath_hal /* Suppress BB Status mesg following signature */ switch (bb_panic->status) { - case 0x04000539: - case 0x04008009: - case 0x04000b09: - case 0x1300000a: + case 0x04000539: + case 0x04008009: + case 0x04000b09: + case 0x1300000a: return -1; } @@ -3718,8 +3718,6 @@ ar9300_tx99_start(struct ath_hal *ah, u_ /* Disable AGC to A2 */ OS_REG_WRITE(ah, AR_PHY_TEST, (OS_REG_READ(ah, AR_PHY_TEST) | PHY_AGC_CLR)); - OS_REG_WRITE(ah, 0x9864, OS_REG_READ(ah, 0x9864) | 0x7f000); - OS_REG_WRITE(ah, 0x9924, OS_REG_READ(ah, 0x9924) | 0x7f00fe); OS_REG_WRITE(ah, AR_DIAG_SW, OS_REG_READ(ah, AR_DIAG_SW) &~ AR_DIAG_RX_DIS); OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* set receive disable */ @@ -3763,3 +3761,47 @@ ar9300SetDfs3StreamFix(struct ath_hal *a { return AH_FALSE; } + +HAL_BOOL +ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array) +{ + struct ath_hal_9300 *ahp = AH9300(ah); + ar9300_eeprom_t *p_eep_data = &ahp->ah_eeprom; + u_int8_t *ctl_index; + u_int32_t offset = 0; + + if (!ctl_array) + return AH_FALSE; + + /* copy 2G ctl freqbin and power data */ + ctl_index = p_eep_data->ctl_index_2g; + OS_MEMCPY(ctl_index + OSPREY_NUM_CTLS_2G, ctl_array, + OSPREY_NUM_CTLS_2G * OSPREY_NUM_BAND_EDGES_2G + /* ctl_freqbin_2G */ + OSPREY_NUM_CTLS_2G * sizeof(OSP_CAL_CTL_DATA_2G)); /* ctl_power_data_2g */ + offset = (OSPREY_NUM_CTLS_2G * OSPREY_NUM_BAND_EDGES_2G) + + ( OSPREY_NUM_CTLS_2G * sizeof(OSP_CAL_CTL_DATA_2G)); + + + /* copy 2G ctl freqbin and power data */ + ctl_index = p_eep_data->ctl_index_5g; + OS_MEMCPY(ctl_index + OSPREY_NUM_CTLS_5G, ctl_array + offset, + OSPREY_NUM_CTLS_5G * OSPREY_NUM_BAND_EDGES_5G + /* ctl_freqbin_5G */ + OSPREY_NUM_CTLS_5G * sizeof(OSP_CAL_CTL_DATA_5G)); /* ctl_power_data_5g */ + + return AH_FALSE; +} + +void +ar9300_set_txchainmaskopt(struct ath_hal *ah, u_int8_t mask) +{ + struct ath_hal_9300 *ahp = AH9300(ah); + + /* optional txchainmask should be subset of primary txchainmask */ + if ((mask & ahp->ah_tx_chainmask) != mask) { + ahp->ah_tx_chainmaskopt = 0; + ath_hal_printf(ah, "Error: ah_tx_chainmask=%d, mask=%d\n", ahp->ah_tx_chainmask, mask); + return; + } + + ahp->ah_tx_chainmaskopt = mask; +} Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini Sat Feb 14 04:28:51 2015 (r278741) @@ -881,7 +881,7 @@ static const u_int32_t ar9300_osprey_2p2 { 0x00008258 , 0x00000000 }, { 0x0000825c , 0x40000000 }, { 0x00008260 , 0x00080922 }, - { 0x00008264 , 0x9bc00010 }, + { 0x00008264 , 0x9d400010 }, { 0x00008268 , 0xffffffff }, { 0x0000826c , 0x0000ffff }, { 0x00008270 , 0x00000000 }, @@ -1171,7 +1171,7 @@ static const u_int32_t ar9300_osprey_2p2 { 0x000010b0 , 0x00000e60 , 0x00001cc0 , 0x00007c70 , 0x00003e38 }, { 0x00008014 , 0x03e803e8 , 0x07d007d0 , 0x10801600 , 0x08400b00 }, { 0x0000801c , 0x128d8027 , 0x128d804f , 0x12e00057 , 0x12e0002b }, - { 0x00008120 , 0x08f04800 , 0x08f04800 , 0x08f04810 , 0x08f04810 }, + { 0x00008120 , 0x18f04800 , 0x18f04800 , 0x18f04810 , 0x18f04810 }, { 0x000081d0 , 0x00003210 , 0x00003210 , 0x0000320a , 0x0000320a }, { 0x00008318 , 0x00003e80 , 0x00007d00 , 0x00006880 , 0x00003440 }, }; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Sat Feb 14 04:28:51 2015 (r278741) @@ -469,7 +469,7 @@ u_int32_t ar9300_wow_offload_handshake(s OS_REG_SET_BIT(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_REQ); OS_REG_SET_BIT(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_INT_EMB_CPU); - if (!ath_hal_wait(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_CONF, AR_MBOX_WOW_CONF, bt_handshake_timeout_us)) { + if (!ath_hal_waitfor(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_CONF, AR_MBOX_WOW_CONF, bt_handshake_timeout_us)) { HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "%s: WoW offload handshake failed", __func__); return 0; } @@ -678,6 +678,7 @@ ar9300_set_power_mode(struct ath_hal *ah OS_REG_WRITE(ah, AR_RTC_KEEP_AWAKE, 0x2); } #endif + ahp->ah_chip_full_sleep = AH_FALSE; break; case HAL_PM_FULL_SLEEP: #if ATH_SUPPORT_MCI @@ -987,7 +988,7 @@ ar9300_set_power_mode_wow_sleep(struct a OS_REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Set receive disable bit */ - if (!ath_hal_wait(ah, AR_CR, AR_CR_RXE, 0, AH_WAIT_TIMEOUT)) { + if (!ath_hal_waitfor(ah, AR_CR, AR_CR_RXE, 0, AH_WAIT_TIMEOUT)) { HALDEBUG(ah, HAL_DEBUG_POWER_MGMT, "%s: dma failed to stop in 10ms\n" "AR_CR=0x%08x\nAR_DIAG_SW=0x%08x\n", __func__, OS_REG_READ(ah, AR_CR), OS_REG_READ(ah, AR_DIAG_SW)); Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c Sat Feb 14 04:28:51 2015 (r278741) @@ -68,6 +68,7 @@ ar9300_proc_rx_desc_fast(struct ath_hal rxs->rs_status = 0; rxs->rs_flags = 0; + rxs->rs_phyerr = 0; rxs->rs_datalen = rxsp->status2 & AR_data_len; rxs->rs_tstamp = rxsp->status3; @@ -129,17 +130,16 @@ ar9300_proc_rx_desc_fast(struct ath_hal * Consequently we filter them out here so we don't * confuse and/or complicate drivers. */ + if (rxsp->status11 & AR_crc_err) { rxs->rs_status |= HAL_RXERR_CRC; /* - * ignore CRC flag for spectral phy reports + * ignore CRC flag for phy reports */ if (rxsp->status11 & AR_phyerr) { u_int phyerr = MS(rxsp->status11, AR_phy_err_code); - if (phyerr == HAL_PHYERR_SPECTRAL) { - rxs->rs_status |= HAL_RXERR_PHY; - rxs->rs_phyerr = phyerr; - } + rxs->rs_status |= HAL_RXERR_PHY; + rxs->rs_phyerr = phyerr; } } else if (rxsp->status11 & AR_phyerr) { u_int phyerr; @@ -165,7 +165,9 @@ ar9300_proc_rx_desc_fast(struct ath_hal rxs->rs_status |= HAL_RXERR_MIC; } } - +#if 0 + rxs->rs_channel = AH_PRIVATE(ah)->ah_curchan->channel; +#endif return HAL_OK; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sat Feb 14 01:33:11 2015 (r278740) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sat Feb 14 04:28:51 2015 (r278741) @@ -31,7 +31,6 @@ #define FIX_NOISE_FLOOR 1 - /* Additional Time delay to wait after activiting the Base band */ #define BASE_ACTIVATE_DELAY 100 /* usec */ #define RTC_PLL_SETTLE_DELAY 100 /* usec */ @@ -325,6 +324,7 @@ int16_t ar9300_get_min_cca_pwr(struct at int16_t nf; // struct ath_hal_private *ahpriv = AH_PRIVATE(ah); + if ((OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) == 0) { nf = MS(OS_REG_READ(ah, AR_PHY_CCA_0), AR9280_PHY_MINCCA_PWR); if (nf & 0x100) { @@ -402,6 +402,33 @@ void ar9300_chain_noise_floor(struct ath } } +/* + * Return the current NF value in register. + * If the current NF cal is not completed, return 0. + */ +int16_t ar9300_get_nf_from_reg(struct ath_hal *ah, struct ieee80211_channel *chan, int wait_time) +{ + int16_t nfarray[HAL_NUM_NF_READINGS] = {0}; + int is_2g = 0; + HAL_CHANNEL_INTERNAL *ichan = NULL; + + ichan = ath_hal_checkchannel(ah, chan); + if (ichan == NULL) + return (0); + + if (wait_time <= 0) { + return 0; + } + + if (!ath_hal_waitfor(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF, 0, wait_time)) { + ath_hal_printf(ah, "%s: NF cal is not complete in %dus", __func__, wait_time); + return 0; + } + is_2g = !! (IS_CHAN_2GHZ(ichan)); + ar9300_upload_noise_floor(ah, is_2g, nfarray); + + return nfarray[0]; +} /* * Pick up the medium one in the noise floor buffer and update the @@ -415,6 +442,7 @@ ar9300_get_nf_hist_mid(struct ath_hal *a int16_t sort[HAL_NF_CAL_HIST_LEN_FULL]; /* upper bound for hist_len */ int i, j; + for (i = 0; i < hist_len; i++) { sort[i] = h->nf_cal_buffer[i][reading]; HALDEBUG(ah, HAL_DEBUG_NFCAL, @@ -451,7 +479,7 @@ ar9300_reset_nf_hist_buff(struct ath_hal HAL_CHAN_NFCAL_HIST *h = &ichan->nf_cal_hist; HAL_NFCAL_HIST_FULL *home = &AH_PRIVATE(ah)->nf_cal_hist; int i; - + /* * Copy the value for the channel in question into the home-channel * NF history buffer. The channel NF is probably a value filled in by @@ -538,6 +566,7 @@ get_noise_floor_thresh(struct ath_hal *a { struct ath_hal_9300 *ahp = AH9300(ah); + switch (chan->channel_flags & CHANNEL_ALL_NOTURBO) { case CHANNEL_A: case CHANNEL_A_HT20: @@ -1609,6 +1638,7 @@ ar9300_set_reset(struct ath_hal *ah, int { u_int32_t rst_flags; u_int32_t tmp_reg; + struct ath_hal_9300 *ahp = AH9300(ah); HALASSERT(type == HAL_RESET_WARM || type == HAL_RESET_COLD); @@ -1802,6 +1832,7 @@ ar9300_set_reset(struct ath_hal *ah, int ar9300_attach_hw_platform(ah); + ahp->ah_chip_reset_done = 1; return AH_TRUE; } @@ -2312,10 +2343,22 @@ ar9300_per_calibration(struct ath_hal *a static void ar9300_start_nf_cal(struct ath_hal *ah) { + struct ath_hal_9300 *ahp = AH9300(ah); OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_ENABLE_NF); OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NO_UPDATE_NF); OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); AH9300(ah)->nf_tsf32 = ar9300_get_tsf32(ah); + +/* + * We are reading the NF values before we start the NF operation, because + * of that we are getting very high values like -45. + * This triggers the CW_INT detected and EACS module triggers the channel change + * chip_reset_done value is used to fix this issue. + * chip_reset_flag is set during the RTC reset. + * chip_reset_flag is cleared during the starting NF operation. + * if flag is set we will clear the flag and will not read the NF values. + */ + ahp->ah_chip_reset_done = 0; } /* ar9300_calibration @@ -2409,7 +2452,7 @@ ar9300_calibration(struct ath_hal *ah, s ar9300_load_nf(ah, nf_buf); /* start NF calibration, without updating BB NF register*/ - ar9300_start_nf_cal(ah); + ar9300_start_nf_cal(ah); } } return AH_TRUE; @@ -2459,12 +2502,15 @@ ar9300_iq_calibration(struct ath_hal *ah u_int32_t q_coff_denom, i_coff_denom; int32_t q_coff, i_coff; int iq_corr_neg, i; + HAL_CHANNEL_INTERNAL *ichan; static const u_int32_t offset_array[3] = { AR_PHY_RX_IQCAL_CORR_B0, AR_PHY_RX_IQCAL_CORR_B1, AR_PHY_RX_IQCAL_CORR_B2, }; + ichan = ath_hal_checkchannel(ah, AH_PRIVATE(ah)->ah_curchan); + for (i = 0; i < num_chains; i++) { power_meas_i = ahp->ah_total_power_meas_i[i]; power_meas_q = ahp->ah_total_power_meas_q[i]; @@ -2537,6 +2583,19 @@ ar9300_iq_calibration(struct ath_hal *ah OS_REG_RMW_FIELD(ah, offset_array[i], AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, q_coff); + /* store the RX cal results */ + if (ichan != NULL) { + ahp->ah_rx_cal_corr[i] = OS_REG_READ(ah, offset_array[i]) & 0x7fff; + ahp->ah_rx_cal_complete = AH_TRUE; + ahp->ah_rx_cal_chan = ichan->channel; +// ahp->ah_rx_cal_chan_flag = ichan->channel_flags &~ CHANNEL_PASSIVE; + ahp->ah_rx_cal_chan_flag = 0; /* XXX */ + } else { + /* XXX? Is this what I should do? */ + ahp->ah_rx_cal_complete = AH_FALSE; + + } + HALDEBUG(ah, HAL_DEBUG_CALIBRATE, "Register offset (0x%04x) QI COFF (bitfields 0x%08x) " "after update = 0x%x\n", @@ -2563,6 +2622,55 @@ ar9300_iq_calibration(struct ath_hal *ah } /* + * When coming back from offchan, we do not perform RX IQ Cal. + * But the chip reset will clear all previous results + * We store the previous results and restore here. + */ +static void +ar9300_rx_iq_cal_restore(struct ath_hal *ah) +{ + struct ath_hal_9300 *ahp = AH9300(ah); + u_int32_t i_coff, q_coff; + HAL_BOOL is_restore = AH_FALSE; + int i; + static const u_int32_t offset_array[3] = { + AR_PHY_RX_IQCAL_CORR_B0, + AR_PHY_RX_IQCAL_CORR_B1, + AR_PHY_RX_IQCAL_CORR_B2, + }; + + for (i=0; iah_rx_cal_corr[i]) { + i_coff = (ahp->ah_rx_cal_corr[i] & + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF) >> + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF_S; + q_coff = (ahp->ah_rx_cal_corr[i] & + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF) >> + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF_S; + + OS_REG_RMW_FIELD(ah, offset_array[i], + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF, i_coff); + OS_REG_RMW_FIELD(ah, offset_array[i], + AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, q_coff); + + is_restore = AH_TRUE; + } + } + + if (is_restore) + OS_REG_SET_BIT(ah, + AR_PHY_RX_IQCAL_CORR_B0, AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE); + + HALDEBUG(ah, HAL_DEBUG_CALIBRATE, + "%s: IQ Cal and Correction (offset 0x%04x) enabled " + "(bit position 0x%08x). New Value 0x%08x\n", + __func__, + (unsigned) (AR_PHY_RX_IQCAL_CORR_B0), + AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE, + OS_REG_READ(ah, AR_PHY_RX_IQCAL_CORR_B0)); +} + +/* * Set a limit on the overall output power. Used for dynamic * transmit power control and the like. * @@ -3739,6 +3847,13 @@ ar9300_init_cal_internal(struct ath_hal #endif /* end - Init time calibrations */ + /* Do not do RX cal in case of offchan, or cal data already exists on same channel*/ + if (ahp->ah_skip_rx_iq_cal) { + HALDEBUG(ah, HAL_DEBUG_CALIBRATE, + "Skip RX IQ Cal\n"); + return AH_TRUE; + } + /* If Cals are supported, add them to list via INIT/INSERT_CAL */ if (AH_TRUE == ar9300_is_cal_supp(ah, chan, IQ_MISMATCH_CAL)) { INIT_CAL(&ahp->ah_iq_cal_data); @@ -3839,6 +3954,8 @@ ar9300_set_dma(struct ath_hal *ah) { u_int32_t regval; struct ath_hal_9300 *ahp = AH9300(ah); + struct ath_hal_private *ahpriv = AH_PRIVATE(ah); + HAL_CAPABILITIES *pCap = &ahpriv->ah_caps; #if 0 /* @@ -3898,9 +4015,14 @@ ar9300_set_dma(struct ath_hal *ah) /* * Enable HPQ for UAPSD */ - if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) { - OS_REG_WRITE(ah, AR_HP_Q_CONTROL, - AR_HPQ_ENABLE | AR_HPQ_UAPSD | AR_HPQ_UAPSD_TRIGGER_EN); + if (pCap->halHwUapsdTrig == AH_TRUE) { + /* Only enable this if HAL capabilities says it is OK */ + if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) { + OS_REG_WRITE(ah, AR_HP_Q_CONTROL, + AR_HPQ_ENABLE | AR_HPQ_UAPSD | AR_HPQ_UAPSD_TRIGGER_EN); + } + } else { + /* use default value from ini file - which disable HPQ queue usage */ } /* @@ -4319,6 +4441,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM HAL_BOOL stopped, cal_ret; HAL_BOOL apply_last_iqcorr = AH_FALSE; + if (OS_REG_READ(ah, AR_IER) == AR_IER_ENABLE) { HALDEBUG(AH_NULL, HAL_DEBUG_UNMASKABLE, "** Reset called with WLAN " "interrupt enabled %08x **\n", ar9300_get_interrupts(ah)); @@ -4347,6 +4470,11 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM ahp->ah_rx_chainmask = rxchainmask & ap->ah_caps.halRxChainMask; ahp->ah_tx_cal_chainmask = ap->ah_caps.halTxChainMask; ahp->ah_rx_cal_chainmask = ap->ah_caps.halRxChainMask; + + /* + * Keep the previous optinal txchainmask value + */ + HALASSERT(ar9300_check_op_mode(opmode)); OS_MARK(ah, AH_MARK_RESET, b_channel_change); @@ -4453,7 +4581,21 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM #if 0 /* Get the value from the previous NF cal and update history buffer */ if (curchan && (ahp->ah_chip_full_sleep != AH_TRUE)) { - ar9300_store_new_nf(ah, curchan, is_scan); + + if(ahp->ah_chip_reset_done){ + ahp->ah_chip_reset_done = 0; + } else { + /* + * is_scan controls updating NF for home channel or off channel. + * Home -> Off, update home channel + * Off -> Home, update off channel + * Home -> Home, uppdate home channel + */ + if (ap->ah_curchan->channel != chan->channel) + ar9300_store_new_nf(ah, curchan, !is_scan); + else + ar9300_store_new_nf(ah, curchan, is_scan); + } } #endif @@ -4464,7 +4606,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM AH9300(ah)->nfp = IS_CHAN_2GHZ(ichan) ? &ahp->nf_2GHz : &ahp->nf_5GHz; /* - * XXX For now, don't apply the last IQ correction. + * XXX FreeBSD For now, don't apply the last IQ correction. * * This should be done when scorpion is enabled on FreeBSD; just be * sure to fix this channel match code so it uses net80211 flags @@ -4501,6 +4643,31 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM } #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 05:10:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82665CDA for ; Sat, 14 Feb 2015 05:10:37 +0000 (UTC) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466FEF06 for ; Sat, 14 Feb 2015 05:10:37 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id hl2so22138715igb.0 for ; Fri, 13 Feb 2015 21:10:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=DJ4uwISgdh++lxmqrFNw56J5Ippi2HfE76X9IShEKIs=; b=LKsiM94hki14DVLL10OaCe5Hps7wZc/O8NY0G8H1kAHQ/6WghoeH875Xek//qOkrss kW98sWG3pOmvalI7g6xV/DZTklDSmMiekrKD+1+8sZ5wIsJBcYp3Zv49V9vVJrWyn4+4 nmwULhN/SMRiP43yCqRi4Pde5nboy06lU+O21FyrAH00IwrIX8nI156P3v675GGJmWQI zoM+THKj4cQKFQq0SlOJPa8mv7rLv7La6YeYZ/aotPViNMqMaPFWixkma2F6ETl0iSuS ja2n78LBga9jc1qlxY+F5J5bO9T4d0b74+UjMRP/Wk3ofEN99pdVJUZ+cPiLUw8SVLI+ p1Pg== X-Gm-Message-State: ALoCoQlKksBE2ncEIGMAghedy4R8j7ZrtpA9zp5pT6nLsW6uaeITdJVb+Md2spH4HEShJfF+WAZ6 X-Received: by 10.107.151.80 with SMTP id z77mr3491571iod.51.1423890630008; Fri, 13 Feb 2015 21:10:30 -0800 (PST) Received: from sol.firepipe.net ([2601:1:adc0:2c1:7271:bcff:fe83:9550]) by mx.google.com with ESMTPSA id h19sm4516900igq.10.2015.02.13.21.10.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Feb 2015 21:10:29 -0800 (PST) Sender: Will Andrews Date: Fri, 13 Feb 2015 22:10:27 -0700 From: Will Andrews To: John Baldwin Subject: Re: svn commit: r278321 - head/sys/dev/ipmi Message-ID: <20150214051026.GB45601@sol.firepipe.net> References: <201502061645.t16GjBHI010251@svn.freebsd.org> <1747329.Lge6tErVCv@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: <1747329.Lge6tErVCv@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, wca@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 05:10:37 -0000 --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 06, 2015 at 12:00:02PM -0500, John Baldwin wrote: > I think we should further change this to only allow the watchdog to be us= ed=20 > with KCS and SMIC so that watchdog requests never sleep. I think that we= =20 > could then revert r272366 as to my knowledge this was the only watchdog d= river=20 > that could sleep? No objection from me. :) --=20 wca --0eh6TmSyL6TZE2Uz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTe2MEACgkQF47idPgWcsWTAACfZSOY4TsXotNpD3M4oEb4arHb vmUAnRcPPoJ7K7AFa720RkTiQrD9MUDg =JEwb -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 06:19:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88C15159; Sat, 14 Feb 2015 06:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73F0D6B1; Sat, 14 Feb 2015 06:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E6JPu2054198; Sat, 14 Feb 2015 06:19:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E6JPVV054197; Sat, 14 Feb 2015 06:19:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502140619.t1E6JPVV054197@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 06:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278742 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 06:19:25 -0000 Author: ngie Date: Sat Feb 14 06:19:24 2015 New Revision: 278742 URL: https://svnweb.freebsd.org/changeset/base/278742 Log: Simplify jail_name_to_jid and try to be more fault tolerant when scanning for the jail ID (poll up to 10 times for the jail IDs to become available) If the scan fails, the code will fall through and fail as it does with Jenkins today Modified: head/bin/pkill/tests/pgrep-j_test.sh Modified: head/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- head/bin/pkill/tests/pgrep-j_test.sh Sat Feb 14 04:28:51 2015 (r278741) +++ head/bin/pkill/tests/pgrep-j_test.sh Sat Feb 14 06:19:24 2015 (r278742) @@ -4,17 +4,7 @@ jail_name_to_jid() { local check_name="$1" - ( - line="$(jls -n 2> /dev/null | grep name=$check_name )" - for nv in $line; do - local name="${nv%=*}" - if [ "${name}" = "jid" ]; then - eval $nv - echo $jid - break - fi - done - ) + jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pgrep_j_test @@ -37,10 +27,19 @@ jail -c path=/ name=${base}_1_1 ip4.addr jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & -jid1=$(jail_name_to_jid ${base}_1_1) -jid2=$(jail_name_to_jid ${base}_1_2) -jid="${jid1},${jid2}" -pid1="$(pgrep -f -x -j $jid "$sleep $sleep_amount" | sort)" +for i in `seq 1 10`; do + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid="${jid1},${jid2}" + case "$jid" in + [0-9]+,[0-9]+) + break + ;; + esac + sleep 0.1 +done + +pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)" pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ $(cat ${PWD}/${base}_1_2.pid) | sort) if [ "$pid1" = "$pid2" ]; then From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 06:58:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED02675F; Sat, 14 Feb 2015 06:58:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7A339F0; Sat, 14 Feb 2015 06:58:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E6wSCh072413; Sat, 14 Feb 2015 06:58:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E6wScp072412; Sat, 14 Feb 2015 06:58:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502140658.t1E6wScp072412@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 06:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278743 - stable/9/sys/dev/cxgb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 06:58:29 -0000 Author: ngie Date: Sat Feb 14 06:58:27 2015 New Revision: 278743 URL: https://svnweb.freebsd.org/changeset/base/278743 Log: MFC r278364: r278364: Remove kdb_backtrace extern; get the definition for kdb_backtrace from instead Fix whitespace in WARN_ON macro definition Reviewed by: np Differential Revision: https://reviews.freebsd.org/D1799 Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/dev/cxgb/cxgb_osdep.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:19:24 2015 (r278742) +++ stable/9/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:27 2015 (r278743) @@ -39,6 +39,8 @@ $FreeBSD$ #include #include +#include + #include #ifndef _CXGB_OSDEP_H_ @@ -128,10 +130,8 @@ void prefetch(void *x) #define smp_mb() mb() #define L1_CACHE_BYTES 128 -extern void kdb_backtrace(void); - #define WARN_ON(condition) do { \ - if (__predict_false((condition)!=0)) { \ + if (__predict_false((condition)!=0)) { \ log(LOG_WARNING, "BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \ kdb_backtrace(); \ } \ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 06:58:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64A6E88D; Sat, 14 Feb 2015 06:58:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6209F1; Sat, 14 Feb 2015 06:58:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E6wXdp072470; Sat, 14 Feb 2015 06:58:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E6wXeo072469; Sat, 14 Feb 2015 06:58:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502140658.t1E6wXeo072469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 06:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278744 - stable/10/sys/dev/cxgb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 06:58:33 -0000 Author: ngie Date: Sat Feb 14 06:58:32 2015 New Revision: 278744 URL: https://svnweb.freebsd.org/changeset/base/278744 Log: MFC r278364: r278364: Remove kdb_backtrace extern; get the definition for kdb_backtrace from instead Fix whitespace in WARN_ON macro definition Reviewed by: np Differential Revision: https://reviews.freebsd.org/D1799 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:27 2015 (r278743) +++ stable/10/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:32 2015 (r278744) @@ -39,6 +39,8 @@ $FreeBSD$ #include #include +#include + #include #ifndef _CXGB_OSDEP_H_ @@ -128,10 +130,8 @@ void prefetch(void *x) #define smp_mb() mb() #define L1_CACHE_BYTES 128 -extern void kdb_backtrace(void); - #define WARN_ON(condition) do { \ - if (__predict_false((condition)!=0)) { \ + if (__predict_false((condition)!=0)) { \ log(LOG_WARNING, "BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \ kdb_backtrace(); \ } \ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 08:44:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BFDB531; Sat, 14 Feb 2015 08:44:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75AB1341; Sat, 14 Feb 2015 08:44:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E8iEPd023935; Sat, 14 Feb 2015 08:44:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8iDSM023928; Sat, 14 Feb 2015 08:44:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502140844.t1E8iDSM023928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 14 Feb 2015 08:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278746 - in stable/10/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:44:14 -0000 Author: kib Date: Sat Feb 14 08:44:12 2015 New Revision: 278746 URL: https://svnweb.freebsd.org/changeset/base/278746 Log: MFC r277643: Remove Giant from /dev/mem and /dev/kmem. MFC r277743: Arm: ensure that _tmppt KVA is used exclusively. Modified: stable/10/sys/arm/arm/mem.c stable/10/sys/dev/mem/memdev.c stable/10/sys/i386/i386/mem.c stable/10/sys/mips/mips/mem.c stable/10/sys/sparc64/sparc64/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/mem.c ============================================================================== --- stable/10/sys/arm/arm/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/arm/arm/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem struct mem_range_softc mem_range_softc; +static struct sx tmppt_lock; +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); + /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) @@ -82,8 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr, eaddr; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -109,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, } if (!address_valid) return (EINVAL); + sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); @@ -116,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)&_tmppt[o], (int)c, uio); pmap_qremove((vm_offset_t)_tmppt, 1); + sx_xunlock(&tmppt_lock); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { Modified: stable/10/sys/dev/mem/memdev.c ============================================================================== --- stable/10/sys/dev/mem/memdev.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/dev/mem/memdev.c Sat Feb 14 08:44:12 2015 (r278746) @@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev; static struct cdevsw mem_cdevsw = { .d_version = D_VERSION, - .d_flags = D_MEM|D_NEEDGIANT, + .d_flags = D_MEM, .d_open = memopen, .d_read = memrw, .d_write = memrw, Modified: stable/10/sys/i386/i386/mem.c ============================================================================== --- stable/10/sys/i386/i386/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/i386/i386/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr; - /* XXX UPS Why ? */ - GIANT_REQUIRED; - - if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM) return EIO; Modified: stable/10/sys/mips/mips/mem.c ============================================================================== --- stable/10/sys/mips/mips/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/mips/mips/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, cnt = 0; error = 0; - GIANT_REQUIRED; - pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; Modified: stable/10/sys/sparc64/sparc64/mem.c ============================================================================== --- stable/10/sys/sparc64/sparc64/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/sparc64/sparc64/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, error = 0; ova = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 08:52:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D7CF88F; Sat, 14 Feb 2015 08:52:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 084B2604; Sat, 14 Feb 2015 08:52:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E8q9fC028579; Sat, 14 Feb 2015 08:52:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8q9Ju028578; Sat, 14 Feb 2015 08:52:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502140852.t1E8q9Ju028578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Feb 2015 08:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278747 - stable/10/usr.bin/ctlstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:52:10 -0000 Author: mav Date: Sat Feb 14 08:52:09 2015 New Revision: 278747 URL: https://svnweb.freebsd.org/changeset/base/278747 Log: MFC r278362: Fix couple issues in ctlstat header printing. Modified: stable/10/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:44:12 2015 (r278746) +++ stable/10/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:09 2015 (r278747) @@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx) == 0) ? " CPU" : ""); + (F_CPU(ctx)) ? " CPU" : ""); hdr_devs = 3; } else { if (F_CPU(ctx)) @@ -468,8 +468,9 @@ ctlstat_standard(struct ctlstat_context if (bit_test(ctx->lun_mask, lun) == 0) continue; - fprintf(stdout, "%15.6s%d ", - "lun", lun); + fprintf(stdout, "%15.6s%d %s", + "lun", lun, + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs++; } fprintf(stdout, "\n"); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 08:52:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7DA99BB; Sat, 14 Feb 2015 08:52:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B301A609; Sat, 14 Feb 2015 08:52:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E8qrGs028719; Sat, 14 Feb 2015 08:52:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8qrtZ028718; Sat, 14 Feb 2015 08:52:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502140852.t1E8qrtZ028718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Feb 2015 08:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278748 - stable/9/usr.bin/ctlstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:52:53 -0000 Author: mav Date: Sat Feb 14 08:52:52 2015 New Revision: 278748 URL: https://svnweb.freebsd.org/changeset/base/278748 Log: MFC r278362: Fix couple issues in ctlstat header printing. Modified: stable/9/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/ctlstat/ (props changed) Modified: stable/9/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/9/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:09 2015 (r278747) +++ stable/9/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:52 2015 (r278748) @@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx) == 0) ? " CPU" : ""); + (F_CPU(ctx)) ? " CPU" : ""); hdr_devs = 3; } else { if (F_CPU(ctx)) @@ -468,8 +468,9 @@ ctlstat_standard(struct ctlstat_context if (bit_test(ctx->lun_mask, lun) == 0) continue; - fprintf(stdout, "%15.6s%d ", - "lun", lun); + fprintf(stdout, "%15.6s%d %s", + "lun", lun, + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs++; } fprintf(stdout, "\n"); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 09:00:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BED61C3D; Sat, 14 Feb 2015 09:00:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907E363E; Sat, 14 Feb 2015 09:00:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E90DFK029860; Sat, 14 Feb 2015 09:00:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E90D2p029856; Sat, 14 Feb 2015 09:00:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502140900.t1E90D2p029856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 14 Feb 2015 09:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278749 - in head/sys/x86: acpica include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 09:00:13 -0000 Author: kib Date: Sat Feb 14 09:00:12 2015 New Revision: 278749 URL: https://svnweb.freebsd.org/changeset/base/278749 Log: Detect whether x2APIC on VMWare is usable without interrupt redirection support. Older versions of the hypervisor mis-interpret the cpuid format in ioapic registers when x2APIC is turned on, but IR is not used by the guest OS. Based on: Linux commit 4cca6ea04d31c22a7d0436949c072b27bde41f86 Tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 months Modified: head/sys/x86/acpica/madt.c head/sys/x86/include/vmware.h Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Sat Feb 14 08:52:52 2015 (r278748) +++ head/sys/x86/acpica/madt.c Sat Feb 14 09:00:12 2015 (r278749) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -130,6 +132,7 @@ madt_setup_local(void) { ACPI_TABLE_DMAR *dmartbl; vm_paddr_t dmartbl_physaddr; + u_int p[4]; madt = pmap_mapbios(madt_physaddr, madt_length); if ((cpu_feature2 & CPUID2_X2APIC) != 0) { @@ -146,6 +149,16 @@ madt_setup_local(void) } acpi_unmap_table(dmartbl); } + if (vm_guest == VM_GUEST_VMWARE) { + vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p); + if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 || + (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) { + x2apic_mode = 0; + if (bootverbose) + printf( + "x2APIC available but disabled inside VMWare without intr redirection\n"); + } + } TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); } Modified: head/sys/x86/include/vmware.h ============================================================================== --- head/sys/x86/include/vmware.h Sat Feb 14 08:52:52 2015 (r278748) +++ head/sys/x86/include/vmware.h Sat Feb 14 09:00:12 2015 (r278749) @@ -31,8 +31,13 @@ #define VMW_HVMAGIC 0x564d5868 #define VMW_HVPORT 0x5658 + #define VMW_HVCMD_GETVERSION 10 #define VMW_HVCMD_GETHZ 45 +#define VMW_HVCMD_GETVCPU_INFO 68 + +#define VMW_VCPUINFO_LEGACY_X2APIC (1 << 3) +#define VMW_VCPUINFO_VCPU_RESERVED (1 << 31) static __inline void vmware_hvcall(u_int cmd, u_int *p) From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 09:47:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2DD859E; Sat, 14 Feb 2015 09:47:09 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 6654EAB8; Sat, 14 Feb 2015 09:47:09 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id C550A1A3965; Sat, 14 Feb 2015 20:46:59 +1100 (AEDT) Date: Sat, 14 Feb 2015 20:46:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r278737 - head/usr.sbin/flowctl In-Reply-To: <201502132357.t1DNvKda075915@svn.freebsd.org> Message-ID: <20150214193210.N945@besplex.bde.org> References: <201502132357.t1DNvKda075915@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=Qn7aHUtcSh8-iNL0V9sA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 09:47:09 -0000 On Fri, 13 Feb 2015, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Feb 13 23:57:20 2015 > New Revision: 278737 > URL: https://svnweb.freebsd.org/changeset/base/278737 > > Log: > Use less ugly code to allocate buffer of SORCVBUF_SIZE. Less ugly, but wrong. The version that used alloca() was correct. > Modified: head/usr.sbin/flowctl/flowctl.c > ============================================================================== > --- head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:43:59 2015 (r278736) > +++ head/usr.sbin/flowctl/flowctl.c Fri Feb 13 23:57:20 2015 (r278737) > @@ -222,10 +222,12 @@ ctl_show(int argc, char **argv) > static void > do_show(int version, void (*func)(struct ngnf_show_header *)) > { > - struct ng_mesg ng_mesg[SORCVBUF_SIZE]; > + char buf[SORCVBUF_SIZE]; alloca(), like malloc(), gave a buffer suitably aligned for any object. This only gives a buffer suitably aligned for char objects. It may accidentally be suitably aligned for other objects. The accident often happens because objects on the stack are usually given larger alignment than necessary. Depending on this is unportable at best. > + struct ng_mesg *ng_mesg; > struct ngnf_show_header req, *resp; > int token, nread; > > + ng_mesg = (struct ng_mesg *)buf; The new bug is detected at high warning levels. WARNS >= 4 gives -Wcast-align unless the MK option to break this warning is configured. The bug is detected by -Wcast0align even on amd64. The bug is not detected by default because flowctl has many other warnings at the default WARNS of 6 (mainly -Wcast-align and -Wsign-compare ones), so it breaks the warnings using WARNGS?=2. I think arches with strict alignment requirements have a warning about this without -Wcast-align, but couldn't find one on ia64. Certainly, related warnings turned up on ia64 when they didn't on amd64 with the same WARNS. The runtime bug can be fixed using __aligned(__ALIGN_MUMBLE). This exposes a bug in -Wcast-align -- it still warns although the char buffer is obviously aligned. Compilers should also know that the buffer is suitably aligned when they just allocated it on the stack and the alignment happens to be enough. But in this case, compilers should also know that the suitable alignment is only accidental, and still warn unless portability warnings are supressed. This and the non-spurious warning can be broken using another cast: ng_mesg = (struct ng_mesg *)(void *)buf; This depends on the compiler being too stupid to remember the alignment of the original char buffer. This fixed version is still worse than the old one using alloca(), because it is longer and more complicated. alloca(), like malloc(), returns a void * so that the compiler cannot know the alignment of the buffer (except it can for alloca() because it just allocated the buffer -- it must do a (void *) cast internally and forget the actual alignment, just like the above cast does but with more intentional forgetfulness). We are basically using a home made alloca(N) for the easier case where N is constant. Using VLAs and also the C99 feature of declarations anwhere, and extensions like __aligned(), we can almost implement a full alloca() using the fixed version of this change: /* * XXX need extended statement-expression so that __buf doesn't go out * of scope after the right brace. */ #define my_alloca(n) __extension__ ({ /* XXX need unique name. */ \ char __buf[__roundup2((n), MUMBLE)] __aligned(MUMBLE); \ \ (void *)__buf; \ }) Bruce From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 10:52:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04C8F149; Sat, 14 Feb 2015 10:52:44 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id BA9B6B6; Sat, 14 Feb 2015 10:52:43 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id B80E4425F2A; Sat, 14 Feb 2015 21:52:28 +1100 (AEDT) Date: Sat, 14 Feb 2015 21:52:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery Subject: Re: svn commit: r278739 - head/lib/libc/regex In-Reply-To: <54DE993E.2050704@FreeBSD.org> Message-ID: <20150214213333.H945@besplex.bde.org> References: <201502140023.t1E0Nspc090570@svn.freebsd.org> <54DE98AC.6030309@FreeBSD.org> <54DE993E.2050704@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=LdbmYFKm0H1EIkHWzn8A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 10:52:44 -0000 On Fri, 13 Feb 2015, Bryan Drewery wrote: > On 2/13/2015 6:37 PM, Bryan Drewery wrote: >> On 2/13/2015 6:23 PM, Xin LI wrote: >>> Author: delphij >>> Date: Sat Feb 14 00:23:53 2015 >>> New Revision: 278739 >>> URL: https://svnweb.freebsd.org/changeset/base/278739 >>> >>> Log: >>> Disallow pattern spaces which would cause intermediate calculations to >>> overflow size_t. >>> ... >>> Modified: head/lib/libc/regex/regcomp.c >>> ============================================================================== >>> --- head/lib/libc/regex/regcomp.c Sat Feb 14 00:03:43 2015 (r278738) >>> +++ head/lib/libc/regex/regcomp.c Sat Feb 14 00:23:53 2015 (r278739) >>> @@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg, >>> struct parse *p = &pa; >>> int i; >>> size_t len; >>> + size_t maxlen; >>> #ifdef REDEBUG >>> # define GOODFLAGS(f) (f) >>> #else >>> @@ -213,7 +214,23 @@ regcomp(regex_t * __restrict preg, >>> g = (struct re_guts *)malloc(sizeof(struct re_guts)); >>> if (g == NULL) >>> return(REG_ESPACE); >>> + /* >>> + * Limit the pattern space to avoid a 32-bit overflow on buffer >>> + * extension. Also avoid any signed overflow in case of conversion >>> + * so make the real limit based on a 31-bit overflow. >>> + * >>> + * Likely not applicable on 64-bit systems but handle the case >>> + * generically (who are we to stop people from using ~715MB+ >>> + * patterns?). >>> + */ >>> + maxlen = ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3; >>> + if (len >= maxlen) { >>> + free((char *)g); >> >> I was planning to submit a patch for review to remove all of this >> casting / and discuss. > > To be clear, I only mean in free(3) calls. But they are least bogus for the free() calls. >> In this example the malloc is casted to struct re_gets* but the free is >> casted to char *. Why different and why cast in free at all? Because this code attempted to be portable to K&R compilers (including broken ones, but with no standard it was hard to tell what was broken). With no prototypes, the arg to free() had to be cast. (Except, all pointers have the same representation except on exotic machines, so the cast was rarely necessary then or now.) With no void * in K&R1, free() took a char * arg and the cast had to be to that. STDC have the grandfather kludge of requiring char * and void * to be almost interchangable, so you can probably cast to either. I forget if it requires char * and void * to have the same representation, so that you can certainly cast to either. Even more than the same representation is required -- they must be passed in the same way. Old programs cast the result of malloc() to break warnings about malloc() not being declared, or possibly for portability to broken compilers which require the cast. Actually, it was unclear if they were broken -- before void * existed, malloc() returned char *, and it is not so clear for old char * as for not so old void * that automatic conversion from char * to any pointer type does or should happen (without a warning). New C++ programs require the cast even for void *. I don't like this. I also don't like the spelling of the sizeof arg in: g = (struct re_guts *)malloc(sizeof(struct re_guts)); It is clearer to write: g = malloc(sizeof(*g)); This works for any pointer g. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 11:47:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88A6BC6A; Sat, 14 Feb 2015 11:47:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6992575A; Sat, 14 Feb 2015 11:47:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EBlgdh009375; Sat, 14 Feb 2015 11:47:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EBle1t009369; Sat, 14 Feb 2015 11:47:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502141147.t1EBle1t009369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 14 Feb 2015 11:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278751 - in head/lib: libc/gen libc/include libc/sys libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 11:47:42 -0000 Author: kib Date: Sat Feb 14 11:47:40 2015 New Revision: 278751 URL: https://svnweb.freebsd.org/changeset/base/278751 Log: Properly interpose libc spinlocks, was missed in r276630. In particular, stdio locking was affected. Reported and tested by: "Matthew D. Fuller" Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libc/gen/_spinlock_stub.c head/lib/libc/include/libc_private.h head/lib/libc/sys/interposing_table.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_spinlock.c head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/gen/_spinlock_stub.c ============================================================================== --- head/lib/libc/gen/_spinlock_stub.c Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libc/gen/_spinlock_stub.c Sat Feb 14 11:47:40 2015 (r278751) @@ -33,51 +33,48 @@ __FBSDID("$FreeBSD$"); #include #include "spinlock.h" +#include "libc_private.h" long _atomic_lock_stub(volatile long *); void _spinlock_stub(spinlock_t *); void _spinunlock_stub(spinlock_t *); void _spinlock_debug_stub(spinlock_t *, char *, int); -/* - * Declare weak definitions in case the application is not linked - * with libpthread. - */ __weak_reference(_atomic_lock_stub, _atomic_lock); -__weak_reference(_spinlock_stub, _spinlock); -__weak_reference(_spinunlock_stub, _spinunlock); -__weak_reference(_spinlock_debug_stub, _spinlock_debug); - -/* - * This function is a stub for the _atomic_lock function in libpthread. - */ + long _atomic_lock_stub(volatile long *lck __unused) { return (0L); } +__weak_reference(_spinlock, _spinlock_debug); +#pragma weak _spinlock +void +_spinlock(spinlock_t *lck) +{ + + ((void (*)(spinlock_t *lck))__libc_interposing[INTERPOS_spinlock]) + (lck); -/* - * This function is a stub for the spinlock function in libpthread. - */ +} + +#pragma weak _spinlock void -_spinlock_stub(spinlock_t *lck __unused) +_spinunlock(spinlock_t *lck) { + + ((void (*)(spinlock_t *lck))__libc_interposing[INTERPOS_spinunlock]) + (lck); + } -/* - * This function is a stub for the spinunlock function in libpthread. - */ void -_spinunlock_stub(spinlock_t *lck __unused) +__libc_spinlock_stub(spinlock_t *lck __unused) { } -/* - * This function is a stub for the debug spinlock function in libpthread. - */ void -_spinlock_debug_stub(spinlock_t *lck __unused, char *fname __unused, int lineno __unused) +__libc_spinunlock_stub(spinlock_t *lck __unused) { } Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libc/include/libc_private.h Sat Feb 14 11:47:40 2015 (r278751) @@ -95,6 +95,9 @@ do { \ _SPINUNLOCK(&__stdio_thread_lock); \ } while (0) +void __libc_spinlock_stub(struct _spinlock *); +void __libc_spinunlock_stub(struct _spinlock *); + /* * Indexes into the pthread jump table. * @@ -216,6 +219,8 @@ enum { INTERPOS_write, INTERPOS_writev, INTERPOS__pthread_mutex_init_calloc_cb, + INTERPOS_spinlock, + INTERPOS_spinunlock, INTERPOS_MAX }; Modified: head/lib/libc/sys/interposing_table.c ============================================================================== --- head/lib/libc/sys/interposing_table.c Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libc/sys/interposing_table.c Sat Feb 14 11:47:40 2015 (r278751) @@ -73,6 +73,8 @@ interpos_func_t __libc_interposing[INTER SLOT(write, __sys_write), SLOT(writev, __sys_writev), SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), + SLOT(spinlock, __libc_spinlock_stub), + SLOT(spinunlock, __libc_spinunlock_stub), }; #undef SLOT Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libthr/thread/thr_private.h Sat Feb 14 11:47:40 2015 (r278751) @@ -928,6 +928,10 @@ int __thr_sigwait(const sigset_t *set, i int __thr_sigwaitinfo(const sigset_t *set, siginfo_t *info); int __thr_swapcontext(ucontext_t *oucp, const ucontext_t *ucp); +struct _spinlock; +void __thr_spinunlock(struct _spinlock *lck); +void __thr_spinlock(struct _spinlock *lck); + struct tcb *_tcb_ctor(struct pthread *, int); void _tcb_dtor(struct tcb *); Modified: head/lib/libthr/thread/thr_spinlock.c ============================================================================== --- head/lib/libthr/thread/thr_spinlock.c Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libthr/thread/thr_spinlock.c Sat Feb 14 11:47:40 2015 (r278751) @@ -61,7 +61,7 @@ static void init_spinlock(spinlock_t *lc */ void -_spinunlock(spinlock_t *lck) +__thr_spinunlock(spinlock_t *lck) { struct spinlock_extra *_extra; @@ -70,7 +70,7 @@ _spinunlock(spinlock_t *lck) } void -_spinlock(spinlock_t *lck) +__thr_spinlock(spinlock_t *lck) { struct spinlock_extra *_extra; @@ -84,12 +84,6 @@ _spinlock(spinlock_t *lck) THR_UMUTEX_LOCK(_get_curthread(), &_extra->lock); } -void -_spinlock_debug(spinlock_t *lck, char *fname __unused, int lineno __unused) -{ - _spinlock(lck); -} - static void init_spinlock(spinlock_t *lck) { Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sat Feb 14 10:56:03 2015 (r278750) +++ head/lib/libthr/thread/thr_syscalls.c Sat Feb 14 11:47:40 2015 (r278751) @@ -597,6 +597,8 @@ __thr_interpose_libc(void) SLOT(wait4); SLOT(write); SLOT(writev); + SLOT(spinlock); + SLOT(spinunlock); #undef SLOT *(__libc_interposing_slot( INTERPOS__pthread_mutex_init_calloc_cb)) = From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 12:17:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B7903B1; Sat, 14 Feb 2015 12:17:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323BE9E8; Sat, 14 Feb 2015 12:17:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECHpk3023663; Sat, 14 Feb 2015 12:17:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECHhdX023572; Sat, 14 Feb 2015 12:17:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141217.t1ECHhdX023572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278752 - in vendor/llvm/dist: cmake/modules docs include/llvm/CodeGen include/llvm/IR lib/Analysis lib/Analysis/IPA lib/Bitcode/Reader lib/CodeGen lib/CodeGen/AsmPrinter lib/CodeGen/Se... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:17:51 -0000 Author: dim Date: Sat Feb 14 12:17:42 2015 New Revision: 278752 URL: https://svnweb.freebsd.org/changeset/base/278752 Log: Vendor import of llvm RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc3@229040 Added: vendor/llvm/dist/test/Bindings/llvm-c/Inputs/ vendor/llvm/dist/test/Bindings/llvm-c/Inputs/invalid.ll.bc (contents, props changed) vendor/llvm/dist/test/Bindings/llvm-c/invalid-bitcode.test vendor/llvm/dist/test/CodeGen/AArch64/setcc-type-mismatch.ll vendor/llvm/dist/test/CodeGen/ARM/setcc-type-mismatch.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsel-prom.ll vendor/llvm/dist/test/CodeGen/R600/endcf-loop-header.ll vendor/llvm/dist/test/CodeGen/R600/tti-unroll-prefs.ll vendor/llvm/dist/test/CodeGen/X86/constant-combines.ll vendor/llvm/dist/test/CodeGen/X86/sse-unaligned-mem-feature.ll vendor/llvm/dist/test/DebugInfo/location-verifier.ll vendor/llvm/dist/test/Linker/distinct-cycles.ll vendor/llvm/dist/test/MC/ARM/pr22395-2.s (contents, props changed) vendor/llvm/dist/test/Transforms/Inline/inline-indirect.ll vendor/llvm/dist/test/Transforms/MemCpyOpt/callslot_aa.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/bad_types.ll vendor/llvm/dist/test/Transforms/Util/combine-alias-scope-metadata.ll vendor/llvm/dist/test/tools/gold/no-map-whole-file.ll Deleted: vendor/llvm/dist/test/CodeGen/ARM/vector-load.ll vendor/llvm/dist/test/CodeGen/ARM/vector-store.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-07-UAMemFeature.ll vendor/llvm/dist/test/CodeGen/X86/seh-basic.ll vendor/llvm/dist/test/CodeGen/X86/seh-safe-div.ll Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Type.cpp vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Support/regcomp.c vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/R600/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/R600/SIAnnotateControlFlow.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/CodeGen/ARM/Windows/read-only-data.ll vendor/llvm/dist/test/CodeGen/ARM/Windows/structors.ll vendor/llvm/dist/test/CodeGen/ARM/alloc-no-stack-realign.ll vendor/llvm/dist/test/CodeGen/ARM/memcpy-inline.ll vendor/llvm/dist/test/CodeGen/ARM/sub-cmp-peephole.ll vendor/llvm/dist/test/CodeGen/X86/coff-comdat.ll vendor/llvm/dist/test/CodeGen/X86/dllexport-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/fold-vex.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/pr15267.ll vendor/llvm/dist/test/CodeGen/X86/pshufb-mask-comments.ll vendor/llvm/dist/test/CodeGen/X86/win_cst_pool.ll vendor/llvm/dist/test/DebugInfo/COFF/asm.ll vendor/llvm/dist/test/DebugInfo/COFF/multifile.ll vendor/llvm/dist/test/DebugInfo/COFF/multifunction.ll vendor/llvm/dist/test/DebugInfo/COFF/simple.ll vendor/llvm/dist/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll vendor/llvm/dist/test/DebugInfo/X86/coff_debug_info_type.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/atomics.ll vendor/llvm/dist/test/MC/COFF/bss_section.ll vendor/llvm/dist/test/MC/COFF/const-gv-with-rel-init.ll vendor/llvm/dist/test/MC/COFF/diff.s vendor/llvm/dist/test/MC/COFF/global_ctors_dtors.ll vendor/llvm/dist/test/MC/COFF/initialised-data.ll vendor/llvm/dist/test/MC/COFF/section-passthru-flags.s vendor/llvm/dist/test/MC/COFF/weak-symbol.ll vendor/llvm/dist/test/Transforms/EarlyCSE/basic.ll vendor/llvm/dist/test/Transforms/InstCombine/loadstore-metadata.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll vendor/llvm/dist/tools/gold/gold-plugin.cpp Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Feb 14 12:17:42 2015 (r278752) @@ -334,11 +334,6 @@ function(llvm_add_library name) PREFIX "" ) endif() - if (MSVC) - set_target_properties(${name} - PROPERTIES - IMPORT_SUFFIX ".imp") - endif () endif() if(ARG_MODULE OR ARG_SHARED) Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 14 12:17:42 2015 (r278752) @@ -391,7 +391,8 @@ During this release the MIPS target has compiler has gained support for MIPS-II and MIPS-III; become ABI-compatible with GCC for big and little endian O32, N32, and N64; and is now able to compile the Linux kernel for 32-bit targets. Additionally, LLD now supports -microMIPS for the O32 ABI on little endian targets. +microMIPS for the O32 ABI on little endian targets, and code generation for +microMIPS is almost completely passing the test-suite. ABI ^^^ Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Feb 14 12:17:42 2015 (r278752) @@ -66,7 +66,6 @@ struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. SmallVector BeginLabels; // Labels prior to invoke. SmallVector EndLabels; // Labels after invoke. - SmallVector ClauseLabels; // Labels for each clause. MCSymbol *LandingPadLabel; // Label at beginning of landing pad. const Function *Personality; // Personality function. std::vector TypeIds; // List of type ids (filters negative) @@ -331,11 +330,6 @@ public: /// void addCleanup(MachineBasicBlock *LandingPad); - /// Add a clause for a landing pad. Returns a new label for the clause. This - /// is used by EH schemes that have more than one landing pad. In this case, - /// each clause gets its own basic block. - MCSymbol *addClauseForLandingPad(MachineBasicBlock *LandingPad); - /// getTypeIDFor - Return the type id for the specified typeinfo. This is /// function wide. unsigned getTypeIDFor(const GlobalValue *TI); Modified: vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h Sat Feb 14 12:17:42 2015 (r278752) @@ -248,7 +248,7 @@ public: void setReductionState(ReductionState RS) { this->RS = RS; } void handleAddEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts += Transpose ? MD.getWorstCol() : MD.getWorstRow(); + DeniedOpts += Transpose ? MD.getWorstRow() : MD.getWorstCol(); const bool* UnsafeOpts = Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); for (unsigned i = 0; i < NumOpts; ++i) @@ -256,7 +256,7 @@ public: } void handleRemoveEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts -= Transpose ? MD.getWorstCol() : MD.getWorstRow(); + DeniedOpts -= Transpose ? MD.getWorstRow() : MD.getWorstCol(); const bool* UnsafeOpts = Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); for (unsigned i = 0; i < NumOpts; ++i) Modified: vendor/llvm/dist/include/llvm/IR/Metadata.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/Metadata.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/IR/Metadata.h Sat Feb 14 12:17:42 2015 (r278752) @@ -693,6 +693,7 @@ public: static AAMDNodes getMostGenericAA(const AAMDNodes &A, const AAMDNodes &B); static MDNode *getMostGenericFPMath(MDNode *A, MDNode *B); static MDNode *getMostGenericRange(MDNode *A, MDNode *B); + static MDNode *getMostGenericAliasScope(MDNode *A, MDNode *B); }; /// \brief Uniquable metadata node. Modified: vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -52,7 +52,7 @@ class CallAnalyzer : public InstVisitor< const TargetTransformInfo &TTI; /// The cache of @llvm.assume intrinsics. - AssumptionCache &AC; + AssumptionCacheTracker *ACT; // The called function. Function &F; @@ -146,8 +146,8 @@ class CallAnalyzer : public InstVisitor< public: CallAnalyzer(const DataLayout *DL, const TargetTransformInfo &TTI, - AssumptionCache &AC, Function &Callee, int Threshold) - : DL(DL), TTI(TTI), AC(AC), F(Callee), Threshold(Threshold), Cost(0), + AssumptionCacheTracker *ACT, Function &Callee, int Threshold) + : DL(DL), TTI(TTI), ACT(ACT), F(Callee), Threshold(Threshold), Cost(0), IsCallerRecursive(false), IsRecursiveCall(false), ExposesReturnsTwice(false), HasDynamicAlloca(false), ContainsNoDuplicateCall(false), HasReturn(false), HasIndirectBr(false), @@ -783,7 +783,7 @@ bool CallAnalyzer::visitCallSite(CallSit // during devirtualization and so we want to give it a hefty bonus for // inlining, but cap that bonus in the event that inlining wouldn't pan // out. Pretend to inline the function, with a custom threshold. - CallAnalyzer CA(DL, TTI, AC, *F, InlineConstants::IndirectCallThreshold); + CallAnalyzer CA(DL, TTI, ACT, *F, InlineConstants::IndirectCallThreshold); if (CA.analyzeCall(CS)) { // We were able to inline the indirect call! Subtract the cost from the // bonus we want to apply, but don't go below zero. @@ -1110,7 +1110,7 @@ bool CallAnalyzer::analyzeCall(CallSite // the ephemeral values multiple times (and they're completely determined by // the callee, so this is purely duplicate work). SmallPtrSet EphValues; - CodeMetrics::collectEphemeralValues(&F, &AC, EphValues); + CodeMetrics::collectEphemeralValues(&F, &ACT->getAssumptionCache(F), EphValues); // The worklist of live basic blocks in the callee *after* inlining. We avoid // adding basic blocks of the callee which can be proven to be dead for this @@ -1310,7 +1310,7 @@ InlineCost InlineCostAnalysis::getInline << "...\n"); CallAnalyzer CA(Callee->getDataLayout(), *TTI, - ACT->getAssumptionCache(*Callee), *Callee, Threshold); + ACT, *Callee, Threshold); bool ShouldInline = CA.analyzeCall(CS); DEBUG(CA.dump()); Modified: vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -623,8 +623,8 @@ void Instruction::getAAMetadata(AAMDNode N.TBAA = getMetadata(LLVMContext::MD_tbaa); if (Merge) - N.Scope = - MDNode::intersect(N.Scope, getMetadata(LLVMContext::MD_alias_scope)); + N.Scope = MDNode::getMostGenericAliasScope( + N.Scope, getMetadata(LLVMContext::MD_alias_scope)); else N.Scope = getMetadata(LLVMContext::MD_alias_scope); Modified: vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -9,9 +9,11 @@ #include "llvm-c/BitReader.h" #include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/raw_ostream.h" #include #include @@ -30,11 +32,20 @@ LLVMBool LLVMParseBitcodeInContext(LLVMC LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage) { - ErrorOr ModuleOrErr = - parseBitcodeFile(unwrap(MemBuf)->getMemBufferRef(), *unwrap(ContextRef)); - if (std::error_code EC = ModuleOrErr.getError()) { - if (OutMessage) - *OutMessage = strdup(EC.message().c_str()); + MemoryBufferRef Buf = unwrap(MemBuf)->getMemBufferRef(); + LLVMContext &Ctx = *unwrap(ContextRef); + + std::string Message; + raw_string_ostream Stream(Message); + DiagnosticPrinterRawOStream DP(Stream); + + ErrorOr ModuleOrErr = parseBitcodeFile( + Buf, Ctx, [&](const DiagnosticInfo &DI) { DI.print(DP); }); + if (ModuleOrErr.getError()) { + if (OutMessage) { + Stream.flush(); + *OutMessage = strdup(Message.c_str()); + } *OutModule = wrap((Module*)nullptr); return 1; } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -121,8 +121,7 @@ computeActionsTable(const SmallVectorImp for (unsigned J = NumShared, M = TypeIds.size(); J != M; ++J) { int TypeID = TypeIds[J]; assert(-1 - TypeID < (int)FilterOffsets.size() && "Unknown filter id!"); - int ValueForTypeID = - isFilterEHSelector(TypeID) ? FilterOffsets[-1 - TypeID] : TypeID; + int ValueForTypeID = TypeID < 0 ? FilterOffsets[-1 - TypeID] : TypeID; unsigned SizeTypeID = getSLEB128Size(ValueForTypeID); int NextAction = SizeAction ? -(SizeAction + SizeTypeID) : 0; @@ -270,14 +269,14 @@ computeCallSiteTable(SmallVectorImplLandingPadLabel, FirstActions[P.PadIndex] }; // Try to merge with the previous call-site. SJLJ doesn't do this if (PreviousIsInvoke && !IsSJLJ) { CallSiteEntry &Prev = CallSites.back(); - if (Site.LPad == Prev.LPad && Site.Action == Prev.Action) { + if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) { // Extend the range of the previous entry. Prev.EndLabel = Site.EndLabel; continue; @@ -577,15 +576,15 @@ void EHStreamer::emitExceptionTable() { // Offset of the landing pad, counted in 16-byte bundles relative to the // @LPStart address. - if (!S.LPad) { + if (!S.PadLabel) { if (VerboseAsm) Asm->OutStreamer.AddComment(" has no landing pad"); Asm->OutStreamer.EmitIntValue(0, 4/*size*/); } else { if (VerboseAsm) Asm->OutStreamer.AddComment(Twine(" jumps to ") + - S.LPad->LandingPadLabel->getName()); - Asm->EmitLabelDifference(S.LPad->LandingPadLabel, EHFuncBeginSym, 4); + S.PadLabel->getName()); + Asm->EmitLabelDifference(S.PadLabel, EHFuncBeginSym, 4); } // Offset of the first associated action record, relative to the start of @@ -682,7 +681,7 @@ void EHStreamer::emitTypeInfos(unsigned unsigned TypeID = *I; if (VerboseAsm) { --Entry; - if (isFilterEHSelector(TypeID)) + if (TypeID != 0) Asm->OutStreamer.AddComment("FilterInfo " + Twine(Entry)); } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h Sat Feb 14 12:17:42 2015 (r278752) @@ -23,8 +23,6 @@ class MachineModuleInfo; class MachineInstr; class MachineFunction; class AsmPrinter; -class MCSymbol; -class MCSymbolRefExpr; template class SmallVectorImpl; @@ -62,11 +60,11 @@ protected: /// Structure describing an entry in the call-site table. struct CallSiteEntry { // The 'try-range' is BeginLabel .. EndLabel. - MCSymbol *BeginLabel; // Null indicates the start of the function. - MCSymbol *EndLabel; // Null indicates the end of the function. + MCSymbol *BeginLabel; // zero indicates the start of the function. + MCSymbol *EndLabel; // zero indicates the end of the function. - // LPad contains the landing pad start labels. - const LandingPadInfo *LPad; // Null indicates that there is no landing pad. + // The landing pad starts at PadLabel. + MCSymbol *PadLabel; // zero indicates that there is no landing pad. unsigned Action; }; @@ -114,13 +112,6 @@ protected: virtual void emitTypeInfos(unsigned TTypeEncoding); - // Helpers for for identifying what kind of clause an EH typeid or selector - // corresponds to. Negative selectors are for filter clauses, the zero - // selector is for cleanups, and positive selectors are for catch clauses. - static bool isFilterEHSelector(int Selector) { return Selector < 0; } - static bool isCleanupEHSelector(int Selector) { return Selector == 0; } - static bool isCatchEHSelector(int Selector) { return Selector > 0; } - public: EHStreamer(AsmPrinter *A); virtual ~EHStreamer(); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -99,156 +99,9 @@ void Win64Exception::endFunction(const M if (shouldEmitPersonality) { Asm->OutStreamer.PushSection(); - - // Emit an UNWIND_INFO struct describing the prologue. Asm->OutStreamer.EmitWinEHHandlerData(); - - // Emit either MSVC-compatible tables or the usual Itanium-style LSDA after - // the UNWIND_INFO struct. - if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::MSVC) { - const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()]; - if (Per->getName() == "__C_specific_handler") - emitCSpecificHandlerTable(); - else - report_fatal_error(Twine("unexpected personality function: ") + - Per->getName()); - } else { - emitExceptionTable(); - } - + emitExceptionTable(); Asm->OutStreamer.PopSection(); } Asm->OutStreamer.EmitWinCFIEndProc(); } - -const MCSymbolRefExpr *Win64Exception::createImageRel32(const MCSymbol *Value) { - return MCSymbolRefExpr::Create(Value, MCSymbolRefExpr::VK_COFF_IMGREL32, - Asm->OutContext); -} - -/// Emit the language-specific data that __C_specific_handler expects. This -/// handler lives in the x64 Microsoft C runtime and allows catching or cleaning -/// up after faults with __try, __except, and __finally. The typeinfo values -/// are not really RTTI data, but pointers to filter functions that return an -/// integer (1, 0, or -1) indicating how to handle the exception. For __finally -/// blocks and other cleanups, the landing pad label is zero, and the filter -/// function is actually a cleanup handler with the same prototype. A catch-all -/// entry is modeled with a null filter function field and a non-zero landing -/// pad label. -/// -/// Possible filter function return values: -/// EXCEPTION_EXECUTE_HANDLER (1): -/// Jump to the landing pad label after cleanups. -/// EXCEPTION_CONTINUE_SEARCH (0): -/// Continue searching this table or continue unwinding. -/// EXCEPTION_CONTINUE_EXECUTION (-1): -/// Resume execution at the trapping PC. -/// -/// Inferred table structure: -/// struct Table { -/// int NumEntries; -/// struct Entry { -/// imagerel32 LabelStart; -/// imagerel32 LabelEnd; -/// imagerel32 FilterOrFinally; // Zero means catch-all. -/// imagerel32 LabelLPad; // Zero means __finally. -/// } Entries[NumEntries]; -/// }; -void Win64Exception::emitCSpecificHandlerTable() { - const std::vector &PadInfos = MMI->getLandingPads(); - - // Simplifying assumptions for first implementation: - // - Cleanups are not implemented. - // - Filters are not implemented. - - // The Itanium LSDA table sorts similar landing pads together to simplify the - // actions table, but we don't need that. - SmallVector LandingPads; - LandingPads.reserve(PadInfos.size()); - for (const auto &LP : PadInfos) - LandingPads.push_back(&LP); - - // Compute label ranges for call sites as we would for the Itanium LSDA, but - // use an all zero action table because we aren't using these actions. - SmallVector FirstActions; - FirstActions.resize(LandingPads.size()); - SmallVector CallSites; - computeCallSiteTable(CallSites, LandingPads, FirstActions); - - MCSymbol *EHFuncBeginSym = - Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber()); - MCSymbol *EHFuncEndSym = - Asm->GetTempSymbol("eh_func_end", Asm->getFunctionNumber()); - - // Emit the number of table entries. - unsigned NumEntries = 0; - for (const CallSiteEntry &CSE : CallSites) { - if (!CSE.LPad) - continue; // Ignore gaps. - for (int Selector : CSE.LPad->TypeIds) { - // Ignore C++ filter clauses in SEH. - // FIXME: Implement cleanup clauses. - if (isCatchEHSelector(Selector)) - ++NumEntries; - } - } - Asm->OutStreamer.EmitIntValue(NumEntries, 4); - - // Emit the four-label records for each call site entry. The table has to be - // sorted in layout order, and the call sites should already be sorted. - for (const CallSiteEntry &CSE : CallSites) { - // Ignore gaps. Unlike the Itanium model, unwinding through a frame without - // an EH table entry will propagate the exception rather than terminating - // the program. - if (!CSE.LPad) - continue; - const LandingPadInfo *LPad = CSE.LPad; - - // Compute the label range. We may reuse the function begin and end labels - // rather than forming new ones. - const MCExpr *Begin = - createImageRel32(CSE.BeginLabel ? CSE.BeginLabel : EHFuncBeginSym); - const MCExpr *End; - if (CSE.EndLabel) { - // The interval is half-open, so we have to add one to include the return - // address of the last invoke in the range. - End = MCBinaryExpr::CreateAdd(createImageRel32(CSE.EndLabel), - MCConstantExpr::Create(1, Asm->OutContext), - Asm->OutContext); - } else { - End = createImageRel32(EHFuncEndSym); - } - - // These aren't really type info globals, they are actually pointers to - // filter functions ordered by selector. The zero selector is used for - // cleanups, so slot zero corresponds to selector 1. - const std::vector &SelectorToFilter = MMI->getTypeInfos(); - - // Do a parallel iteration across typeids and clause labels, skipping filter - // clauses. - assert(LPad->TypeIds.size() == LPad->ClauseLabels.size()); - for (size_t I = 0, E = LPad->TypeIds.size(); I < E; ++I) { - // AddLandingPadInfo stores the clauses in reverse, but there is a FIXME - // to change that. - int Selector = LPad->TypeIds[E - I - 1]; - MCSymbol *ClauseLabel = LPad->ClauseLabels[I]; - - // Ignore C++ filter clauses in SEH. - // FIXME: Implement cleanup clauses. - if (!isCatchEHSelector(Selector)) - continue; - - Asm->OutStreamer.EmitValue(Begin, 4); - Asm->OutStreamer.EmitValue(End, 4); - if (isCatchEHSelector(Selector)) { - assert(unsigned(Selector - 1) < SelectorToFilter.size()); - const GlobalValue *TI = SelectorToFilter[Selector - 1]; - if (TI) // Emit the filter function pointer. - Asm->OutStreamer.EmitValue(createImageRel32(Asm->getSymbol(TI)), 4); - else // Otherwise, this is a "catch i8* null", or catch all. - Asm->OutStreamer.EmitIntValue(0, 4); - } - Asm->OutStreamer.EmitValue(createImageRel32(ClauseLabel), 4); - } - } -} Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h Sat Feb 14 12:17:42 2015 (r278752) @@ -29,10 +29,6 @@ class Win64Exception : public EHStreamer /// Per-function flag to indicate if frame moves info should be emitted. bool shouldEmitMoves; - void emitCSpecificHandlerTable(); - - const MCSymbolRefExpr *createImageRel32(const MCSymbol *Value); - public: //===--------------------------------------------------------------------===// // Main entry points. Modified: vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -452,14 +452,6 @@ void MachineModuleInfo::addCleanup(Machi LP.TypeIds.push_back(0); } -MCSymbol * -MachineModuleInfo::addClauseForLandingPad(MachineBasicBlock *LandingPad) { - MCSymbol *ClauseLabel = Context.CreateTempSymbol(); - LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - LP.ClauseLabels.push_back(ClauseLabel); - return ClauseLabel; -} - /// TidyLandingPads - Remap landing pad labels and remove any deleted landing /// pads. void MachineModuleInfo::TidyLandingPads(DenseMap *LPMap) { Modified: vendor/llvm/dist/lib/CodeGen/Passes.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/Passes.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/Passes.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -449,9 +449,9 @@ void TargetPassConfig::addPassesToHandle case ExceptionHandling::DwarfCFI: case ExceptionHandling::ARM: case ExceptionHandling::ItaniumWinEH: - case ExceptionHandling::MSVC: // FIXME: Needs preparation. addPass(createDwarfEHPass(TM)); break; + case ExceptionHandling::MSVC: // FIXME: Add preparation. case ExceptionHandling::None: addPass(createLowerInvokePass()); Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -6544,19 +6544,15 @@ SDValue DAGCombiner::visitBITCAST(SDNode // If the input is a constant, let getNode fold it. if (isa(N0) || isa(N0)) { - SDValue Res = DAG.getNode(ISD::BITCAST, SDLoc(N), VT, N0); - if (Res.getNode() != N) { - if (!LegalOperations || - TLI.isOperationLegal(Res.getNode()->getOpcode(), VT)) - return Res; - - // Folding it resulted in an illegal node, and it's too late to - // do that. Clean up the old node and forego the transformation. - // Ideally this won't happen very often, because instcombine - // and the earlier dagcombine runs (where illegal nodes are - // permitted) should have folded most of them already. - deleteAndRecombine(Res.getNode()); - } + // If we can't allow illegal operations, we need to check that this is just + // a fp -> int or int -> conversion and that the resulting operation will + // be legal. + if (!LegalOperations || + (isa(N0) && VT.isFloatingPoint() && !VT.isVector() && + TLI.isOperationLegal(ISD::ConstantFP, VT)) || + (isa(N0) && VT.isInteger() && !VT.isVector() && + TLI.isOperationLegal(ISD::Constant, VT))) + return DAG.getNode(ISD::BITCAST, SDLoc(N), VT, N0); } // (conv (conv x, t1), t2) -> (conv x, t2) Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -390,7 +390,8 @@ SDValue VectorLegalizer::Promote(SDValue if (Op.getOperand(j) .getValueType() .getVectorElementType() - .isFloatingPoint()) + .isFloatingPoint() && + NVT.isVector() && NVT.getVectorElementType().isFloatingPoint()) Operands[j] = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Op.getOperand(j)); else Operands[j] = DAG.getNode(ISD::BITCAST, dl, NVT, Op.getOperand(j)); @@ -399,8 +400,9 @@ SDValue VectorLegalizer::Promote(SDValue } Op = DAG.getNode(Op.getOpcode(), dl, NVT, Operands); - if (VT.isFloatingPoint() || - (VT.isVector() && VT.getVectorElementType().isFloatingPoint())) + if ((VT.isFloatingPoint() && NVT.isFloatingPoint()) || + (VT.isVector() && VT.getVectorElementType().isFloatingPoint() && + NVT.isVector() && NVT.getVectorElementType().isFloatingPoint())) return DAG.getNode(ISD::FP_ROUND, dl, VT, Op, DAG.getIntPtrConstant(0)); else return DAG.getNode(ISD::BITCAST, dl, VT, Op); @@ -554,9 +556,9 @@ SDValue VectorLegalizer::ExpandLoad(SDVa BitOffset += SrcEltBits; if (BitOffset >= WideBits) { WideIdx++; - Offset -= WideBits; - if (Offset > 0) { - ShAmt = DAG.getConstant(SrcEltBits - Offset, + BitOffset -= WideBits; + if (BitOffset > 0) { + ShAmt = DAG.getConstant(SrcEltBits - BitOffset, TLI.getShiftAmountTy(WideVT)); Hi = DAG.getNode(ISD::SHL, dl, WideVT, LoadVals[WideIdx], ShAmt); Hi = DAG.getNode(ISD::AND, dl, WideVT, Hi, SrcEltBitMask); Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -2071,14 +2071,10 @@ void SelectionDAGBuilder::visitLandingPa // Get the two live-in registers as SDValues. The physregs have already been // copied into virtual registers. SDValue Ops[2]; - if (FuncInfo.ExceptionPointerVirtReg) { - Ops[0] = DAG.getZExtOrTrunc( - DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), - FuncInfo.ExceptionPointerVirtReg, TLI.getPointerTy()), - getCurSDLoc(), ValueVTs[0]); - } else { - Ops[0] = DAG.getConstant(0, TLI.getPointerTy()); - } + Ops[0] = DAG.getZExtOrTrunc( + DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), + FuncInfo.ExceptionPointerVirtReg, TLI.getPointerTy()), + getCurSDLoc(), ValueVTs[0]); Ops[1] = DAG.getZExtOrTrunc( DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), FuncInfo.ExceptionSelectorVirtReg, TLI.getPointerTy()), @@ -2090,27 +2086,6 @@ void SelectionDAGBuilder::visitLandingPa setValue(&LP, Res); } -unsigned -SelectionDAGBuilder::visitLandingPadClauseBB(GlobalValue *ClauseGV, - MachineBasicBlock *LPadBB) { - SDValue Chain = getControlRoot(); - - // Get the typeid that we will dispatch on later. - const TargetLowering &TLI = DAG.getTargetLoweringInfo(); - const TargetRegisterClass *RC = TLI.getRegClassFor(TLI.getPointerTy()); - unsigned VReg = FuncInfo.MF->getRegInfo().createVirtualRegister(RC); - unsigned TypeID = DAG.getMachineFunction().getMMI().getTypeIDFor(ClauseGV); - SDValue Sel = DAG.getConstant(TypeID, TLI.getPointerTy()); - Chain = DAG.getCopyToReg(Chain, getCurSDLoc(), VReg, Sel); - - // Branch to the main landing pad block. - MachineBasicBlock *ClauseMBB = FuncInfo.MBB; - ClauseMBB->addSuccessor(LPadBB); - DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other, Chain, - DAG.getBasicBlock(LPadBB))); - return VReg; -} - /// handleSmallSwitchCaseRange - Emit a series of specific tests (suitable for /// small case ranges). bool SelectionDAGBuilder::handleSmallSwitchRange(CaseRec& CR, Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Sat Feb 14 12:17:42 2015 (r278752) @@ -713,8 +713,6 @@ public: void visitJumpTable(JumpTable &JT); void visitJumpTableHeader(JumpTable &JT, JumpTableHeader &JTH, MachineBasicBlock *SwitchBB); - unsigned visitLandingPadClauseBB(GlobalValue *ClauseGV, - MachineBasicBlock *LPadMBB); private: // These all get lowered before this pass. Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -19,7 +19,6 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/CFG.h" -#include "llvm/CodeGen/Analysis.h" #include "llvm/CodeGen/FastISel.h" #include "llvm/CodeGen/FunctionLoweringInfo.h" #include "llvm/CodeGen/GCMetadata.h" @@ -41,7 +40,6 @@ #include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" -#include "llvm/MC/MCAsmInfo.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -909,8 +907,6 @@ void SelectionDAGISel::DoInstructionSele void SelectionDAGISel::PrepareEHLandingPad() { MachineBasicBlock *MBB = FuncInfo->MBB; - const TargetRegisterClass *PtrRC = TLI->getRegClassFor(TLI->getPointerTy()); - // Add a label to mark the beginning of the landing pad. Deletion of the // landing pad can thus be detected via the MachineModuleInfo. MCSymbol *Label = MF->getMMI().addLandingPad(MBB); @@ -922,66 +918,8 @@ void SelectionDAGISel::PrepareEHLandingP BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II) .addSym(Label); - if (TM.getMCAsmInfo()->getExceptionHandlingType() == - ExceptionHandling::MSVC) { - // Make virtual registers and a series of labels that fill in values for the - // clauses. - auto &RI = MF->getRegInfo(); - FuncInfo->ExceptionSelectorVirtReg = RI.createVirtualRegister(PtrRC); - - // Get all invoke BBs that will unwind into the clause BBs. - SmallVector InvokeBBs(MBB->pred_begin(), - MBB->pred_end()); - - // Emit separate machine basic blocks with separate labels for each clause - // before the main landing pad block. - const BasicBlock *LLVMBB = MBB->getBasicBlock(); - const LandingPadInst *LPadInst = LLVMBB->getLandingPadInst(); - MachineInstrBuilder SelectorPHI = BuildMI( - *MBB, MBB->begin(), SDB->getCurDebugLoc(), TII->get(TargetOpcode::PHI), - FuncInfo->ExceptionSelectorVirtReg); - for (unsigned I = 0, E = LPadInst->getNumClauses(); I != E; ++I) { - MachineBasicBlock *ClauseBB = MF->CreateMachineBasicBlock(LLVMBB); - MF->insert(MBB, ClauseBB); - - // Add the edge from the invoke to the clause. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->addSuccessor(ClauseBB); - - // Mark the clause as a landing pad or MI passes will delete it. - ClauseBB->setIsLandingPad(); - - GlobalValue *ClauseGV = ExtractTypeInfo(LPadInst->getClause(I)); - - // Start the BB with a label. - MCSymbol *ClauseLabel = MF->getMMI().addClauseForLandingPad(MBB); - BuildMI(*ClauseBB, ClauseBB->begin(), SDB->getCurDebugLoc(), II) - .addSym(ClauseLabel); - - // Construct a simple BB that defines a register with the typeid constant. - FuncInfo->MBB = ClauseBB; - FuncInfo->InsertPt = ClauseBB->end(); - unsigned VReg = SDB->visitLandingPadClauseBB(ClauseGV, MBB); - CurDAG->setRoot(SDB->getRoot()); - SDB->clear(); - CodeGenAndEmitDAG(); - - // Add the typeid virtual register to the phi in the main landing pad. - SelectorPHI.addReg(VReg).addMBB(ClauseBB); - } - - // Remove the edge from the invoke to the lpad. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->removeSuccessor(MBB); - - // Restore FuncInfo back to its previous state and select the main landing - // pad block. - FuncInfo->MBB = MBB; - FuncInfo->InsertPt = MBB->end(); - return; - } - // Mark exception register as live in. + const TargetRegisterClass *PtrRC = TLI->getRegClassFor(TLI->getPointerTy()); if (unsigned Reg = TLI->getExceptionPointerRegister()) FuncInfo->ExceptionPointerVirtReg = MBB->addLiveIn(Reg, PtrRC); Modified: vendor/llvm/dist/lib/IR/DebugInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/DebugInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/DebugInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -525,12 +525,15 @@ bool DISubprogram::Verify() const { while ((IA = DL.getInlinedAt())) DL = DebugLoc::getFromDILocation(IA); DL.getScopeAndInlinedAt(Scope, IA); + if (!Scope) + return false; assert(!IA); while (!DIDescriptor(Scope).isSubprogram()) { DILexicalBlockFile D(Scope); Scope = D.isLexicalBlockFile() ? D.getScope() : DebugLoc::getFromDILexicalBlock(Scope).getScope(); + assert(Scope && "lexical block file has no scope"); } if (!DISubprogram(Scope).describes(F)) return false; Modified: vendor/llvm/dist/lib/IR/Metadata.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/Metadata.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/Metadata.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -826,6 +826,28 @@ MDNode *MDNode::intersect(MDNode *A, MDN return getOrSelfReference(A->getContext(), MDs); } +MDNode *MDNode::getMostGenericAliasScope(MDNode *A, MDNode *B) { + if (!A || !B) + return nullptr; + + SmallVector MDs(B->op_begin(), B->op_end()); + for (unsigned i = 0, ie = A->getNumOperands(); i != ie; ++i) { + Metadata *MD = A->getOperand(i); + bool insert = true; + for (unsigned j = 0, je = B->getNumOperands(); j != je; ++j) + if (MD == B->getOperand(j)) { + insert = false; + break; + } + if (insert) + MDs.push_back(MD); + } + + // FIXME: This preserves long-standing behaviour, but is it really the right + // behaviour? Or was that an unintended side-effect of node uniquing? + return getOrSelfReference(A->getContext(), MDs); +} + MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) { if (!A || !B) return nullptr; Modified: vendor/llvm/dist/lib/IR/Type.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/Type.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/Type.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -708,9 +708,10 @@ VectorType::VectorType(Type *ElType, uns VectorType *VectorType::get(Type *elementType, unsigned NumElements) { Type *ElementType = const_cast(elementType); assert(NumElements > 0 && "#Elements of a VectorType must be greater than 0"); - assert(isValidElementType(ElementType) && - "Elements of a VectorType must be a primitive type"); - + assert(isValidElementType(ElementType) && "Element type of a VectorType must " + "be an integer, floating point, or " + "pointer type."); + LLVMContextImpl *pImpl = ElementType->getContext().pImpl; VectorType *&Entry = ElementType->getContext().pImpl ->VectorTypes[std::make_pair(ElementType, NumElements)]; Modified: vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -47,6 +47,10 @@ void MCSectionCOFF::PrintSwitchToSection } OS << "\t.section\t" << getSectionName() << ",\""; + if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA) + OS << 'd'; + if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) + OS << 'b'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_EXECUTE) OS << 'x'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_WRITE) @@ -55,10 +59,6 @@ void MCSectionCOFF::PrintSwitchToSection OS << 'r'; else OS << 'y'; - if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA) - OS << 'd'; - if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) - OS << 'b'; if (getCharacteristics() & COFF::IMAGE_SCN_LNK_REMOVE) OS << 'n'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_SHARED) Modified: vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -710,17 +710,22 @@ void WinCOFFObjectWriter::RecordRelocati CrossSection = &Symbol.getSection() != &B->getSection(); // Offset of the symbol in the section - int64_t a = Layout.getSymbolOffset(&B_SD); + int64_t OffsetOfB = Layout.getSymbolOffset(&B_SD); - // Offset of the relocation in the section - int64_t b = Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); - - FixedValue = b - a; // In the case where we have SymbA and SymB, we just need to store the delta // between the two symbols. Update FixedValue to account for the delta, and // skip recording the relocation. - if (!CrossSection) + if (!CrossSection) { + int64_t OffsetOfA = Layout.getSymbolOffset(&A_SD); + FixedValue = (OffsetOfA - OffsetOfB) + Target.getConstant(); return; + } + + // Offset of the relocation in the section + int64_t OffsetOfRelocation = + Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); + + FixedValue = OffsetOfRelocation - OffsetOfB; } else { FixedValue = Target.getConstant(); } Modified: vendor/llvm/dist/lib/Support/regcomp.c ============================================================================== --- vendor/llvm/dist/lib/Support/regcomp.c Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Support/regcomp.c Sat Feb 14 12:17:42 2015 (r278752) @@ -49,6 +49,14 @@ #include "regcclass.h" #include "regcname.h" +#include "llvm/Config/config.h" +#if HAVE_STDINT_H +#include +#else +/* Pessimistically bound memory use */ +#define SIZE_MAX UINT_MAX +#endif + /* * parse structure, passed up and down to avoid global variables and * other clumsinesses @@ -1069,6 +1077,8 @@ allocset(struct parse *p) p->ncsalloc += CHAR_BIT; nc = p->ncsalloc; + if (nc > SIZE_MAX / sizeof(cset)) + goto nomem; assert(nc % CHAR_BIT == 0); nbytes = nc / CHAR_BIT * css; @@ -1412,6 +1422,11 @@ enlarge(struct parse *p, sopno size) if (p->ssize >= size) return; + if ((unsigned long)size > SIZE_MAX / sizeof(sop)) { + SETERROR(REG_ESPACE); + return; + } + sp = (sop *)realloc(p->strip, size*sizeof(sop)); if (sp == NULL) { SETERROR(REG_ESPACE); @@ -1428,6 +1443,12 @@ static void stripsnug(struct parse *p, struct re_guts *g) { g->nstates = p->slen; + if ((unsigned long)p->slen > SIZE_MAX / sizeof(sop)) { + g->strip = p->strip; + SETERROR(REG_ESPACE); + return; + } + g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop)); if (g->strip == NULL) { SETERROR(REG_ESPACE); Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -6287,6 +6287,8 @@ static SDValue EmitVectorComparison(SDVa AArch64CC::CondCode CC, bool NoNans, EVT VT, SDLoc dl, SelectionDAG &DAG) { EVT SrcVT = LHS.getValueType(); + assert(VT.getSizeInBits() == SrcVT.getSizeInBits() && + "function only supposed to emit natural comparisons"); BuildVectorSDNode *BVN = dyn_cast(RHS.getNode()); APInt CnstBits(VT.getSizeInBits(), 0); @@ -6381,13 +6383,15 @@ SDValue AArch64TargetLowering::LowerVSET ISD::CondCode CC = cast(Op.getOperand(2))->get(); SDValue LHS = Op.getOperand(0); SDValue RHS = Op.getOperand(1); + EVT CmpVT = LHS.getValueType().changeVectorElementTypeToInteger(); SDLoc dl(Op); if (LHS.getValueType().getVectorElementType().isInteger()) { assert(LHS.getValueType() == RHS.getValueType()); AArch64CC::CondCode AArch64CC = changeIntCCToAArch64CC(CC); - return EmitVectorComparison(LHS, RHS, AArch64CC, false, Op.getValueType(), - dl, DAG); + SDValue Cmp = + EmitVectorComparison(LHS, RHS, AArch64CC, false, CmpVT, dl, DAG); + return DAG.getSExtOrTrunc(Cmp, dl, Op.getValueType()); } assert(LHS.getValueType().getVectorElementType() == MVT::f32 || @@ -6401,19 +6405,21 @@ SDValue AArch64TargetLowering::LowerVSET bool NoNaNs = getTargetMachine().Options.NoNaNsFPMath; SDValue Cmp = - EmitVectorComparison(LHS, RHS, CC1, NoNaNs, Op.getValueType(), dl, DAG); + EmitVectorComparison(LHS, RHS, CC1, NoNaNs, CmpVT, dl, DAG); if (!Cmp.getNode()) return SDValue(); if (CC2 != AArch64CC::AL) { SDValue Cmp2 = - EmitVectorComparison(LHS, RHS, CC2, NoNaNs, Op.getValueType(), dl, DAG); + EmitVectorComparison(LHS, RHS, CC2, NoNaNs, CmpVT, dl, DAG); if (!Cmp2.getNode()) return SDValue(); - Cmp = DAG.getNode(ISD::OR, dl, Cmp.getValueType(), Cmp, Cmp2); + Cmp = DAG.getNode(ISD::OR, dl, CmpVT, Cmp, Cmp2); } + Cmp = DAG.getSExtOrTrunc(Cmp, dl, Op.getValueType()); + if (ShouldInvert) return Cmp = DAG.getNOT(dl, Cmp, Cmp.getValueType()); Modified: vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -2400,7 +2400,8 @@ optimizeCompareInstr(MachineInstr *CmpIn else if (MI->getParent() != CmpInstr->getParent() || CmpValue != 0) { // Conservatively refuse to convert an instruction which isn't in the same // BB as the comparison. - // For CMPri, we need to check Sub, thus we can't return here. + // For CMPri w/ CmpValue != 0, a Sub may still be a candidate. + // Thus we cannot return here. if (CmpInstr->getOpcode() == ARM::CMPri || CmpInstr->getOpcode() == ARM::t2CMPri) MI = nullptr; @@ -2479,8 +2480,8 @@ optimizeCompareInstr(MachineInstr *CmpIn case ARM::t2EORrr: case ARM::t2EORri: { // Scan forward for the use of CPSR - // When checking against MI: if it's a conditional code requires - // checking of V bit, then this is not safe to do. + // When checking against MI: if it's a conditional code that requires + // checking of the V bit or C bit, then this is not safe to do. // It is safe to remove CmpInstr if CPSR is redefined or killed. // If we are done with the basic block, we need to check whether CPSR is // live-out. @@ -2547,19 +2548,30 @@ optimizeCompareInstr(MachineInstr *CmpIn OperandsToUpdate.push_back( std::make_pair(&((*I).getOperand(IO - 1)), NewCC)); } - } else + } else { + // No Sub, so this is x = y, z; cmp x, 0. switch (CC) { - default: + case ARMCC::EQ: // Z + case ARMCC::NE: // Z + case ARMCC::MI: // N + case ARMCC::PL: // N + case ARMCC::AL: // none // CPSR can be used multiple times, we should continue. break; - case ARMCC::VS: - case ARMCC::VC: - case ARMCC::GE: - case ARMCC::LT: - case ARMCC::GT: - case ARMCC::LE: + case ARMCC::HS: // C + case ARMCC::LO: // C + case ARMCC::VS: // V + case ARMCC::VC: // V + case ARMCC::HI: // C Z + case ARMCC::LS: // C Z + case ARMCC::GE: // N V + case ARMCC::LT: // N V + case ARMCC::GT: // Z N V + case ARMCC::LE: // Z N V + // The instruction uses the V bit or C bit which is not safe. return false; } + } } } Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -565,7 +565,6 @@ ARMTargetLowering::ARMTargetLowering(con setTargetDAGCombine(ISD::FP_TO_SINT); setTargetDAGCombine(ISD::FP_TO_UINT); setTargetDAGCombine(ISD::FDIV); - setTargetDAGCombine(ISD::LOAD); // It is legal to extload from v4i8 to v4i16 or v4i32. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 12:18:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C5E14E0; Sat, 14 Feb 2015 12:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20089F0; Sat, 14 Feb 2015 12:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECIbnr023805; Sat, 14 Feb 2015 12:18:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECIbKR023804; Sat, 14 Feb 2015 12:18:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141218.t1ECIbKR023804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278753 - vendor/llvm/llvm-release_360-r229040 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:18:38 -0000 Author: dim Date: Sat Feb 14 12:18:37 2015 New Revision: 278753 URL: https://svnweb.freebsd.org/changeset/base/278753 Log: Tag llvm tags/RELEASE_360/rc3 r229040 (effectively, 3.6.0 RC3). Added: vendor/llvm/llvm-release_360-r229040/ - copied from r278752, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 12:18:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6652606; Sat, 14 Feb 2015 12:18:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1229F7; Sat, 14 Feb 2015 12:18:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECItlZ023904; Sat, 14 Feb 2015 12:18:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECIngH023875; Sat, 14 Feb 2015 12:18:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141218.t1ECIngH023875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278754 - in vendor/clang/dist: docs include/clang/Basic lib/AST lib/CodeGen lib/Driver lib/Parse lib/Sema lib/Serialization test/CXX/expr/expr.prim/expr.prim.lambda test/CodeGenCUDA te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:18:55 -0000 Author: dim Date: Sat Feb 14 12:18:48 2015 New Revision: 278754 URL: https://svnweb.freebsd.org/changeset/base/278754 Log: Vendor import of clang RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3@229040 Added: vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu vendor/clang/dist/test/PCH/implicitly-deleted.cpp (contents, props changed) Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 14 12:18:48 2015 (r278754) @@ -98,6 +98,8 @@ Windows Support - Basic support for DWARF debug information in COFF files +- Support for Visual C++ '__super' keyword + C Language Changes in Clang --------------------------- @@ -118,10 +120,35 @@ C++ Language Changes in Clang - Clang will put individual ``.init_array/.ctors`` sections in comdats, reducing code duplication and speeding up startup. -C++11 Feature Support +C++17 Feature Support ^^^^^^^^^^^^^^^^^^^^^ -... +Clang has experimental support for some proposed C++1z (tentatively, C++17) +features. This support can be enabled using the `-std=c++1z` flag. + +New in Clang 3.6 is support for: + +- Fold expressions + +- `u8` character literals + +- Nested namespace definitions: `namespace A::B { ... }` as a shorthand for + `namespace A { namespace B { ... } }` + +- Attributes for namespaces and enumerators + +- Constant evaluation for all non-type template arguments + +Note that these features may be changed or removed in future Clang releases +without notice. + +Support for `for (identifier : range)` as a synonym for +`for (auto &&identifier : range)` has been removed as it is no longer currently +considered for C++17. + +For more details on C++ feature support, see +`the C++ status page `_. + Objective-C Language Changes in Clang ------------------------------------- @@ -133,6 +160,19 @@ OpenCL C Language Changes in Clang ... +OpenMP Language Changes in Clang +-------------------------------- + +Clang 3.6 contains codegen for many individual pragmas for OpenMP but combinations are not completed as yet. +We plan to continue codegen code drop aiming for completion for 3.7. Please see this link for up-to-date +`status _` +LLVM’s OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC, +as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved +- missed entry points added, Barrier and fork/join code improved, one more type of barrier enabled. +Support for ppc64le architecture is now available and automatically detected when using cmake system. +Using makefile the new "ppc64le" arch type is available. +Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others. + Internal API Changes -------------------- Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Feb 14 12:18:48 2015 (r278754) @@ -749,3 +749,6 @@ def SerializedDiagnostics : DiagGroup<"s // A warning group for warnings about code that clang accepts when // compiling CUDA C/C++ but which is not compatible with the CUDA spec. def CudaCompat : DiagGroup<"cuda-compat">; + +// A warning group for things that will change semantics in the future. +def FutureCompat : DiagGroup<"future-compat">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Feb 14 12:18:48 2015 (r278754) @@ -802,6 +802,10 @@ def warn_cxx98_compat_lambda : Warning< def err_lambda_missing_parens : Error< "lambda requires '()' before %select{'mutable'|return type|" "attribute specifier}0">; +def warn_init_capture_direct_list_init : Warning< + "direct list initialization of a lambda init-capture will change meaning in " + "a future version of Clang; insert an '=' to avoid a change in behavior">, + InGroup; // Availability attribute def err_expected_version : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Feb 14 12:18:48 2015 (r278754) @@ -1635,6 +1635,10 @@ def err_auto_var_init_multiple_expressio def err_auto_var_init_paren_braces : Error< "cannot deduce type for variable %0 with type %1 from " "parenthesized initializer list">; +def warn_auto_var_direct_list_init : Warning< + "direct list initialization of a variable with a deduced type will change " + "meaning in a future version of Clang; insert an '=' to avoid a change in " + "behavior">, InGroup; def err_auto_new_ctor_multiple_expressions : Error< "new expression for type %0 contains multiple constructor arguments">; def err_auto_missing_trailing_return : Error< Modified: vendor/clang/dist/lib/AST/DeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclCXX.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/AST/DeclCXX.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -1693,12 +1693,12 @@ const Type *CXXCtorInitializer::getBaseC } SourceLocation CXXCtorInitializer::getSourceLocation() const { - if (isAnyMemberInitializer()) - return getMemberLocation(); - if (isInClassMemberInitializer()) return getAnyMember()->getLocation(); + if (isAnyMemberInitializer()) + return getMemberLocation(); + if (TypeSourceInfo *TSInfo = Initializee.get()) return TSInfo->getTypeLoc().getLocalSourceRange().getBegin(); Modified: vendor/clang/dist/lib/CodeGen/CGClass.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGClass.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CGClass.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -544,7 +544,7 @@ static void EmitMemberInitializer(CodeGe CXXCtorInitializer *MemberInit, const CXXConstructorDecl *Constructor, FunctionArgList &Args) { - ApplyDebugLocation Loc(CGF, MemberInit->getMemberLocation()); + ApplyDebugLocation Loc(CGF, MemberInit->getSourceLocation()); assert(MemberInit->isAnyMemberInitializer() && "Must have member initializer!"); assert(MemberInit->getInit() && "Must have initializer!"); @@ -598,7 +598,6 @@ static void EmitMemberInitializer(CodeGe ArrayRef ArrayIndexes; if (MemberInit->getNumArrayIndices()) ArrayIndexes = MemberInit->getArrayIndexes(); - ApplyDebugLocation DL(CGF, MemberInit->getMemberLocation()); CGF.EmitInitializerForField(Field, LHS, MemberInit->getInit(), ArrayIndexes); } Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -3393,11 +3393,12 @@ Value *CodeGenFunction::EmitScalarExpr(c assert(E && hasScalarEvaluationKind(E->getType()) && "Invalid scalar expression to emit"); + bool hasDebugInfo = getDebugInfo(); if (isa(E)) disableDebugInfo(); Value *V = ScalarExprEmitter(*this, IgnoreResultAssign) .Visit(const_cast(E)); - if (isa(E)) + if (isa(E) && hasDebugInfo) enableDebugInfo(); return V; } Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -935,8 +935,8 @@ static void emitUsed(CodeGenModule &CGM, UsedArray.resize(List.size()); for (unsigned i = 0, e = List.size(); i != e; ++i) { UsedArray[i] = - llvm::ConstantExpr::getBitCast(cast(&*List[i]), - CGM.Int8PtrTy); + llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( + cast(&*List[i]), CGM.Int8PtrTy); } if (UsedArray.empty()) Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.h Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.h Sat Feb 14 12:18:48 2015 (r278754) @@ -324,7 +324,7 @@ private: /// referenced. These get code generated when the module is done. struct DeferredGlobal { DeferredGlobal(llvm::GlobalValue *GV, GlobalDecl GD) : GV(GV), GD(GD) {} - llvm::AssertingVH GV; + llvm::TrackingVH GV; GlobalDecl GD; }; std::vector DeferredDeclsToEmit; Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Driver/Tools.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -13,6 +13,7 @@ #include "clang/Basic/LangOptions.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Version.h" +#include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" @@ -1538,7 +1539,7 @@ static void AddGoldPlugin(const ToolChai // as gold requires -plugin to come before any -plugin-opt that -Wl might // forward. CmdArgs.push_back("-plugin"); - std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; + std::string Plugin = ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so"; CmdArgs.push_back(Args.MakeArgString(Plugin)); // Try to pass driver level flags relevant to LTO code generation down to Modified: vendor/clang/dist/lib/Parse/ParseExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Parse/ParseExprCXX.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Parse/ParseExprCXX.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -894,11 +894,16 @@ Optional Parser::ParseLambdaIn // to save the necessary state, and restore it later. EnterExpressionEvaluationContext EC(Actions, Sema::PotentiallyEvaluated); - TryConsumeToken(tok::equal); + bool HadEquals = TryConsumeToken(tok::equal); - if (!SkippedInits) + if (!SkippedInits) { + // Warn on constructs that will change meaning when we implement N3922 + if (!HadEquals && Tok.is(tok::l_brace)) { + Diag(Tok, diag::warn_init_capture_direct_list_init) + << FixItHint::CreateInsertion(Tok.getLocation(), "="); + } Init = ParseInitializer(); - else if (Tok.is(tok::l_brace)) { + } else if (Tok.is(tok::l_brace)) { BalancedDelimiterTracker Braces(*this, tok::l_brace); Braces.consumeOpen(); Braces.skipToEnd(); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -8702,6 +8702,14 @@ void Sema::AddInitializerToDecl(Decl *Re CheckVariableDeclarationType(VDecl); if (VDecl->isInvalidDecl()) return; + + // If all looks well, warn if this is a case that will change meaning when + // we implement N3922. + if (DirectInit && !CXXDirectInit && isa(Init)) { + Diag(Init->getLocStart(), + diag::warn_auto_var_direct_list_init) + << FixItHint::CreateInsertion(Init->getLocStart(), "="); + } } // dllimport cannot be used on variable definitions. Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -2500,8 +2500,18 @@ Sema::SpecialMemberOverloadResult *Sema: // will always be a (possibly implicit) declaration to shadow any others. OverloadCandidateSet OCS(RD->getLocation(), OverloadCandidateSet::CSK_Normal); DeclContext::lookup_result R = RD->lookup(Name); - assert(!R.empty() && - "lookup for a constructor or assignment operator was empty"); + + if (R.empty()) { + // We might have no default constructor because we have a lambda's closure + // type, rather than because there's some other declared constructor. + // Every class has a copy/move constructor, copy/move assignment, and + // destructor. + assert(SM == CXXDefaultConstructor && + "lookup for a constructor or assignment operator was empty"); + Result->setMethod(nullptr); + Result->setKind(SpecialMemberOverloadResult::NoMemberOrDeleted); + return Result; + } // Copy the candidates as our processing of them may load new declarations // from an external source and invalidate lookup_result. Modified: vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -370,21 +370,21 @@ void ASTDeclWriter::VisitFunctionDecl(Fu // FunctionDecl's body is handled last at ASTWriterDecl::Visit, // after everything else is written. - Record.push_back(D->getStorageClass()); // FIXME: stable encoding + Record.push_back((int)D->SClass); // FIXME: stable encoding Record.push_back(D->IsInline); - Record.push_back(D->isInlineSpecified()); - Record.push_back(D->isVirtualAsWritten()); - Record.push_back(D->isPure()); - Record.push_back(D->hasInheritedPrototype()); - Record.push_back(D->hasWrittenPrototype()); - Record.push_back(D->isDeletedAsWritten()); - Record.push_back(D->isTrivial()); - Record.push_back(D->isDefaulted()); - Record.push_back(D->isExplicitlyDefaulted()); - Record.push_back(D->hasImplicitReturnZero()); - Record.push_back(D->isConstexpr()); + Record.push_back(D->IsInlineSpecified); + Record.push_back(D->IsVirtualAsWritten); + Record.push_back(D->IsPure); + Record.push_back(D->HasInheritedPrototype); + Record.push_back(D->HasWrittenPrototype); + Record.push_back(D->IsDeleted); + Record.push_back(D->IsTrivial); + Record.push_back(D->IsDefaulted); + Record.push_back(D->IsExplicitlyDefaulted); + Record.push_back(D->HasImplicitReturnZero); + Record.push_back(D->IsConstexpr); Record.push_back(D->HasSkippedBody); - Record.push_back(D->isLateTemplateParsed()); + Record.push_back(D->IsLateTemplateParsed); Record.push_back(D->getLinkageInternal()); Writer.AddSourceLocation(D->getLocEnd(), Record); @@ -1802,7 +1802,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Pure Abv->Add(BitCodeAbbrevOp(0)); // HasInheritedProto Abv->Add(BitCodeAbbrevOp(1)); // HasWrittenProto - Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // DeletedAsWritten + Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Deleted Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Trivial Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Defaulted Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ExplicitlyDefaulted Modified: vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp ============================================================================== --- vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -48,7 +48,7 @@ auto bad_init_2 = [a(1, 2)] {}; // expec auto bad_init_3 = [&a(void_fn())] {}; // expected-error {{cannot form a reference to 'void'}} auto bad_init_4 = [a(void_fn())] {}; // expected-error {{has incomplete type 'void'}} auto bad_init_5 = [a(overload_fn)] {}; // expected-error {{cannot deduce type for lambda capture 'a' from initializer of type ' void pack_1(T...t) { (void)[a(t...)] {}; } // expected-error {{initializer missing for lambda capture 'a'}} template void pack_1<>(); // expected-note {{instantiation of}} @@ -61,7 +61,7 @@ auto a = [a(4), b = 5, &c = static_cast< using T = decltype(c); using T = const int &; }; -auto b = [a{0}] {}; // expected-error {{include }} +auto b = [a{0}] {}; // expected-error {{include }} expected-warning {{will change meaning in a future version of Clang}} struct S { S(); S(S&&); }; template struct remove_reference { typedef T type; }; Added: vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu Sat Feb 14 12:18:48 2015 (r278754) @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device -triple nvptx64-unknown-unknown | FileCheck %s + + +// Make sure we emit the proper addrspacecast for llvm.used. PR22383 exposed an +// issue where we were generating a bitcast instead of an addrspacecast. + +// CHECK: @llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast ([0 x i32] addrspace(1)* @a to i8 addrspace(1)*) to i8*)], section "llvm.metadata" +__attribute__((device)) __attribute__((__used__)) int a[] = {}; Modified: vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -232,3 +232,14 @@ foo::~foo() {} // CHECK6: @_ZN6test113fooD2Ev = alias {{.*}} @_ZN6test113barD2Ev // CHECK6: @_ZN6test113fooD1Ev = alias {{.*}} @_ZN6test113fooD2Ev } + +namespace test12 { +template +struct foo { + ~foo() { delete this; } +}; + +template class foo<1>; +// CHECK6: @_ZN6test123fooILi1EED1Ev = weak_odr alias {{.*}} @_ZN6test123fooILi1EED2Ev +// CHECK6: define weak_odr void @_ZN6test123fooILi1EED2Ev({{.*}}) {{.*}} comdat($_ZN6test123fooILi1EED5Ev) +} Modified: vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -166,6 +166,33 @@ void f13() { F13_IMPL; } +struct f14 { + f14(int); +}; + +// CHECK-LABEL: define +struct f14_use { +// CHECK: call {{.*}}, !dbg [[DBG_F14_CTOR_CALL:![0-9]*]] +#line 1600 + f14 v + = + 1; + f14_use(); +}; + +f14_use::f14_use() = default; + +// CHECK-LABEL: define + +// CHECK-LABEL: define +int f21_a(int = 0); +void f21_b(int = f21_a()); +void f21() { +// CHECK: call {{.*}}f21_b{{.*}}, !dbg [[DBG_F21:![0-9]*]] +#line 2300 + f21_b(); +} + // CHECK: [[DBG_F1]] = !MDLocation(line: 100, // CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200, // CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202, Added: vendor/clang/dist/test/PCH/implicitly-deleted.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/PCH/implicitly-deleted.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -o %t.pch +// RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch +class move_only { move_only(const move_only&) = delete; move_only(move_only&&); }; +struct sb { + move_only il; + sb(); + sb(sb &&); +}; + +template T make(); +template void doit(decltype(T(make()))*) { T(make()); } +template void doit(...) { T(make()); } +template void later() { doit(0); } + +void fn1() { + sb x; + later(); +} Modified: vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp ============================================================================== --- vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -61,7 +61,7 @@ class C { int z; void init_capture() { [n(0)] () mutable -> int { return ++n; }; // expected-warning{{extension}} - [n{0}] { return; }; // expected-error {{}} expected-warning{{extension}} + [n{0}] { return; }; // expected-error {{}} expected-warning{{extension}} expected-warning{{will change meaning in a future version}} [n = 0] { return ++n; }; // expected-error {{captured by copy in a non-mutable}} expected-warning{{extension}} [n = {0}] { return; }; // expected-error {{}} expected-warning{{extension}} [a([&b = z]{})](){}; // expected-warning 2{{extension}} Modified: vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm ============================================================================== --- vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm Sat Feb 14 12:18:48 2015 (r278754) @@ -21,7 +21,7 @@ class C { [foo(bar)] () {}; [foo = bar] () {}; - [foo{bar}] () {}; // expected-error {{}} + [foo{bar}] () {}; // expected-error {{}} expected-warning {{will change meaning}} [foo = {bar}] () {}; // expected-error {{}} [foo(bar) baz] () {}; // expected-error {{called object type 'int' is not a function}} Modified: vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -117,6 +117,7 @@ void argument_deduction() { void auto_deduction() { auto l = {1, 2, 3, 4}; + auto l2 {1, 2, 3, 4}; // expected-warning {{will change meaning in a future version of Clang}} static_assert(same_type>::value, ""); auto bl = {1, 2.0}; // expected-error {{cannot deduce}} Modified: vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -437,3 +437,12 @@ namespace error_in_transform_prototype { f(S()); // expected-note {{requested here}} } } + +namespace PR21857 { + template struct fun : Fn { + fun() = default; + using Fn::operator(); + }; + template fun wrap(Fn fn); + auto x = wrap([](){}); +} From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 12:19:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09D3E72C; Sat, 14 Feb 2015 12:19:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFC349FE; Sat, 14 Feb 2015 12:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECJZkH024056; Sat, 14 Feb 2015 12:19:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECJZI2024055; Sat, 14 Feb 2015 12:19:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141219.t1ECJZI2024055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278755 - vendor/clang/clang-release_360-r229040 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:19:36 -0000 Author: dim Date: Sat Feb 14 12:19:35 2015 New Revision: 278755 URL: https://svnweb.freebsd.org/changeset/base/278755 Log: Tag clang tags/RELEASE_360/rc3 r229040 (effectively, 3.6.0 RC3). Added: vendor/clang/clang-release_360-r229040/ - copied from r278754, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 15:14:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12791239; Sat, 14 Feb 2015 15:14:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1789BB8; Sat, 14 Feb 2015 15:14:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EFEfUR007560; Sat, 14 Feb 2015 15:14:41 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EFEfR6007559; Sat, 14 Feb 2015 15:14:41 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201502141514.t1EFEfR6007559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sat, 14 Feb 2015 15:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278758 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 15:14:42 -0000 Author: tijl Date: Sat Feb 14 15:14:41 2015 New Revision: 278758 URL: https://svnweb.freebsd.org/changeset/base/278758 Log: The ld(1) flag is -Bsymbolic not -Wsymbolic. Modified: head/lib/libc/gen/dlopen.3 Modified: head/lib/libc/gen/dlopen.3 ============================================================================== --- head/lib/libc/gen/dlopen.3 Sat Feb 14 14:13:00 2015 (r278757) +++ head/lib/libc/gen/dlopen.3 Sat Feb 14 15:14:41 2015 (r278758) @@ -32,7 +32,7 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd December 21, 2011 +.Dd February 14, 2015 .Dt DLOPEN 3 .Os .Sh NAME @@ -236,7 +236,7 @@ as follows, in the given order: The referencing object itself (or the object from which the call to .Fn dlsym is made), if that object was linked using the -.Fl Wsymbolic +.Fl Bsymbolic option to .Xr ld 1 . .It From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 15:17:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD0EE3C3 for ; Sat, 14 Feb 2015 15:17:46 +0000 (UTC) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 462A3BD7 for ; Sat, 14 Feb 2015 15:17:46 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id h11so18048610wiw.1 for ; Sat, 14 Feb 2015 07:17:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=fByIv+lLXfVOk77sKYYRxYbOFRT14cV4Sb5K0D82J9A=; b=Kc2goij/Do2wgUhgrZVA6/UNg/OX9Y8QLoU6HPvmQzwjbySFVuoyYpc8FFS/cDsxWY xkN1fUDXB1qfB9yF2NM+g4iLA2kvM3bBMbDAq4GN3TD96Kp5y3X6ROfVbnUJtdgXbgLh IqvOISICuEXLCFJNrsy5cCDlZb6sNG3J5ZCRm3tgaA7sXSBdui56wp6kQ0toOrxvrbPg soiuHE0LI2P13fQIyTDANmxdL1+XZ7bCU1Dxk38oCeyPryAcgDpmWXrw/6w9bCxP/2nA VrD8fsKGk+dVYHDueXdrerkQrAKTfejOSF4ApDKr80aQ4NJ+Jvqh4vOB8YRmK0HD2f6c WD3w== X-Gm-Message-State: ALoCoQl+2eNGpBMztFk0Nhq7TxPM13z9+evaj93pUI2cUI2oyu0w15sNjRJA8IoILuRnrY49tC88 X-Received: by 10.194.192.4 with SMTP id hc4mr30545318wjc.59.1423927058746; Sat, 14 Feb 2015 07:17:38 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id fo15sm11430605wic.19.2015.02.14.07.17.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Feb 2015 07:17:37 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <54DF6709.6030204@freebsd.org> Date: Sat, 14 Feb 2015 15:17:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bryan Drewery , phabric-admin@FreeBSD.org Subject: Re: Phabricator + 'Reviewed by' [was Re: svn commit: r278472 - in head/sys: netinet netinet6] References: <201502091928.t19JSC5P066293@svn.freebsd.org> <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> <54DE8F32.2090500@FreeBSD.org> In-Reply-To: <54DE8F32.2090500@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 15:17:46 -0000 On 13/02/2015 23:56, Bryan Drewery wrote: > On 2/9/2015 3:45 PM, Bjoern A. Zeeb wrote: >>> Commented upon by hiren and sbruno >>> See Phabricator D1777 for more details. >>> >>> Commented upon by hiren and sbruno >>> Reviewed by: adrian, jhb and bz >> I have not reviewed this; as a matter of fact you are aware that I still wanted to do that. >> > Something about Phabricator is not jiving with our commit terminology. > This has happened before as well with other commits. I'm sure everyone > is good-intentioned as well. > > There's not 1 person on D1777 who has 'accepted' it. That is what > warrants a 'Reviewed by' to me. > > It's clear to me, but seems unclear to others. I really think the > reviewer list needs to be split up. Rather than using icons, use > separate lists. Reviewers requested: accepted: commented: changes > requested:. I don't think it needs to be split up, that feels unnecessary, if someone hasn't accepted it then they haven't review it period IMO. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 16:23:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7863B44B; Sat, 14 Feb 2015 16:23:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 628321F1; Sat, 14 Feb 2015 16:23:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EGN5Eg040189; Sat, 14 Feb 2015 16:23:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EGN56A040188; Sat, 14 Feb 2015 16:23:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502141623.t1EGN56A040188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 16:23:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278759 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 16:23:05 -0000 Author: adrian Date: Sat Feb 14 16:23:04 2015 New Revision: 278759 URL: https://svnweb.freebsd.org/changeset/base/278759 Log: Remove the reserved pin 11 from the HAL check. The QCA9565 can have RFKILL on GPIO Pin 11, and thus we need to configure it up correctly or the NIC may not function. I'm not sure why the AR9382 can't use GPIO 8 / GPIO 11 ; it's likely hooked up to some external LNA or filter. The real solution is to make it only block pin 8 / pin 11 for AR9382, but the AR9382 probes like an AR9380. Sigh. Submitted by: Anthony Jenkins Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Sat Feb 14 15:14:41 2015 (r278758) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Sat Feb 14 16:23:04 2015 (r278759) @@ -162,7 +162,6 @@ ar9300_gpio_cfg_output( HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); if ((gpio == AR9382_GPIO_PIN_8_RESERVED) || - (gpio == AR9382_GPIO_PIN_11_RESERVED) || (gpio == AR9382_GPIO_9_INPUT_ONLY)) { return AH_FALSE; @@ -348,7 +347,6 @@ ar9300_gpio_cfg_input(struct ath_hal *ah HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); if ((gpio == AR9382_GPIO_PIN_8_RESERVED) || - (gpio == AR9382_GPIO_PIN_11_RESERVED) || (gpio > AR9382_MAX_GPIO_INPUT_PIN_NUM)) { return AH_FALSE; @@ -378,7 +376,6 @@ ar9300_gpio_set(struct ath_hal *ah, u_in { HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); if ((gpio == AR9382_GPIO_PIN_8_RESERVED) || - (gpio == AR9382_GPIO_PIN_11_RESERVED) || (gpio == AR9382_GPIO_9_INPUT_ONLY)) { return AH_FALSE; @@ -397,8 +394,7 @@ ar9300_gpio_get(struct ath_hal *ah, u_in { u_int32_t gpio_in; HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); - if ((gpio == AR9382_GPIO_PIN_8_RESERVED) || - (gpio == AR9382_GPIO_PIN_11_RESERVED)) + if ((gpio == AR9382_GPIO_PIN_8_RESERVED)) { return 0xffffffff; } @@ -453,7 +449,6 @@ ar9300_gpio_set_intr(struct ath_hal *ah, HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); if ((gpio == AR9382_GPIO_PIN_8_RESERVED) || - (gpio == AR9382_GPIO_PIN_11_RESERVED) || (gpio > AR9382_MAX_GPIO_INPUT_PIN_NUM)) { return; @@ -549,8 +544,7 @@ ar9300_gpio_get_mask(struct ath_hal *ah) if (AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_AR9380_PCIE) { mask = (1 << AR9382_MAX_GPIO_PIN_NUM) - 1; - mask &= ~(1 << AR9382_GPIO_PIN_8_RESERVED | - 1 << AR9382_GPIO_PIN_11_RESERVED); + mask &= ~(1 << AR9382_GPIO_PIN_8_RESERVED); } return mask; } @@ -562,8 +556,7 @@ ar9300_gpio_set_mask(struct ath_hal *ah, if (AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_AR9380_PCIE) { invalid = ~((1 << AR9382_MAX_GPIO_PIN_NUM) - 1); - invalid |= 1 << AR9382_GPIO_PIN_8_RESERVED | - 1 << AR9382_GPIO_PIN_11_RESERVED; + invalid |= 1 << AR9382_GPIO_PIN_8_RESERVED; } if (mask & invalid) { ath_hal_printf(ah, "%s: invalid GPIO mask 0x%x\n", __func__, mask); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 17:02:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39837563; Sat, 14 Feb 2015 17:02:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ACBFA74; Sat, 14 Feb 2015 17:02:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EH2pl6059260; Sat, 14 Feb 2015 17:02:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EH2pVa059259; Sat, 14 Feb 2015 17:02:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502141702.t1EH2pVa059259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 14 Feb 2015 17:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278760 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 17:02:52 -0000 Author: jhb Date: Sat Feb 14 17:02:51 2015 New Revision: 278760 URL: https://svnweb.freebsd.org/changeset/base/278760 Log: Add two new counters for vnode life cycle events: - vfs.recycles counts the number of vnodes forcefully recycled to avoid exceeding kern.maxvnodes. - vfs.vnodes_created counts the number of vnodes created by successful calls to getnewvnode(). Differential Revision: https://reviews.freebsd.org/D1671 Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Feb 14 16:23:04 2015 (r278759) +++ head/sys/kern/vfs_subr.c Sat Feb 14 17:02:51 2015 (r278760) @@ -122,6 +122,10 @@ static unsigned long numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); +static u_long vnodes_created; +SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + 0, "Number of vnodes created by getnewvnode"); + /* * Conversion tables for conversion from vnode types to inode formats * and back. @@ -156,6 +160,10 @@ static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode"); +static u_long recycles_count; +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, + "Number of vnodes recycled to avoid exceding kern.maxvnodes"); + /* * Various variables used for debugging the new implementation of * reassignbuf(). @@ -788,6 +796,7 @@ vlrureclaim(struct mount *mp) } KASSERT((vp->v_iflag & VI_DOOMED) == 0, ("VI_DOOMED unexpectedly detected in vlrureclaim()")); + atomic_add_long(&recycles_count, 1); vgonel(vp); VOP_UNLOCK(vp, 0); vdropl(vp); @@ -988,8 +997,10 @@ vtryrecycle(struct vnode *vp) __func__, vp); return (EBUSY); } - if ((vp->v_iflag & VI_DOOMED) == 0) + if ((vp->v_iflag & VI_DOOMED) == 0) { + atomic_add_long(&recycles_count, 1); vgonel(vp); + } VOP_UNLOCK(vp, LK_INTERLOCK); vn_finished_write(vnmp); return (0); @@ -1093,6 +1104,7 @@ getnewvnode(const char *tag, struct moun atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: + atomic_add_long(&vnodes_created, 1); vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); /* * Setup locks. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 17:12:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A689EB33; Sat, 14 Feb 2015 17:12:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91A45B5D; Sat, 14 Feb 2015 17:12:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EHCWLD064053; Sat, 14 Feb 2015 17:12:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EHCWn9064051; Sat, 14 Feb 2015 17:12:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502141712.t1EHCWn9064051@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 14 Feb 2015 17:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278761 - in head: sys/kern usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 17:12:32 -0000 Author: jhb Date: Sat Feb 14 17:12:31 2015 New Revision: 278761 URL: https://svnweb.freebsd.org/changeset/base/278761 Log: Include OBJT_PHYS VM objects in ELF core dumps. In particular this includes the shared page allowing debuggers to use the signal trampoline code to identify signal frames in core dumps. Differential Revision: https://reviews.freebsd.org/D1828 Reviewed by: alc, kib MFC after: 1 week Modified: head/sys/kern/imgact_elf.c head/usr.bin/gcore/elfcore.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sat Feb 14 17:02:51 2015 (r278760) +++ head/sys/kern/imgact_elf.c Sat Feb 14 17:12:31 2015 (r278761) @@ -1401,7 +1401,8 @@ each_writable_segment(td, func, closure) object = backing_object; } ignore_entry = object->type != OBJT_DEFAULT && - object->type != OBJT_SWAP && object->type != OBJT_VNODE; + object->type != OBJT_SWAP && object->type != OBJT_VNODE && + object->type != OBJT_PHYS; VM_OBJECT_RUNLOCK(object); if (ignore_entry) continue; Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Sat Feb 14 17:02:51 2015 (r278760) +++ head/usr.bin/gcore/elfcore.c Sat Feb 14 17:12:31 2015 (r278761) @@ -511,7 +511,8 @@ readmap(pid_t pid) ((pflags & PFLAGS_FULL) == 0 && kve->kve_type != KVME_TYPE_DEFAULT && kve->kve_type != KVME_TYPE_VNODE && - kve->kve_type != KVME_TYPE_SWAP)) + kve->kve_type != KVME_TYPE_SWAP && + kve->kve_type != KVME_TYPE_PHYS)) continue; ent = calloc(1, sizeof(*ent)); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 17:43:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB0FEDC5; Sat, 14 Feb 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B614DE86; Sat, 14 Feb 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EHht3T079095; Sat, 14 Feb 2015 17:43:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EHhtOL079094; Sat, 14 Feb 2015 17:43:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502141743.t1EHhtOL079094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 17:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278762 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 17:43:55 -0000 Author: adrian Date: Sat Feb 14 17:43:54 2015 New Revision: 278762 URL: https://svnweb.freebsd.org/changeset/base/278762 Log: Quieten a clang warning. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Sat Feb 14 17:12:31 2015 (r278761) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c Sat Feb 14 17:43:54 2015 (r278762) @@ -394,7 +394,7 @@ ar9300_gpio_get(struct ath_hal *ah, u_in { u_int32_t gpio_in; HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); - if ((gpio == AR9382_GPIO_PIN_8_RESERVED)) + if (gpio == AR9382_GPIO_PIN_8_RESERVED) { return 0xffffffff; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 17:44:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30FBEEFB; Sat, 14 Feb 2015 17:44:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BC53E8A; Sat, 14 Feb 2015 17:44:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EHiOSb079240; Sat, 14 Feb 2015 17:44:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EHiOu3079239; Sat, 14 Feb 2015 17:44:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502141744.t1EHiOu3079239@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 17:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278763 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 17:44:25 -0000 Author: adrian Date: Sat Feb 14 17:44:24 2015 New Revision: 278763 URL: https://svnweb.freebsd.org/changeset/base/278763 Log: Comment out a double declaration of this particular function name. It trips up gcc builds. Pointy-hat-from: jenkins, kib Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 14 17:43:54 2015 (r278762) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Sat Feb 14 17:44:24 2015 (r278763) @@ -1239,7 +1239,9 @@ extern HAL_BOOL ar9300_set_mac_address( extern void ar9300_get_bss_id_mask(struct ath_hal *ah, u_int8_t *mac); extern HAL_BOOL ar9300_set_bss_id_mask(struct ath_hal *, const u_int8_t *); extern HAL_STATUS ar9300_select_ant_config(struct ath_hal *ah, u_int32_t cfg); +#if 0 extern u_int32_t ar9300_ant_ctrl_common_get(struct ath_hal *ah, HAL_BOOL is_2ghz); +#endif extern HAL_BOOL ar9300_ant_swcom_sel(struct ath_hal *ah, u_int8_t ops, u_int32_t *common_tbl1, u_int32_t *common_tbl2); extern HAL_BOOL ar9300_set_regulatory_domain(struct ath_hal *ah, From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 17:45:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7FFC1BE; Sat, 14 Feb 2015 17:45:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1F95EA5; Sat, 14 Feb 2015 17:45:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EHjsYK079626; Sat, 14 Feb 2015 17:45:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EHjs3a079624; Sat, 14 Feb 2015 17:45:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502141745.t1EHjs3a079624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 17:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278764 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 17:45:55 -0000 Author: adrian Date: Sat Feb 14 17:45:53 2015 New Revision: 278764 URL: https://svnweb.freebsd.org/changeset/base/278764 Log: More fixes to wpi(4), again not by me! Woo! - Use IEEE80211_F_DATAPAD; - (c->ic_flags & IEEE80211_CHAN_PASSIVE) -> IEEE80211_IS_CHAN_PASSIVE(c); - Convert ackfailcnt to int (there is dereference to *(int *) in ieee80211_ratectl_tx_complete()); - Fix & move cleanup to the end in wpi_rx_done(); - Add missed lock in wpi_update_beacon(); - Try to fix powersave. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sat Feb 14 17:44:24 2015 (r278763) +++ head/sys/dev/wpi/if_wpi.c Sat Feb 14 17:45:53 2015 (r278764) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); * * A similar thing happens with the tx rings. The difference is the firmware * stop processing buffers once the queue is full and until confirmation - * of a successful transmition (tx_intr) has occurred. + * of a successful transmition (tx_done) has occurred. * * The command ring operates in the same manner as the tx queues. * @@ -447,6 +447,8 @@ wpi_attach(device_t dev) ic->ic_cryptocaps = IEEE80211_CRYPTO_AES_CCM; + ic->ic_flags |= IEEE80211_F_DATAPAD; + /* * Read in the eeprom and also setup the channels for * net80211. We don't set the rates as net80211 does this for us @@ -1378,8 +1380,7 @@ wpi_read_eeprom_band(struct wpi_softc *s "adding chan %d (%dMHz) flags=0x%x maxpwr=%d passive=%d," " offset %d\n", chan, c->ic_freq, channels[i].flags, sc->maxpwr[chan], - (c->ic_flags & IEEE80211_CHAN_PASSIVE) != 0, - ic->ic_nchans); + IEEE80211_IS_CHAN_PASSIVE(c), ic->ic_nchans); } } @@ -1695,8 +1696,7 @@ wpi_rx_done(struct wpi_softc *sc, struct if (stat->len > WPI_STAT_MAXLEN) { device_printf(sc->sc_dev, "invalid RX statistic header\n"); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; + goto fail1; } bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); @@ -1714,23 +1714,20 @@ wpi_rx_done(struct wpi_softc *sc, struct if ((flags & WPI_RX_NOERROR) != WPI_RX_NOERROR) { DPRINTF(sc, WPI_DEBUG_RECV, "%s: RX flags error %x\n", __func__, flags); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; + goto fail1; } /* Discard frames that are too short. */ if (len < sizeof (*wh)) { DPRINTF(sc, WPI_DEBUG_RECV, "%s: frame too short: %d\n", __func__, len); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; + goto fail1; } m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (m1 == NULL) { DPRINTF(sc, WPI_DEBUG_ANY, "%s: no mbuf to restock ring\n", __func__); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; + goto fail1; } bus_dmamap_unload(ring->data_dmat, data->map); @@ -1752,8 +1749,7 @@ wpi_rx_done(struct wpi_softc *sc, struct ring->desc[ring->cur] = htole32(paddr); bus_dmamap_sync(ring->data_dmat, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - return; + goto fail1; } m = data->m; @@ -1777,18 +1773,14 @@ wpi_rx_done(struct wpi_softc *sc, struct if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) && !IEEE80211_IS_MULTICAST(wh->i_addr1) && cip != NULL && cip->ic_cipher == IEEE80211_CIPHER_AES_CCM) { - if ((flags & WPI_RX_CIPHER_MASK) != WPI_RX_CIPHER_CCMP) { - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - m_freem(m); - return; - } + if ((flags & WPI_RX_CIPHER_MASK) != WPI_RX_CIPHER_CCMP) + goto fail2; + /* Check whether decryption was successful or not. */ if ((flags & WPI_RX_DECRYPT_MASK) != WPI_RX_DECRYPT_OK) { DPRINTF(sc, WPI_DEBUG_RECV, "CCMP decryption failed 0x%x\n", flags); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - m_freem(m); - return; + goto fail2; } m->m_flags |= M_WEP; } @@ -1817,6 +1809,13 @@ wpi_rx_done(struct wpi_softc *sc, struct (void)ieee80211_input_all(ic, m, stat->rssi, -WPI_RSSI_OFFSET); WPI_LOCK(sc); + + return; + +fail2: ieee80211_free_node(ni); + m_freem(m); + +fail1: if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } static void @@ -1836,6 +1835,7 @@ wpi_tx_done(struct wpi_softc *sc, struct struct mbuf *m; struct ieee80211_node *ni; struct ieee80211vap *vap; + int ackfailcnt = stat->ackfailcnt; int status = le32toh(stat->status); KASSERT(data->ni != NULL, ("no node")); @@ -1844,7 +1844,7 @@ wpi_tx_done(struct wpi_softc *sc, struct DPRINTF(sc, WPI_DEBUG_XMIT, "%s: " "qid %d idx %d retries %d btkillcnt %d rate %x duration %d " - "status %x\n", __func__, desc->qid, desc->idx, stat->ackfailcnt, + "status %x\n", __func__, desc->qid, desc->idx, ackfailcnt, stat->btkillcnt, stat->rate, le32toh(stat->duration), status); /* Unmap and free mbuf. */ @@ -1861,11 +1861,11 @@ wpi_tx_done(struct wpi_softc *sc, struct if ((status & 0xff) != 1) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &stat->ackfailcnt, NULL); + IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL); } else { if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &stat->ackfailcnt, NULL); + IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); } ieee80211_tx_complete(ni, m, (status & 0xff) != 1); @@ -1931,10 +1931,7 @@ wpi_notif_intr(struct wpi_softc *sc) hw = le32toh(sc->shared->next); hw = (hw == 0) ? WPI_RX_RING_COUNT - 1 : hw - 1; - if (sc->rxq.cur == hw) - return; - - do { + while (sc->rxq.cur != hw) { sc->rxq.cur = (sc->rxq.cur + 1) % WPI_RX_RING_COUNT; struct wpi_rx_data *data = &sc->rxq.data[sc->rxq.cur]; @@ -2020,10 +2017,10 @@ wpi_notif_intr(struct wpi_softc *sc) BUS_DMASYNC_POSTREAD); uint32_t *status = (uint32_t *)(desc + 1); -#ifdef WPI_DEBUG + DPRINTF(sc, WPI_DEBUG_STATE, "state changed to %x\n", le32toh(*status)); -#endif + if (le32toh(*status) & 1) { ieee80211_runtask(ic, &sc->sc_radiooff_task); return; @@ -2061,7 +2058,7 @@ wpi_notif_intr(struct wpi_softc *sc) break; } } - } while (sc->rxq.cur != hw); + } /* Tell the firmware what we have processed. */ wpi_update_rx_ring(sc); @@ -2081,15 +2078,15 @@ wpi_wakeup_intr(struct wpi_softc *sc) /* Wakeup RX and TX rings. */ if (sc->rxq.update) { - wpi_update_rx_ring(sc); sc->rxq.update = 0; + wpi_update_rx_ring(sc); } for (qid = 0; qid < WPI_NTXQUEUES; qid++) { struct wpi_tx_ring *ring = &sc->txq[qid]; if (ring->update) { - wpi_update_tx_ring(sc, ring); ring->update = 0; + wpi_update_tx_ring(sc, ring); } } @@ -2227,6 +2224,8 @@ done: static int wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) { + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; struct ieee80211_frame *wh; struct wpi_tx_cmd *cmd; struct wpi_tx_data *data; @@ -2234,23 +2233,16 @@ wpi_cmd2(struct wpi_softc *sc, struct wp struct wpi_tx_ring *ring; struct mbuf *m1; bus_dma_segment_t *seg, segs[WPI_MAX_SCATTER]; - u_int hdrlen; - int error, i, nsegs, pad, totlen; + int error, i, hdrspace, nsegs, totlen; WPI_LOCK_ASSERT(sc); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); wh = mtod(buf->m, struct ieee80211_frame *); - hdrlen = ieee80211_anyhdrsize(wh); + hdrspace = ieee80211_anyhdrspace(ic, wh); totlen = buf->m->m_pkthdr.len; - if (hdrlen & 3) { - /* First segment length must be a multiple of 4. */ - pad = 4 - (hdrlen & 3); - } else - pad = 0; - ring = &sc->txq[buf->ac]; desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; @@ -2265,8 +2257,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp memcpy(cmd->data, buf->data, buf->size); /* Save and trim IEEE802.11 header. */ - memcpy((uint8_t *)(cmd->data + buf->size), wh, hdrlen); - m_adj(buf->m, hdrlen); + memcpy((uint8_t *)(cmd->data + buf->size), wh, hdrspace); + m_adj(buf->m, hdrspace); error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, buf->m, segs, &nsegs, BUS_DMA_NOWAIT); @@ -2304,10 +2296,10 @@ wpi_cmd2(struct wpi_softc *sc, struct wp __func__, ring->qid, ring->cur, totlen, nsegs); /* Fill TX descriptor. */ - desc->nsegs = WPI_PAD32(totlen + pad) << 4 | (1 + nsegs); + desc->nsegs = WPI_PAD32(totlen) << 4 | (1 + nsegs); /* First DMA segment is used by the TX command. */ desc->segs[0].addr = htole32(data->cmd_paddr); - desc->segs[0].len = htole32(4 + buf->size + hdrlen + pad); + desc->segs[0].len = htole32(4 + buf->size + hdrspace); /* Other DMA segments are for data payload. */ seg = &segs[0]; for (i = 1; i <= nsegs; i++) { @@ -2353,9 +2345,10 @@ wpi_tx_data(struct wpi_softc *sc, struct uint32_t flags; uint16_t qos; uint8_t tid, type; - int ac, error, rate, ismcast, totlen; + int ac, error, rate, ismcast, hdrlen, totlen; wh = mtod(m, struct ieee80211_frame *); + hdrlen = ieee80211_anyhdrsize(wh); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); @@ -2399,12 +2392,12 @@ wpi_tx_data(struct wpi_softc *sc, struct /* 802.11 header may have moved. */ wh = mtod(m, struct ieee80211_frame *); } - totlen = m->m_pkthdr.len; + totlen = m->m_pkthdr.len - (hdrlen & 3); if (ieee80211_radiotap_active_vap(vap)) { struct wpi_tx_radiotap_header *tap = &sc->sc_txtap; - tap->wt_flags = 0; + tap->wt_flags = IEEE80211_RADIOTAP_F_DATAPAD; tap->wt_rate = rate; if (k != NULL) tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP; @@ -2420,6 +2413,9 @@ wpi_tx_data(struct wpi_softc *sc, struct flags |= WPI_TX_NEED_ACK; } + if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) + flags |= WPI_TX_MORE_FRAG; /* Cannot happen yet. */ + /* Check if frame must be protected using RTS/CTS or CTS-to-self. */ if (!ismcast) { /* NB: Group frames are sent using CCK in 802.11b/g. */ @@ -2518,11 +2514,12 @@ wpi_tx_data_raw(struct wpi_softc *sc, st struct wpi_buf tx_data; uint32_t flags; uint8_t type; - int ac, rate, totlen; + int ac, rate, hdrlen, totlen; wh = mtod(m, struct ieee80211_frame *); + hdrlen = ieee80211_anyhdrsize(wh); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - totlen = m->m_pkthdr.len; + totlen = m->m_pkthdr.len - (hdrlen & 3); ac = params->ibp_pri & 3; @@ -2544,6 +2541,8 @@ wpi_tx_data_raw(struct wpi_softc *sc, st tap->wt_flags = 0; tap->wt_rate = rate; + if (params->ibp_flags & IEEE80211_BPF_DATAPAD) + tap->wt_flags |= IEEE80211_RADIOTAP_F_DATAPAD; ieee80211_radiotap_tx(vap, m); } @@ -3434,31 +3433,28 @@ wpi_config(struct wpi_softc *sc) if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan)) sc->rxon.flags |= htole32(WPI_RXON_AUTO | WPI_RXON_24GHZ); + sc->rxon.filter = WPI_FILTER_MULTICAST; switch (ic->ic_opmode) { case IEEE80211_M_STA: sc->rxon.mode = WPI_MODE_STA; - sc->rxon.filter = htole32(WPI_FILTER_MULTICAST); break; case IEEE80211_M_IBSS: sc->rxon.mode = WPI_MODE_IBSS; - sc->rxon.filter = htole32(WPI_FILTER_BEACON | - WPI_FILTER_MULTICAST); + sc->rxon.filter |= WPI_FILTER_BEACON; break; /* XXX workaround for passive channels selection */ case IEEE80211_M_AHDEMO: - sc->rxon.filter = htole32(WPI_FILTER_MULTICAST); - /* FALLTHROUGH */ case IEEE80211_M_HOSTAP: sc->rxon.mode = WPI_MODE_HOSTAP; break; case IEEE80211_M_MONITOR: sc->rxon.mode = WPI_MODE_MONITOR; - sc->rxon.filter = htole32(WPI_FILTER_MULTICAST); break; default: device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode); return EINVAL; } + sc->rxon.filter = htole32(sc->rxon.filter); wpi_set_promisc(sc); sc->rxon.cck_mask = 0x0f; /* not yet negotiated */ sc->rxon.ofdm_mask = 0xff; /* not yet negotiated */ @@ -3677,7 +3673,7 @@ wpi_scan(struct wpi_softc *sc, struct ie } else hdr->crc_threshold = WPI_SCAN_CRC_TH_NEVER; - if (!(c->ic_flags & IEEE80211_CHAN_PASSIVE)) + if (!IEEE80211_IS_CHAN_PASSIVE(c)) chan->flags |= WPI_CHAN_ACTIVE; /* @@ -3702,7 +3698,7 @@ wpi_scan(struct wpi_softc *sc, struct ie chan->rf_gain = 0x28; DPRINTF(sc, WPI_DEBUG_SCAN, "Scanning %u Passive: %d\n", - chan->chan, (c->ic_flags & IEEE80211_CHAN_PASSIVE) ? 1 : 0); + chan->chan, IEEE80211_IS_CHAN_PASSIVE(c)); hdr->nchan++; chan++; @@ -3838,11 +3834,13 @@ wpi_update_beacon(struct ieee80211vap *v struct wpi_softc *sc = ifp->if_softc; int error; + WPI_LOCK(sc); if ((error = wpi_setup_beacon(sc, ni)) != 0) { device_printf(sc->sc_dev, "%s: could not update beacon frame, error %d", __func__, error); } + WPI_UNLOCK(sc); } static int @@ -3939,6 +3937,8 @@ wpi_run(struct wpi_softc *sc, struct iee /* Enable power-saving mode if requested by user. */ if (vap->iv_flags & IEEE80211_F_PMGTON) (void)wpi_set_pslevel(sc, 0, 3, 1); + else + (void)wpi_set_pslevel(sc, 0, 0, 1); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -4384,6 +4384,8 @@ wpi_apm_init(struct wpi_softc *sc) DELAY(20); /* Disable L1-Active. */ wpi_prph_setbits(sc, WPI_APMG_PCI_STT, WPI_APMG_PCI_STT_L1A_DIS); + /* ??? */ + wpi_prph_clrbits(sc, WPI_APMG_PS, 0x00000E00); wpi_nic_unlock(sc); return 0; Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sat Feb 14 17:44:24 2015 (r278763) +++ head/sys/dev/wpi/if_wpireg.h Sat Feb 14 17:45:53 2015 (r278764) @@ -470,6 +470,7 @@ struct wpi_cmd_data { #define WPI_TX_FULL_TXOP (1 << 7) #define WPI_TX_BT_DISABLE (1 << 12) /* bluetooth coexistence */ #define WPI_TX_AUTO_SEQ (1 << 13) +#define WPI_TX_MORE_FRAG (1 << 14) #define WPI_TX_INSERT_TSTAMP (1 << 16) uint8_t plcp; @@ -964,11 +965,6 @@ static const char * const wpi_fw_errmsg[ "FATAL_ERROR" }; -/* XXX description for some error codes (error data). */ -/* 0x00000074 - wrong totlen field */ -/* 0x000003B3 - powersave error */ -/* 0x00000447 - wrong channel selected */ - #define WPI_READ(sc, reg) \ bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg)) From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:14:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0668C05; Sat, 14 Feb 2015 18:14:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E151F1; Sat, 14 Feb 2015 18:14:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIEkeF094301; Sat, 14 Feb 2015 18:14:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIEkIA094300; Sat, 14 Feb 2015 18:14:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201502141814.t1EIEkIA094300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 14 Feb 2015 18:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278765 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:14:46 -0000 Author: adrian Date: Sat Feb 14 18:14:45 2015 New Revision: 278765 URL: https://svnweb.freebsd.org/changeset/base/278765 Log: Move the lock destruction/creation to earlier in the process - if interrupts are enabled and the NIC is awake (think: loading a module) then there's a not-quite-zero window where we'll get an interrupt for the device before the attach method is called to finish setting up the hardware. Since I grab locks in ath_intr() to check various things, the locks need to be ready much earlier. Modified: head/sys/dev/ath/if_ath_pci.c Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Sat Feb 14 17:45:53 2015 (r278764) +++ head/sys/dev/ath/if_ath_pci.c Sat Feb 14 18:14:45 2015 (r278765) @@ -279,6 +279,13 @@ ath_pci_attach(device_t dev) */ sc->sc_invalid = 1; + ATH_LOCK_INIT(sc); + ATH_PCU_LOCK_INIT(sc); + ATH_RX_LOCK_INIT(sc); + ATH_TX_LOCK_INIT(sc); + ATH_TX_IC_LOCK_INIT(sc); + ATH_TXSTATUS_LOCK_INIT(sc); + /* * Arrange interrupt line. */ @@ -329,7 +336,7 @@ ath_pci_attach(device_t dev) if (fw == NULL) { device_printf(dev, "%s: couldn't find firmware\n", __func__); - goto bad3; + goto bad4; } device_printf(dev, "%s: EEPROM firmware @ %p\n", @@ -339,30 +346,20 @@ ath_pci_attach(device_t dev) if (! sc->sc_eepromdata) { device_printf(dev, "%s: can't malloc eepromdata\n", __func__); - goto bad3; + goto bad4; } memcpy(sc->sc_eepromdata, fw->data, fw->datasize); firmware_put(fw, 0); } #endif /* ATH_EEPROM_FIRMWARE */ - ATH_LOCK_INIT(sc); - ATH_PCU_LOCK_INIT(sc); - ATH_RX_LOCK_INIT(sc); - ATH_TX_LOCK_INIT(sc); - ATH_TX_IC_LOCK_INIT(sc); - ATH_TXSTATUS_LOCK_INIT(sc); - error = ath_attach(pci_get_device(dev), sc); if (error == 0) /* success */ return 0; - ATH_TXSTATUS_LOCK_DESTROY(sc); - ATH_PCU_LOCK_DESTROY(sc); - ATH_RX_LOCK_DESTROY(sc); - ATH_TX_IC_LOCK_DESTROY(sc); - ATH_TX_LOCK_DESTROY(sc); - ATH_LOCK_DESTROY(sc); +#ifdef ATH_EEPROM_FIRMWARE +bad4: +#endif bus_dma_tag_destroy(sc->sc_dmat); bad3: bus_teardown_intr(dev, psc->sc_irq, psc->sc_ih); @@ -370,6 +367,14 @@ bad2: bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq); bad1: bus_release_resource(dev, SYS_RES_MEMORY, BS_BAR, psc->sc_sr); + + ATH_TXSTATUS_LOCK_DESTROY(sc); + ATH_PCU_LOCK_DESTROY(sc); + ATH_RX_LOCK_DESTROY(sc); + ATH_TX_IC_LOCK_DESTROY(sc); + ATH_TX_LOCK_DESTROY(sc); + ATH_LOCK_DESTROY(sc); + bad: return (error); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:15:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98032D97; Sat, 14 Feb 2015 18:15:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83FDF1FB; Sat, 14 Feb 2015 18:15:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIFFeF094458; Sat, 14 Feb 2015 18:15:15 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIFFqk094457; Sat, 14 Feb 2015 18:15:15 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201502141815.t1EIFFqk094457@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 14 Feb 2015 18:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278766 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:15:15 -0000 Author: hrs Date: Sat Feb 14 18:15:14 2015 New Revision: 278766 URL: https://svnweb.freebsd.org/changeset/base/278766 Log: Fix a panic when tearing down a vnet on a VIMAGE-enabled kernel. There was a race that bridge_ifdetach() could be called via ifnet_departure event handler after vnet_bridge_uninit(). PR: 195859 Reported by: Danilo Egea Gondolfo Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Feb 14 18:14:45 2015 (r278765) +++ head/sys/net/if_bridge.c Sat Feb 14 18:15:14 2015 (r278766) @@ -228,7 +228,7 @@ struct bridge_softc { static VNET_DEFINE(struct mtx, bridge_list_mtx); #define V_bridge_list_mtx VNET(bridge_list_mtx) -eventhandler_tag bridge_detach_cookie = NULL; +static eventhandler_tag bridge_detach_cookie; int bridge_rtable_prune_period = BRIDGE_RTABLE_PRUNE_PERIOD; @@ -538,6 +538,7 @@ vnet_bridge_uninit(const void *unused __ { if_clone_detach(V_bridge_cloner); + V_bridge_cloner = NULL; BRIDGE_LIST_LOCK_DESTROY(); } VNET_SYSUNINIT(vnet_bridge_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, @@ -1797,7 +1798,13 @@ bridge_ifdetach(void *arg __unused, stru if (ifp->if_flags & IFF_RENAMING) return; - + if (V_bridge_cloner == NULL) { + /* + * This detach handler can be called after + * vnet_bridge_uninit(). Just return in that case. + */ + return; + } /* Check if the interface is a bridge member */ if (sc != NULL) { BRIDGE_LOCK(sc); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:15:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57F13E78; Sat, 14 Feb 2015 18:15:18 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 828821FD; Sat, 14 Feb 2015 18:15:16 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1EIF9Vl038685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Feb 2015 21:15:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1EIF8sR038684; Sat, 14 Feb 2015 21:15:08 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 14 Feb 2015 21:15:08 +0300 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r278737 - head/usr.sbin/flowctl Message-ID: <20150214181508.GL15484@FreeBSD.org> References: <201502132357.t1DNvKda075915@svn.freebsd.org> <20150214193210.N945@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150214193210.N945@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:15:18 -0000 Bruce, On Sat, Feb 14, 2015 at 08:46:58PM +1100, Bruce Evans wrote: B> Using VLAs and also the C99 feature of declarations anwhere, and extensions B> like __aligned(), we can almost implement a full alloca() using the fixed B> version of this change: B> B> /* B> * XXX need extended statement-expression so that __buf doesn't go out B> * of scope after the right brace. B> */ B> #define my_alloca(n) __extension__ ({ B> /* XXX need unique name. */ \ B> char __buf[__roundup2((n), MUMBLE)] __aligned(MUMBLE); \ B> \ B> (void *)__buf; \ B> }) I like this idea. But would this exact code work? The life of __buf is limited by the code block, and we exit the block immediately. Wouldn't the allocation be overwritten if we enter any function or block later? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:18:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 574211D3; Sat, 14 Feb 2015 18:18:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D04BF234; Sat, 14 Feb 2015 18:18:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1EII3Ew038710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Feb 2015 21:18:03 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1EII34o038709; Sat, 14 Feb 2015 21:18:03 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 14 Feb 2015 21:18:03 +0300 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r278760 - head/sys/kern Message-ID: <20150214181803.GM15484@FreeBSD.org> References: <201502141702.t1EH2pVa059259@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502141702.t1EH2pVa059259@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:18:06 -0000 On Sat, Feb 14, 2015 at 05:02:51PM +0000, John Baldwin wrote: J> Author: jhb J> Date: Sat Feb 14 17:02:51 2015 J> New Revision: 278760 J> URL: https://svnweb.freebsd.org/changeset/base/278760 J> J> Log: J> Add two new counters for vnode life cycle events: J> - vfs.recycles counts the number of vnodes forcefully recycled to avoid J> exceeding kern.maxvnodes. J> - vfs.vnodes_created counts the number of vnodes created by successful J> calls to getnewvnode(). J> J> Differential Revision: https://reviews.freebsd.org/D1671 J> Reviewed by: kib J> MFC after: 1 week Why don't use counter(9) for that? Would avoid atomics. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:21:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4CF9433; Sat, 14 Feb 2015 18:21:15 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67AD525C; Sat, 14 Feb 2015 18:21:15 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id x12so12515853wgg.11; Sat, 14 Feb 2015 10:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5iV2LmV3M+FshKX3yaf633P+k0kW2S2x+gcjoamBjmI=; b=UFpQCcru7Kyh/VrM20xJzGUzJppW0T3MB2VqXQAnqPBGcW0ZdqwvxS+NvRGcF0nxBn aRReCIpl975jJkFvGapu5fCTEfTzUbBfgV96tcBh23ja34IE7Lr5JS1vXBgKN9+/xJcl yTGYpgYWKiLvYYmLpt976MyooNxALog2IUZcmOjNfszQ47wQbS1qBzUMjboj3SQQax0K fkoAhisu0sR+H3QdQbkqSI6X0KpFhTYSK7+hwldRilK0QjkBondQnXLL3q4IqCST+e1Q 92X1t0jyPpsks8Ydmv/wqOeeHB5oCVNNJdokWmhVFrxeFdg+yP19UbwPFXbaKM9t7lA1 AAtA== X-Received: by 10.194.110.69 with SMTP id hy5mr32705546wjb.121.1423938073785; Sat, 14 Feb 2015 10:21:13 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id fa3sm7972159wib.17.2015.02.14.10.21.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 14 Feb 2015 10:21:12 -0800 (PST) Date: Sat, 14 Feb 2015 19:21:10 +0100 From: Mateusz Guzik To: John Baldwin Subject: Re: svn commit: r278760 - head/sys/kern Message-ID: <20150214182109.GC18597@dft-labs.eu> References: <201502141702.t1EH2pVa059259@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201502141702.t1EH2pVa059259@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:21:15 -0000 On Sat, Feb 14, 2015 at 05:02:51PM +0000, John Baldwin wrote: > +SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, > + 0, "Number of vnodes created by getnewvnode"); > + [..] > +static u_long recycles_count; > +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, > + "Number of vnodes recycled to avoid exceding kern.maxvnodes"); > + CTLFLAG_MPSAFE? -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:22:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED467573; Sat, 14 Feb 2015 18:22:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D92F731E; Sat, 14 Feb 2015 18:22:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIMWk0099159; Sat, 14 Feb 2015 18:22:32 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIMWMu099158; Sat, 14 Feb 2015 18:22:32 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201502141822.t1EIMWMu099158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 14 Feb 2015 18:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278767 - head/usr.sbin/pw/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:22:33 -0000 Author: brd (doc committer) Date: Sat Feb 14 18:22:31 2015 New Revision: 278767 URL: https://svnweb.freebsd.org/changeset/base/278767 Log: Remove an extra curly bracket that was causing intermittent failures. PR: 197612 Submitted by: Robert O'Niel Approved by: will Modified: head/usr.sbin/pw/tests/pw_usernext.sh Modified: head/usr.sbin/pw/tests/pw_usernext.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_usernext.sh Sat Feb 14 18:15:14 2015 (r278766) +++ head/usr.sbin/pw/tests/pw_usernext.sh Sat Feb 14 18:22:31 2015 (r278767) @@ -32,7 +32,7 @@ usernext_assigned_group_body() { atf_check -s exit:0 ${PW} useradd -n test$var0 -g 0 var0=`expr $var0 + 1` done - atf_check -s exit:0 -o match:"100${LIMIT}:1001}" \ + atf_check -s exit:0 -o match:"100${LIMIT}:1001" \ ${PW} usernext } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:33:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9038FADB; Sat, 14 Feb 2015 18:33:56 +0000 (UTC) Received: from pmta2.delivery5.ore.mailhop.org (pmta2.delivery5.ore.mailhop.org [54.186.218.12]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF7E60E; Sat, 14 Feb 2015 18:33:56 +0000 (UTC) Received: from smtp7.ore.mailhop.org (172.31.36.112) by pmta2.delivery1.ore.mailhop.org id hruahq20u50c; Sat, 14 Feb 2015 18:33:59 +0000 (envelope-from ) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp7.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YMhXK-0001ut-SJ; Sat, 14 Feb 2015 18:33:50 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1EIXm0H014934; Sat, 14 Feb 2015 11:33:48 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+xqzchXH8jXc+AH5A4KqYa Message-ID: <1423938828.80968.148.camel@freebsd.org> Subject: Re: svn commit: r278737 - head/usr.sbin/flowctl From: Ian Lepore To: Gleb Smirnoff Date: Sat, 14 Feb 2015 11:33:48 -0700 In-Reply-To: <20150214181508.GL15484@FreeBSD.org> References: <201502132357.t1DNvKda075915@svn.freebsd.org> <20150214193210.N945@besplex.bde.org> <20150214181508.GL15484@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:33:56 -0000 On Sat, 2015-02-14 at 21:15 +0300, Gleb Smirnoff wrote: > Bruce, > > On Sat, Feb 14, 2015 at 08:46:58PM +1100, Bruce Evans wrote: > B> Using VLAs and also the C99 feature of declarations anwhere, and extensions > B> like __aligned(), we can almost implement a full alloca() using the fixed > B> version of this change: > B> > B> /* > B> * XXX need extended statement-expression so that __buf doesn't go out > B> * of scope after the right brace. > B> */ > B> #define my_alloca(n) __extension__ ({ > B> /* XXX need unique name. */ \ > B> char __buf[__roundup2((n), MUMBLE)] __aligned(MUMBLE); \ > B> \ > B> (void *)__buf; \ > B> }) > > I like this idea. But would this exact code work? The life of > __buf is limited by the code block, and we exit the block > immediately. Wouldn't the allocation be overwritten if we > enter any function or block later? > Why put any effort into avoiding alloca() in the first place? Is it inefficient on some platforms? On arm it's like 5 instructions, it just adjusts the size to keep the stack dword-aligned and subtracts the result from sp, done. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:37:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4A4E24; Sat, 14 Feb 2015 18:37:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1019650; Sat, 14 Feb 2015 18:37:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIbaQw005158; Sat, 14 Feb 2015 18:37:36 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIbaQ0005157; Sat, 14 Feb 2015 18:37:36 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141837.t1EIbaQ0005157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 18:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278768 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:37:37 -0000 Author: loos Date: Sat Feb 14 18:37:36 2015 New Revision: 278768 URL: https://svnweb.freebsd.org/changeset/base/278768 Log: MFC r276296, r277207: Make consistent use of the correct debug macros across the file. Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl. Remove the unused temperature conversion macros. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Feb 14 18:22:31 2015 (r278767) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Feb 14 18:37:36 2015 (r278768) @@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$"); #define MHZ2HZ(freq) ((freq) * (1000 * 1000)) #define OFFSET2MVOLT(val) (1200 + ((val) * 25)) #define MVOLT2OFFSET(val) (((val) - 1200) / 25) -#define RAW2K(temp) (((temp) + 273150) / 1000) -#define K2RAW(temp) (((temp) * 1000) - 273150) #define DEFAULT_ARM_FREQUENCY 700 #define DEFAULT_CORE_FREQUENCY 250 @@ -77,6 +75,7 @@ __FBSDID("$FreeBSD$"); #define MSG_ERROR -999999999 #define MHZSTEP 100 #define HZSTEP (MHZ2HZ(MHZSTEP)) +#define TZ_ZEROC 2732 #define VC_LOCK(sc) do { \ sema_wait(&vc_sema); \ @@ -125,7 +124,7 @@ TUNABLE_INT("hw.bcm2835.cpufreq.verbose" static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; TUNABLE_INT("hw.bcm2835.cpufreq.lowest_freq", &cpufreq_lowest_freq); -#ifdef DEBUG +#ifdef PROP_DEBUG static void bcm2835_dump(const void *data, int len) { @@ -1215,7 +1214,7 @@ sysctl_bcm2835_devcpu_temperature(SYSCTL return (EIO); /* 1/1000 celsius (raw) to 1/10 kelvin */ - val = RAW2K(val) * 10; + val = val / 100 + TZ_ZEROC; err = sysctl_handle_int(oidp, &val, 0, req); if (err || !req->newptr) /* error || read request */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:45:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55970FC4; Sat, 14 Feb 2015 18:45:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27EBC762; Sat, 14 Feb 2015 18:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIjiBY009658; Sat, 14 Feb 2015 18:45:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIjiKP009657; Sat, 14 Feb 2015 18:45:44 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141845.t1EIjiKP009657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 18:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278769 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:45:44 -0000 Author: loos Date: Sat Feb 14 18:45:43 2015 New Revision: 278769 URL: https://svnweb.freebsd.org/changeset/base/278769 Log: MFC r276298, r276303: Remove the '#undef DEBUG' that should not be committed. Removes unused and duplicate headers. Bring the wait limit on mailbox write to a more sane value. Fix a off-by-one bug on wait time limit. Remove extra blank line. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Feb 14 18:37:36 2015 (r278768) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Feb 14 18:45:43 2015 (r278769) @@ -31,25 +31,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include +#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include -#include - #include #include "mbox_if.h" @@ -76,7 +67,6 @@ __FBSDID("$FreeBSD$"); mtx_unlock(&(sc)->lock); \ } while(0) -#undef DEBUG #ifdef DEBUG #define dprintf(fmt, args...) printf(fmt, ##args) #else @@ -189,25 +179,21 @@ bcm_mbox_attach(device_t dev) static int bcm_mbox_write(device_t dev, int chan, uint32_t data) { - int limit = 20000; + int limit = 1000; struct bcm_mbox_softc *sc = device_get_softc(dev); dprintf("bcm_mbox_write: chan %d, data %08x\n", chan, data); MBOX_LOCK(sc); - - while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && limit--) { - DELAY(2); - } - + while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && --limit) + DELAY(5); if (limit == 0) { printf("bcm_mbox_write: STATUS_FULL stuck"); MBOX_UNLOCK(sc); return (EAGAIN); } - mbox_write_4(sc, REG_WRITE, MBOX_MSG(chan, data)); - MBOX_UNLOCK(sc); + return (0); } @@ -255,4 +241,3 @@ static driver_t bcm_mbox_driver = { static devclass_t bcm_mbox_devclass; DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); - From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:54:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A9D32A4; Sat, 14 Feb 2015 18:54:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 720C282F; Sat, 14 Feb 2015 18:54:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIsr6i014454; Sat, 14 Feb 2015 18:54:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIsr7B014453; Sat, 14 Feb 2015 18:54:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502141854.t1EIsr7B014453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 14 Feb 2015 18:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278770 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:54:53 -0000 Author: ian Date: Sat Feb 14 18:54:52 2015 New Revision: 278770 URL: https://svnweb.freebsd.org/changeset/base/278770 Log: Add logic for handling new-style ARM cpu ID info. Submitted by: Michal Meloun Modified: head/sys/arm/arm/cpuinfo.c Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Sat Feb 14 18:45:43 2015 (r278769) +++ head/sys/arm/arm/cpuinfo.c Sat Feb 14 18:54:52 2015 (r278770) @@ -58,9 +58,13 @@ cpuinfo_init(void) /* ARMv4T CPU */ cpuinfo.architecture = 1; cpuinfo.revision = (cpuinfo.midr >> 16) & 0x7F; - } + } else { + /* ARM new id scheme */ + cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; + cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; + } } else { - /* must be new id scheme */ + /* non ARM -> must be new id scheme */ cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:56:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12B553E7; Sat, 14 Feb 2015 18:56:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1CD883B; Sat, 14 Feb 2015 18:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIui5L014783; Sat, 14 Feb 2015 18:56:44 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIuiH8014781; Sat, 14 Feb 2015 18:56:44 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201502141856.t1EIuiH8014781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 14 Feb 2015 18:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278771 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:56:45 -0000 Author: hrs Date: Sat Feb 14 18:56:44 2015 New Revision: 278771 URL: https://svnweb.freebsd.org/changeset/base/278771 Log: MFC r273999: Do not try to create a /dev/log symlink in a jail. PR: 179828 Modified: stable/10/etc/rc.d/syslogd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/syslogd ============================================================================== --- stable/10/etc/rc.d/syslogd Sat Feb 14 18:54:52 2015 (r278770) +++ stable/10/etc/rc.d/syslogd Sat Feb 14 18:56:44 2015 (r278771) @@ -28,7 +28,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:57:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B1E1512; Sat, 14 Feb 2015 18:57:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15DB3845; Sat, 14 Feb 2015 18:57:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIv3LD014890; Sat, 14 Feb 2015 18:57:03 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIv3de014888; Sat, 14 Feb 2015 18:57:03 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201502141857.t1EIv3de014888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 14 Feb 2015 18:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278772 - in stable/9/etc: . rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:57:04 -0000 Author: hrs Date: Sat Feb 14 18:57:02 2015 New Revision: 278772 URL: https://svnweb.freebsd.org/changeset/base/278772 Log: MFC r273999 and r271545: Do not try to create a /dev/log symlink in a jail. PR: 179828 Modified: stable/9/etc/rc.d/syslogd stable/9/etc/rc.subr Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/syslogd ============================================================================== --- stable/9/etc/rc.d/syslogd Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.d/syslogd Sat Feb 14 18:57:02 2015 (r278772) @@ -29,7 +29,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log Modified: stable/9/etc/rc.subr ============================================================================== --- stable/9/etc/rc.subr Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.subr Sat Feb 14 18:57:02 2015 (r278772) @@ -2011,6 +2011,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 18:59:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BD8E852; Sat, 14 Feb 2015 18:59:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77619873; Sat, 14 Feb 2015 18:59:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EIxWxV015567; Sat, 14 Feb 2015 18:59:32 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIxWaf015566; Sat, 14 Feb 2015 18:59:32 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141859.t1EIxWaf015566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 18:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278773 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:59:32 -0000 Author: luigi Date: Sat Feb 14 18:59:31 2015 New Revision: 278773 URL: https://svnweb.freebsd.org/changeset/base/278773 Log: whitespace change: clarify the role of MAKEDEV_ETERNAL_KLD, and remove an old #ifdef __FreeBSD__ since the code is valid on all platforms. Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Sat Feb 14 18:57:02 2015 (r278772) +++ head/sys/dev/netmap/netmap.c Sat Feb 14 18:59:31 2015 (r278773) @@ -3071,16 +3071,14 @@ netmap_init(void) error = netmap_mem_init(); if (error != 0) goto fail; - /* XXX could use make_dev_credv() to get error number */ -#ifdef __FreeBSD__ - /* support for the 'eternal' flag */ + /* + * MAKEDEV_ETERNAL_KLD avoids an expensive check on syscalls + * when the module is compiled in. + * XXX could use make_dev_credv() to get error number + */ netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, "netmap"); -#else - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "netmap"); -#endif if (!netmap_dev) goto fail; From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:03:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3BFDA2F; Sat, 14 Feb 2015 19:03:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EE52922; Sat, 14 Feb 2015 19:03:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJ3CQx019607; Sat, 14 Feb 2015 19:03:12 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJ3CwD019606; Sat, 14 Feb 2015 19:03:12 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141903.t1EJ3CwD019606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 19:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278774 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:03:12 -0000 Author: luigi Date: Sat Feb 14 19:03:11 2015 New Revision: 278774 URL: https://svnweb.freebsd.org/changeset/base/278774 Log: two minor changes from the master netmap version: 1. handle errors from nm_config(), if any (none of the FreeBSD drivers currently returns an error on this function, so this change is a no-op at this time 2. use a full memory barrier on ioctls Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Sat Feb 14 18:59:31 2015 (r278773) +++ head/sys/dev/netmap/netmap.c Sat Feb 14 19:03:11 2015 (r278774) @@ -656,9 +656,8 @@ netmap_update_config(struct netmap_adapt u_int txr, txd, rxr, rxd; txr = txd = rxr = rxd = 0; - if (na->nm_config) { - na->nm_config(na, &txr, &txd, &rxr, &rxd); - } else { + if (na->nm_config == NULL || + na->nm_config(na, &txr, &txd, &rxr, &rxd)) { /* take whatever we had at init time */ txr = na->num_tx_rings; txd = na->num_tx_desc; @@ -2168,7 +2167,7 @@ netmap_ioctl(struct cdev *dev, u_long cm error = ENXIO; break; } - rmb(); /* make sure following reads are not from cache */ + mb(); /* make sure following reads are not from cache */ na = priv->np_na; /* we have a reference */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:18:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F13F85; Sat, 14 Feb 2015 19:18:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8A4A2A; Sat, 14 Feb 2015 19:18:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJIuaQ025394; Sat, 14 Feb 2015 19:18:56 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJIubG025393; Sat, 14 Feb 2015 19:18:56 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141918.t1EJIubG025393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 19:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278775 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:18:57 -0000 Author: luigi Date: Sat Feb 14 19:18:56 2015 New Revision: 278775 URL: https://svnweb.freebsd.org/changeset/base/278775 Log: sync with the version in head (r274338): fix one comment, and return kernel-supplied error if available. no API changes. Modified: stable/10/sys/net/netmap_user.h Modified: stable/10/sys/net/netmap_user.h ============================================================================== --- stable/10/sys/net/netmap_user.h Sat Feb 14 19:03:11 2015 (r278774) +++ stable/10/sys/net/netmap_user.h Sat Feb 14 19:18:56 2015 (r278775) @@ -40,7 +40,7 @@ * From there: * struct netmap_ring *NETMAP_TXRING(nifp, index) * struct netmap_ring *NETMAP_RXRING(nifp, index) - * we can access ring->nr_cur, ring->nr_avail, ring->nr_flags + * we can access ring->cur, ring->head, ring->tail, etc. * * ring->slot[i] gives us the i-th slot (we can access * directly len, flags, buf_idx) @@ -543,7 +543,8 @@ fail: nm_close(d); if (errmsg) D("%s %s", errmsg, ifname); - errno = EINVAL; + if (errno == 0) + errno = EINVAL; return NULL; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:21:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0225C3C9; Sat, 14 Feb 2015 19:21:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E14EFA51; Sat, 14 Feb 2015 19:21:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJL4Ih027009; Sat, 14 Feb 2015 19:21:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJL420027008; Sat, 14 Feb 2015 19:21:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502141921.t1EJL420027008@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 19:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278776 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:21:05 -0000 Author: ngie Date: Sat Feb 14 19:21:04 2015 New Revision: 278776 URL: https://svnweb.freebsd.org/changeset/base/278776 Log: Refactor pkill-j_test to reflect the relevant changes done to pgrep-j_test r278742: Simplify jail_name_to_jid and try to be more fault tolerant when scanning for the jail ID (poll up to 10 times for the jail IDs to become available) If the scan fails, the code will fall through and fail as it does with Jenkins today r278636: Parameterize out the amount of sleep done in each test Set the value in each test to a different amount to avoid potential side-effects with other instances of the test (or lingering processes) still being present on the system r278633: Refactor the tests 1. `id -u` -> 0 is now only checked once; the entire test script is now skipped if this assertion is violated 2. De-dent whitespace, based on 1. 3. Only setup the symlink for $sleep once at the top of the script, and tear it down once at the bottom of the script Modified: head/bin/pkill/tests/pkill-j_test.sh Modified: head/bin/pkill/tests/pkill-j_test.sh ============================================================================== --- head/bin/pkill/tests/pkill-j_test.sh Sat Feb 14 19:18:56 2015 (r278775) +++ head/bin/pkill/tests/pkill-j_test.sh Sat Feb 14 19:21:04 2015 (r278776) @@ -4,99 +4,90 @@ jail_name_to_jid() { local check_name="$1" - ( - line="$(jls -n 2> /dev/null | grep name=$check_name )" - for nv in $line; do - local name="${nv%=*}" - if [ "${name}" = "jid" ]; then - eval $nv - echo $jid - break - fi - done - ) + jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g' } base=pkill_j_test +if [ `id -u` -ne 0 ]; then + echo "1..0 # skip Test needs uid 0." + exit 0 +fi + echo "1..3" +sleep=$(pwd)/sleep.txt +ln -sf /bin/sleep $sleep + name="pkill -j " -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & +sleep_amount=5 +jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & + +jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & - jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & +$sleep $sleep_amount & - $sleep 5 & - sleep 0.5 +for i in `seq 1 10`; do jid1=$(jail_name_to_jid ${base}_1_1) jid2=$(jail_name_to_jid ${base}_1_2) jid="${jid1},${jid2}" - if pkill -f -j "$jid" $sleep && sleep 0.5 && - ! -f ${PWD}/${base}_1_1.pid && - ! -f ${PWD}/${base}_1_2.pid ; then - echo "ok 1 - $name" - else - echo "not ok 1 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) - [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) - wait + case "$jid" in + [0-9]+,[0-9]+) + break + ;; + esac + sleep 0.1 +done + +if pkill -f -j "$jid" $sleep && sleep 0.5 && + ! -f ${PWD}/${base}_1_1.pid && + ! -f ${PWD}/${base}_1_2.pid ; then + echo "ok 1 - $name" else - echo "ok 1 - $name # skip Test needs uid 0." -fi + echo "not ok 1 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) +[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) +wait name="pkill -j any" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & - - jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & - - $sleep 5 & - sleep 0.5 - chpid3=$! - if pkill -f -j any $sleep && sleep 0.5 && - [ ! -f ${PWD}/${base}_2_1.pid -a - ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then - echo "ok 2 - $name" - else - echo "not ok 2 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) - [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) - wait +sleep_amount=6 +jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & + +jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & + +$sleep $sleep_amount & +chpid3=$! +sleep 0.5 +if pkill -f -j any $sleep && sleep 0.5 && + [ ! -f ${PWD}/${base}_2_1.pid -a + ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then + echo "ok 2 - $name" else - echo "ok 2 - $name # skip Test needs uid 0." -fi + echo "not ok 2 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) +[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) +wait name="pkill -j none" -if [ `id -u` -eq 0 ]; then - sleep=$(pwd)/sleep.txt - ln -sf /bin/sleep $sleep - daemon -p ${PWD}/${base}_3_1.pid $sleep 5 - jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ - command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & - sleep 1 - if pkill -f -j none "$sleep 5" && sleep 1 && - [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then - echo "ok 3 - $name" - else - ls ${PWD}/*.pid - echo "not ok 3 - $name" - fi 2>/dev/null - rm -f $sleep - [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) - [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) +sleep_amount=7 +daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount +jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount & +sleep 1 +if pkill -f -j none "$sleep $sleep_amount" && sleep 1 && + [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then + echo "ok 3 - $name" else - echo "ok 3 - $name # skip Test needs uid 0." -fi + ls ${PWD}/*.pid + echo "not ok 3 - $name" +fi 2>/dev/null +[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) +[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) + +rm -f $sleep From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:28:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3863189B; Sat, 14 Feb 2015 19:28:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18D29B39; Sat, 14 Feb 2015 19:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJSQfr030633; Sat, 14 Feb 2015 19:28:26 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJSQS7030632; Sat, 14 Feb 2015 19:28:26 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141928.t1EJSQS7030632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 19:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278778 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:28:27 -0000 Author: loos Date: Sat Feb 14 19:28:26 2015 New Revision: 278778 URL: https://svnweb.freebsd.org/changeset/base/278778 Log: MFC: r273264, r274409, r278212, r278213: Add a workaround needed to fix a bug of Arasan Host Controller where it may lose the contents of consecutive writes (that happens within two SD card clock cycles). This fixes the causes of instability during the SD card detection and identification on Raspberry Pi (which happens at 400 kHz and so was much more vulnerable to this issue). Remove the previous workaround which clearly can't provide the same effect. Remove stale comments about the issues with HS mode. Remove a previous workaround to limit the minimum sdhci frequency that isn't needed anymore. Remove some duplicate calls to bus_release_resource() and destroy the mutex on error cases. While here remove unnecessary includes. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Feb 14 19:24:38 2015 (r278777) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Feb 14 19:28:26 2015 (r278778) @@ -29,32 +29,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include -#include #include #include #include -#include -#include -#include - -#include #include -#include -#include -#include -#include #include #include @@ -82,16 +67,9 @@ __FBSDID("$FreeBSD$"); #define dprintf(fmt, args...) #endif -/* - * Arasan HC seems to have problem with Data CRC on lower frequencies. - * Use this tunable to cap initialization sequence frequency at higher - * value. Default is standard 400kHz - */ -static int bcm2835_sdhci_min_freq = 400000; static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; -TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); @@ -208,16 +186,12 @@ bcm_sdhci_attach(device_t dev) RF_ACTIVE); if (!sc->sc_irq_res) { device_printf(dev, "cannot allocate interrupt\n"); - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); err = ENXIO; goto fail; } if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) - { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) { device_printf(dev, "cannot setup interrupt handler\n"); err = ENXIO; goto fail; @@ -283,6 +257,7 @@ fail: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); return (err); } @@ -319,21 +294,15 @@ RD4(struct bcm_sdhci_softc *sc, bus_size static inline void WR4(struct bcm_sdhci_softc *sc, bus_size_t off, uint32_t val) { - bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); - if ((off != SDHCI_BUFFER && off != SDHCI_INT_STATUS && off != SDHCI_CLOCK_CONTROL)) - { - int timeout = 100000; - while (val != bus_space_read_4(sc->sc_bst, sc->sc_bsh, off) - && --timeout > 0) - continue; - - if (timeout <= 0) - printf("sdhci_brcm: writing 0x%X to reg 0x%X " - "always gives 0x%X\n", - val, (uint32_t)off, - bus_space_read_4(sc->sc_bst, sc->sc_bsh, off)); - } + bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); + /* + * The Arasan HC has a bug where it may lose the content of + * consecutive writes to registers that are within two SD-card + * clock cycles of each other (a clock domain crossing problem). + */ + if (sc->sc_slot.clock > 0) + DELAY(((2 * 1000000) / sc->sc_slot.clock) + 1); } static uint8_t @@ -425,13 +394,6 @@ bcm_sdhci_write_multi_4(device_t dev, st bus_space_write_multi_4(sc->sc_bst, sc->sc_bsh, off, data, count); } -static uint32_t -bcm_sdhci_min_freq(device_t dev, struct sdhci_slot *slot) -{ - - return bcm2835_sdhci_min_freq; -} - static void bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) { @@ -684,7 +646,6 @@ static device_method_t bcm_sdhci_methods DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), - DEVMETHOD(sdhci_min_freq, bcm_sdhci_min_freq), /* Platform transfer methods */ DEVMETHOD(sdhci_platform_will_handle, bcm_sdhci_will_handle_transfer), DEVMETHOD(sdhci_platform_start_transfer, bcm_sdhci_start_transfer), From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:41:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBD9EC2F; Sat, 14 Feb 2015 19:41:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5459CFA; Sat, 14 Feb 2015 19:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJfT0K039416; Sat, 14 Feb 2015 19:41:29 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJfR0H039408; Sat, 14 Feb 2015 19:41:27 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141941.t1EJfR0H039408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 19:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278779 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:41:30 -0000 Author: luigi Date: Sat Feb 14 19:41:26 2015 New Revision: 278779 URL: https://svnweb.freebsd.org/changeset/base/278779 Log: sync the code with the version in head. which the exception of svn 275358 (M_FLOWID deprecation, only a couple of lines) which cannot be merged. if_lem_netmap.h, if_re_netmap.h: - use the same (commented out) function to update the stat counters as in HEAD. This is a no-op here netmap.c - merge 274459 (support for private knote lock) and minor changes on nm_config and comments netmap_freebsd.c - merge 274459 (support for private knote lock) - merge 274354 (initialize color if passed as argument) netmap_generic.c - fix a comment netmap_kern.h - revise the lock macros, using sx locks; merge 274459 (private knote lock) netmap_monitor.c - use full memory barriers netmap_pipe.c - use full memory barriers, use length from the correct queue (mostly cosmetic, since the queues typically have the same size) Modified: stable/10/sys/dev/netmap/if_lem_netmap.h stable/10/sys/dev/netmap/if_re_netmap.h stable/10/sys/dev/netmap/netmap.c stable/10/sys/dev/netmap/netmap_freebsd.c stable/10/sys/dev/netmap/netmap_generic.c stable/10/sys/dev/netmap/netmap_kern.h stable/10/sys/dev/netmap/netmap_monitor.c stable/10/sys/dev/netmap/netmap_pipe.c Modified: stable/10/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_lem_netmap.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/if_lem_netmap.h Sat Feb 14 19:41:26 2015 (r278779) @@ -410,7 +410,7 @@ lem_netmap_rxsync(struct netmap_kring *k netmap_idx_n2k(kring, adapter->next_rx_desc_to_check), kring->nr_hwtail); adapter->next_rx_desc_to_check = nic_i; - // ifp->if_ipackets += n; + // if_inc_counter(ifp, IFCOUNTER_IPACKETS, n); kring->nr_hwtail = nm_i; } kring->nr_kflags &= ~NKR_PENDINTR; Modified: stable/10/sys/dev/netmap/if_re_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_re_netmap.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/if_re_netmap.h Sat Feb 14 19:41:26 2015 (r278779) @@ -222,7 +222,7 @@ re_netmap_rxsync(struct netmap_kring *kr /* sync was in re_newbuf() */ bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag, rxd[nic_i].rx_dmamap, BUS_DMASYNC_POSTREAD); - // sc->rl_ifp->if_ipackets++; + // if_inc_counter(sc->rl_ifp, IFCOUNTER_IPACKETS, 1); nm_i = nm_next(nm_i, lim); nic_i = nm_next(nic_i, lim); } Modified: stable/10/sys/dev/netmap/netmap.c ============================================================================== --- stable/10/sys/dev/netmap/netmap.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap.c Sat Feb 14 19:41:26 2015 (r278779) @@ -375,9 +375,14 @@ ports attached to the switch) /* reduce conditional code */ // linux API, use for the knlist in FreeBSD -#define init_waitqueue_head(x) knlist_init_mtx(&(x)->si_note, NULL) +/* use a private mutex for the knlist */ +#define init_waitqueue_head(x) do { \ + struct mtx *m = &(x)->m; \ + mtx_init(m, "nm_kn_lock", NULL, MTX_DEF); \ + knlist_init_mtx(&(x)->si.si_note, m); \ + } while (0) -void freebsd_selwakeup(struct selinfo *si, int pri); +#define OS_selrecord(a, b) selrecord(a, &((b)->si)) #define OS_selwakeup(a, b) freebsd_selwakeup(a, b) #elif defined(linux) @@ -651,9 +656,8 @@ netmap_update_config(struct netmap_adapt u_int txr, txd, rxr, rxd; txr = txd = rxr = rxd = 0; - if (na->nm_config) { - na->nm_config(na, &txr, &txd, &rxr, &rxd); - } else { + if (na->nm_config == NULL || + na->nm_config(na, &txr, &txd, &rxr, &rxd)) { /* take whatever we had at init time */ txr = na->num_tx_rings; txd = na->num_tx_desc; @@ -806,6 +810,19 @@ netmap_krings_create(struct netmap_adapt } +#ifdef __FreeBSD__ +static void +netmap_knlist_destroy(NM_SELINFO_T *si) +{ + /* XXX kqueue(9) needed; these will mirror knlist_init. */ + knlist_delete(&si->si.si_note, curthread, 0 /* not locked */ ); + knlist_destroy(&si->si.si_note); + /* now we don't need the mutex anymore */ + mtx_destroy(&si->m); +} +#endif /* __FreeBSD__ */ + + /* undo the actions performed by netmap_krings_create */ /* call with NMG_LOCK held */ void @@ -816,6 +833,7 @@ netmap_krings_delete(struct netmap_adapt /* we rely on the krings layout described above */ for ( ; kring != na->tailroom; kring++) { mtx_destroy(&kring->q_lock); + netmap_knlist_destroy(&kring->si); } free(na->tx_rings, M_DEVBUF); na->tx_rings = na->rx_rings = na->tailroom = NULL; @@ -996,9 +1014,8 @@ netmap_do_unregif(struct netmap_priv_d * * XXX The wake up now must happen during *_down(), when * we order all activities to stop. -gl */ - /* XXX kqueue(9) needed; these will mirror knlist_init. */ - /* knlist_destroy(&na->tx_si.si_note); */ - /* knlist_destroy(&na->rx_si.si_note); */ + netmap_knlist_destroy(&na->tx_si); + netmap_knlist_destroy(&na->rx_si); /* delete rings and buffers */ netmap_mem_rings_delete(na); @@ -1310,7 +1327,7 @@ netmap_rxsync_from_host(struct netmap_ad /* access copies of cur,tail in the kring */ if (kring->rcur == kring->rtail && td) /* no bufs available */ - selrecord(td, &kring->si); + OS_selrecord(td, &kring->si); mbq_unlock(q); return ret; @@ -2150,7 +2167,7 @@ netmap_ioctl(struct cdev *dev, u_long cm error = ENXIO; break; } - rmb(); /* make sure following reads are not from cache */ + mb(); /* make sure following reads are not from cache */ na = priv->np_na; /* we have a reference */ @@ -2410,7 +2427,7 @@ flush_tx: } } if (want_tx && retry_tx && !is_kevent) { - selrecord(td, check_all_tx ? + OS_selrecord(td, check_all_tx ? &na->tx_si : &na->tx_rings[priv->np_txqfirst].si); retry_tx = 0; goto flush_tx; @@ -2479,7 +2496,7 @@ do_retry_rx: } if (retry_rx && !is_kevent) - selrecord(td, check_all_rx ? + OS_selrecord(td, check_all_rx ? &na->rx_si : &na->rx_rings[priv->np_rxqfirst].si); if (send_down > 0 || retry_rx) { retry_rx = 0; @@ -3053,8 +3070,13 @@ netmap_init(void) error = netmap_mem_init(); if (error != 0) goto fail; - /* XXX could use make_dev_credv() to get error number */ - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0660, + /* + * MAKEDEV_ETERNAL_KLD avoids an expensive check on syscalls + * when the module is compiled in. + * XXX could use make_dev_credv() to get error number + */ + netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, + &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, "netmap"); if (!netmap_dev) goto fail; Modified: stable/10/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_freebsd.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_freebsd.c Sat Feb 14 19:41:26 2015 (r278779) @@ -466,6 +466,8 @@ netmap_dev_pager_ctor(void *handle, vm_o if (netmap_verbose) D("handle %p size %jd prot %d foff %jd", handle, (intmax_t)size, prot, (intmax_t)foff); + if (color) + *color = 0; dev_ref(vmh->dev); return 0; } @@ -654,25 +656,24 @@ netmap_open(struct cdev *dev, int oflags * and do not need the selrecord(). */ -void freebsd_selwakeup(struct selinfo *si, int pri); void -freebsd_selwakeup(struct selinfo *si, int pri) +freebsd_selwakeup(struct nm_selinfo *si, int pri) { if (netmap_verbose) - D("on knote %p", &si->si_note); - selwakeuppri(si, pri); + D("on knote %p", &si->si.si_note); + selwakeuppri(&si->si, pri); /* use a non-zero hint to tell the notification from the * call done in kqueue_scan() which uses 0 */ - KNOTE_UNLOCKED(&si->si_note, 0x100 /* notification */); + KNOTE_UNLOCKED(&si->si.si_note, 0x100 /* notification */); } static void netmap_knrdetach(struct knote *kn) { struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; - struct selinfo *si = priv->np_rxsi; + struct selinfo *si = &priv->np_rxsi->si; D("remove selinfo %p", si); knlist_remove(&si->si_note, kn, 0); @@ -682,7 +683,7 @@ static void netmap_knwdetach(struct knote *kn) { struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; - struct selinfo *si = priv->np_txsi; + struct selinfo *si = &priv->np_txsi->si; D("remove selinfo %p", si); knlist_remove(&si->si_note, kn, 0); @@ -754,7 +755,7 @@ netmap_kqfilter(struct cdev *dev, struct struct netmap_priv_d *priv; int error; struct netmap_adapter *na; - struct selinfo *si; + struct nm_selinfo *si; int ev = kn->kn_filter; if (ev != EVFILT_READ && ev != EVFILT_WRITE) { @@ -777,7 +778,7 @@ netmap_kqfilter(struct cdev *dev, struct kn->kn_fop = (ev == EVFILT_WRITE) ? &netmap_wfiltops : &netmap_rfiltops; kn->kn_hook = priv; - knlist_add(&si->si_note, kn, 1); + knlist_add(&si->si.si_note, kn, 1); // XXX unlock(priv) ND("register %p %s td %p priv %p kn %p np_nifp %p kn_fp/fpop %s", na, na->ifp->if_xname, curthread, priv, kn, Modified: stable/10/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_generic.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_generic.c Sat Feb 14 19:41:26 2015 (r278779) @@ -821,7 +821,7 @@ generic_netmap_attach(struct ifnet *ifp) num_tx_desc = num_rx_desc = netmap_generic_ringsize; /* starting point */ - generic_find_num_desc(ifp, &num_tx_desc, &num_rx_desc); + generic_find_num_desc(ifp, &num_tx_desc, &num_rx_desc); /* ignore errors */ ND("Netmap ring size: TX = %d, RX = %d", num_tx_desc, num_rx_desc); if (num_tx_desc == 0 || num_rx_desc == 0) { D("Device has no hw slots (tx %u, rx %u)", num_tx_desc, num_rx_desc); Modified: stable/10/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/10/sys/dev/netmap/netmap_kern.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_kern.h Sat Feb 14 19:41:26 2015 (r278779) @@ -37,6 +37,7 @@ #define WITH_VALE // comment out to disable VALE support #define WITH_PIPES #define WITH_MONITOR +#define WITH_GENERIC #if defined(__FreeBSD__) @@ -44,6 +45,8 @@ #define unlikely(x) __builtin_expect((long)!!(x), 0L) #define NM_LOCK_T struct mtx + +/* netmap global lock */ #define NMG_LOCK_T struct sx #define NMG_LOCK_INIT() sx_init(&netmap_global_lock, \ "netmap global lock") @@ -52,7 +55,7 @@ #define NMG_UNLOCK() sx_xunlock(&netmap_global_lock) #define NMG_LOCK_ASSERT() sx_assert(&netmap_global_lock, SA_XLOCKED) -#define NM_SELINFO_T struct selinfo +#define NM_SELINFO_T struct nm_selinfo #define MBUF_LEN(m) ((m)->m_pkthdr.len) #define MBUF_IFP(m) ((m)->m_pkthdr.rcvif) #define NM_SEND_UP(ifp, m) ((NA(ifp))->if_input)(ifp, m) @@ -63,6 +66,12 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) +#if __FreeBSD_version >= 1100030 +#define WNA(_ifp) (_ifp)->if_netmap +#else /* older FreeBSD */ +#define WNA(_ifp) (_ifp)->if_pspare[0] +#endif /* older FreeBSD */ + #if __FreeBSD_version >= 1100005 struct netmap_adapter *netmap_getna(if_t ifp); #endif @@ -79,6 +88,13 @@ struct netmap_adapter *netmap_getna(if_t MALLOC_DECLARE(M_NETMAP); +struct nm_selinfo { + struct selinfo si; + struct mtx m; +}; + +void freebsd_selwakeup(struct nm_selinfo *si, int pri); + // XXX linux struct, not used in FreeBSD struct net_device_ops { }; @@ -101,13 +117,20 @@ struct hrtimer { #define NM_ATOMIC_T volatile long unsigned int -// XXX a mtx would suffice here too 20130404 gl -#define NMG_LOCK_T struct semaphore -#define NMG_LOCK_INIT() sema_init(&netmap_global_lock, 1) -#define NMG_LOCK_DESTROY() -#define NMG_LOCK() down(&netmap_global_lock) -#define NMG_UNLOCK() up(&netmap_global_lock) -#define NMG_LOCK_ASSERT() // XXX to be completed +#define NM_MTX_T struct mutex +#define NM_MTX_INIT(m, s) do { (void)s; mutex_init(&(m)); } while (0) +#define NM_MTX_DESTROY(m) do { (void)m; } while (0) +#define NM_MTX_LOCK(m) mutex_lock(&(m)) +#define NM_MTX_UNLOCK(m) mutex_unlock(&(m)) +#define NM_MTX_LOCK_ASSERT(m) mutex_is_locked(&(m)) + +#define NMG_LOCK_T NM_MTX_T +#define NMG_LOCK_INIT() NM_MTX_INIT(netmap_global_lock, \ + "netmap_global_lock") +#define NMG_LOCK_DESTROY() NM_MTX_DESTROY(netmap_global_lock) +#define NMG_LOCK() NM_MTX_LOCK(netmap_global_lock) +#define NMG_UNLOCK() NM_MTX_UNLOCK(netmap_global_lock) +#define NMG_LOCK_ASSERT() NM_MTX_LOCK_ASSERT(netmap_global_lock) #ifndef DEV_NETMAP #define DEV_NETMAP @@ -260,7 +283,7 @@ struct netmap_kring { struct netmap_adapter *na; - /* The folloiwing fields are for VALE switch support */ + /* The following fields are for VALE switch support */ struct nm_bdg_fwd *nkr_ft; uint32_t *nkr_leases; #define NR_NOSLOT ((uint32_t)~0) /* used in nkr_*lease* */ @@ -635,6 +658,7 @@ struct netmap_hw_adapter { /* physical d int (*nm_hw_register)(struct netmap_adapter *, int onoff); }; +#ifdef WITH_GENERIC /* Mitigation support. */ struct nm_generic_mit { struct hrtimer mit_timer; @@ -662,6 +686,7 @@ struct netmap_generic_adapter { /* emula netdev_tx_t (*save_start_xmit)(struct mbuf *, struct ifnet *); #endif }; +#endif /* WITH_GENERIC */ static __inline int netmap_real_tx_rings(struct netmap_adapter *na) @@ -1186,9 +1211,6 @@ extern int netmap_generic_rings; * NA returns a pointer to the struct netmap adapter from the ifp, * WNA is used to write it. */ -#ifndef WNA -#define WNA(_ifp) (_ifp)->if_pspare[0] -#endif #define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) /* @@ -1478,6 +1500,7 @@ struct netmap_monitor_adapter { #endif /* WITH_MONITOR */ +#ifdef WITH_GENERIC /* * generic netmap emulation for devices that do not have * native netmap support. @@ -1509,6 +1532,7 @@ void netmap_mitigation_start(struct nm_g void netmap_mitigation_restart(struct nm_generic_mit *mit); int netmap_mitigation_active(struct nm_generic_mit *mit); void netmap_mitigation_cleanup(struct nm_generic_mit *mit); +#endif /* WITH_GENERIC */ Modified: stable/10/sys/dev/netmap/netmap_monitor.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_monitor.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_monitor.c Sat Feb 14 19:41:26 2015 (r278779) @@ -179,7 +179,7 @@ netmap_monitor_parent_sync(struct netmap i = nm_next(i, mlim); } - wmb(); + mb(); mkring->nr_hwtail = i; mtx_unlock(&mkring->q_lock); @@ -225,7 +225,7 @@ netmap_monitor_rxsync(struct netmap_krin { ND("%s %x", kring->name, flags); kring->nr_hwcur = kring->rcur; - rmb(); + mb(); nm_rxsync_finalize(kring); return 0; } Modified: stable/10/sys/dev/netmap/netmap_pipe.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_pipe.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_pipe.c Sat Feb 14 19:41:26 2015 (r278779) @@ -197,10 +197,10 @@ netmap_pipe_txsync(struct netmap_kring * if (m < 0) m += txkring->nkr_num_slots; limit = m; - m = rxkring->nkr_num_slots - 1; /* max avail space on destination */ + m = lim_rx; /* max avail space on destination */ busy = j - rxkring->nr_hwcur; /* busy slots */ if (busy < 0) - busy += txkring->nkr_num_slots; + busy += rxkring->nkr_num_slots; m -= busy; /* subtract busy slots */ ND(2, "m %d limit %d", m, limit); if (m < limit) @@ -228,7 +228,7 @@ netmap_pipe_txsync(struct netmap_kring * k = nm_next(k, lim_tx); } - wmb(); /* make sure the slots are updated before publishing them */ + mb(); /* make sure the slots are updated before publishing them */ rxkring->nr_hwtail = j; txkring->nr_hwcur = k; txkring->nr_hwtail = nm_prev(k, lim_tx); @@ -237,7 +237,7 @@ netmap_pipe_txsync(struct netmap_kring * ND(2, "after: hwcur %d hwtail %d cur %d head %d tail %d j %d", txkring->nr_hwcur, txkring->nr_hwtail, txkring->rcur, txkring->rhead, txkring->rtail, j); - wmb(); /* make sure rxkring->nr_hwtail is updated before notifying */ + mb(); /* make sure rxkring->nr_hwtail is updated before notifying */ rxkring->na->nm_notify(rxkring->na, rxkring->ring_id, NR_RX, 0); return 0; @@ -253,12 +253,12 @@ netmap_pipe_rxsync(struct netmap_kring * rxkring->nr_hwcur = rxkring->rhead; /* recover user-relased slots */ ND(5, "hwcur %d hwtail %d cur %d head %d tail %d", rxkring->nr_hwcur, rxkring->nr_hwtail, rxkring->rcur, rxkring->rhead, rxkring->rtail); - rmb(); /* paired with the first wmb() in txsync */ + mb(); /* paired with the first mb() in txsync */ nm_rxsync_finalize(rxkring); if (oldhwcur != rxkring->nr_hwcur) { /* we have released some slots, notify the other end */ - wmb(); /* make sure nr_hwcur is updated before notifying */ + mb(); /* make sure nr_hwcur is updated before notifying */ txkring->na->nm_notify(txkring->na, txkring->ring_id, NR_TX, 0); } return 0; From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 19:59:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE403C7 for ; Sat, 14 Feb 2015 19:59:46 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8EFE11 for ; Sat, 14 Feb 2015 19:59:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EJxjTq063108 for ; Sat, 14 Feb 2015 19:59:45 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t1EJxjwJ063104 for svn-src-all@freebsd.org; Sat, 14 Feb 2015 19:59:45 GMT (envelope-from bdrewery) Received: (qmail 14765 invoked from network); 14 Feb 2015 13:59:43 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 14 Feb 2015 13:59:43 -0600 Message-ID: <54DFA938.6020207@FreeBSD.org> Date: Sat, 14 Feb 2015 13:59:52 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Steven Hartland , phabric-admin@FreeBSD.org Subject: Re: Phabricator + 'Reviewed by' [was Re: svn commit: r278472 - in head/sys: netinet netinet6] References: <201502091928.t19JSC5P066293@svn.freebsd.org> <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> <54DE8F32.2090500@FreeBSD.org> <54DF6709.6030204@freebsd.org> In-Reply-To: <54DF6709.6030204@freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="71KaNec92cajp8T0dhVfr0IlJNwmc4jqa" Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:59:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --71KaNec92cajp8T0dhVfr0IlJNwmc4jqa Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/14/2015 9:17 AM, Steven Hartland wrote: >=20 > On 13/02/2015 23:56, Bryan Drewery wrote: >> On 2/9/2015 3:45 PM, Bjoern A. Zeeb wrote: >>>> Commented upon by hiren and sbruno >>>> See Phabricator D1777 for more details. >>>> >>>> Commented upon by hiren and sbruno >>>> Reviewed by: adrian, jhb and bz >>> I have not reviewed this; as a matter of fact you are aware that I >>> still wanted to do that. >>> >> Something about Phabricator is not jiving with our commit terminology.= >> This has happened before as well with other commits. I'm sure everyone= >> is good-intentioned as well. >> >> There's not 1 person on D1777 who has 'accepted' it. That is what >> warrants a 'Reviewed by' to me. >> >> It's clear to me, but seems unclear to others. I really think the >> reviewer list needs to be split up. Rather than using icons, use >> separate lists. Reviewers requested: accepted: commented: changes >> requested:. > I don't think it needs to be split up, that feels unnecessary, if > someone hasn't accepted it then they haven't review it period IMO. Yes I too think it's obvious, yet I've seen at least 2 commits where the reviewed by line was essentially a lie. It's in SVN forever now with those names stamped as reviewers. --=20 Regards, Bryan Drewery --71KaNec92cajp8T0dhVfr0IlJNwmc4jqa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJU36k4AAoJEDXXcbtuRpfPrisIALypNR5Xg4JeqeVwkRtogT/I p+gD7vk/HUNA5hg/wrin8nRB4pIKnikASihy5SnD99Wf5aS8a+Xl+rVbpyIrWtNY xrTswaA5i6TF6/Um0rJN0D5RNnL95W/33t5IcqsBBFb4peYRipqh+q9/YO7xV76N T9bAHHMsMWdoe818LKD8rdEjIbNh02m/xhrjp1BQ3dZ+bWYDKMG/PI9kRGKc1owH LMZQfsl8U0F5yQOfnVAn06kWELcqQqMhggzZGdh+4UwXLpXFndswrLgJHef8YO+d dbm8Ni++GQ/vg2GfiPjw/DmTRDmIl/i6MB8MiErbW824v93d2vBAjgT3qY6pCjo= =JhPT -----END PGP SIGNATURE----- --71KaNec92cajp8T0dhVfr0IlJNwmc4jqa-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:00:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8BE5508 for ; Sat, 14 Feb 2015 20:00:00 +0000 (UTC) Received: from nm42-vm5.bullet.mail.bf1.yahoo.com (nm42-vm5.bullet.mail.bf1.yahoo.com [216.109.114.204]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51771E1D for ; Sat, 14 Feb 2015 20:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423943615; bh=P/VRe0WNcfdKswkuKcSBu3P2dJBNoC45UJvkuYvZlq8=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=kVcDHGoTf2y1HI8uO8EO5BZALVa6jkTTeFxs7J+HCfTR8YWpPsIbm9nYK0Xqh+GoVLBw55n7Tg3hzFHhdlQ83HP+JeSIT27ODuLgAcE8mJKnN7MLmuCzCHWCYZS0owKSjWXLr0m8KcVElpeTOU69XmpN8Dpyn3Sj6cFT6ZUR3wxf7zHGVe4luZPea4bmhciKttXTadHCP5V6SaM0Vs/HIYWHhMT6J3wQ+PQByicr6hhSXOst43rI3RpftDsvdKRRB+x9Rr4WGquyqi1BdUu6rEUtpsh7x1INz9xNgdvCK2Xo/wguL56i53vDygv9jz4Qz8Ue6ScyFFCE+63Msp4AUQ== Received: from [98.139.215.143] by nm42.bullet.mail.bf1.yahoo.com with NNFMP; 14 Feb 2015 19:53:35 -0000 Received: from [98.139.211.193] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 14 Feb 2015 19:53:35 -0000 Received: from [127.0.0.1] by smtp202.mail.bf1.yahoo.com with NNFMP; 14 Feb 2015 19:53:35 -0000 X-Yahoo-Newman-Id: 110902.27848.bm@smtp202.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Lr_6tcYVM1kaD7hfE0412MM1Vgpfv_Yn3W5X_eB3zFtGqhb 7z9vxqDnYAiqn6fuvNWRwjELmM56.8R8w4tB7mLTGpVc9onpqAHCrRsSWKWS pGAD.3ICP1mcXDNU5Oi.gUY4xFV7Ak7_0emNZkGlB3IwTphyamuba4lKqqML hbPD3uu7z0tqTxe1qnckm4wLePgJLXPfSY4fZJ.j22bFzqIEhsQ7DmjYVP_b LpKCTkGW3aQ0iEHTuNupdPt1vUEmAZmB_MJ3mH3Ee9pM9nVr0f1R16bFfqWE b5fk_z3f2jDWsNDr9s2eRTVqxqjRq.OoCVcxadGNJwa0PLqc_uqg5SdBVmnf eKpFaqwX..jBhCCdaTYtGVvV7St6j6.pT3LnN.Ubw3332mqLqiwRoAvrEPlH tulvTxqSLLD9H9vg6iHfA_h6BWdz5pRaReMtaOYggYGx_kUQcLoigo3tUt6j UqShRk.Wd.e.ByeRVc_zhI83Rxh.q2rB66VhKKFwkzs0Eux916hTgMy8GS5C EhK3ywGQ5BHbTUqj9QndfJmmoN6hNat9D X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54DFA7CC.20305@FreeBSD.org> Date: Sat, 14 Feb 2015 14:53:48 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ian Lepore , Gleb Smirnoff Subject: Re: svn commit: r278737 - head/usr.sbin/flowctl References: <201502132357.t1DNvKda075915@svn.freebsd.org> <20150214193210.N945@besplex.bde.org> <20150214181508.GL15484@FreeBSD.org> <1423938828.80968.148.camel@freebsd.org> In-Reply-To: <1423938828.80968.148.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:00:00 -0000 On 02/14/15 13:33, Ian Lepore wrote: > On Sat, 2015-02-14 at 21:15 +0300, Gleb Smirnoff wrote: >> Bruce, >> >> On Sat, Feb 14, 2015 at 08:46:58PM +1100, Bruce Evans wrote: >> B> Using VLAs and also the C99 feature of declarations anwhere, and extensions >> B> like __aligned(), we can almost implement a full alloca() using the fixed >> B> version of this change: >> B> >> B> /* >> B> * XXX need extended statement-expression so that __buf doesn't go out >> B> * of scope after the right brace. >> B> */ >> B> #define my_alloca(n) __extension__ ({ >> B> /* XXX need unique name. */ \ >> B> char __buf[__roundup2((n), MUMBLE)] __aligned(MUMBLE); \ >> B> \ >> B> (void *)__buf; \ >> B> }) >> >> I like this idea. But would this exact code work? The life of >> __buf is limited by the code block, and we exit the block >> immediately. Wouldn't the allocation be overwritten if we >> enter any function or block later? >> > Why put any effort into avoiding alloca() in the first place? Is it > inefficient on some platforms? On arm it's like 5 instructions, it just > adjusts the size to keep the stack dword-aligned and subtracts the > result from sp, done. Because it's non-standard and the alloca(3) man page discourages it: _____ ... BUGS The alloca() function is machine and compiler dependent; its use is dis- couraged. ____ It is not disappearing anytime soon though, some even say the man page is wrong. Pedro. From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:00:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22A4B89F; Sat, 14 Feb 2015 20:00:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E319E47; Sat, 14 Feb 2015 20:00:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EK0v3W047469; Sat, 14 Feb 2015 20:00:57 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EK0v8B047468; Sat, 14 Feb 2015 20:00:57 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201502142000.t1EK0v8B047468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Sat, 14 Feb 2015 20:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278780 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:00:58 -0000 Author: davide Date: Sat Feb 14 20:00:57 2015 New Revision: 278780 URL: https://svnweb.freebsd.org/changeset/base/278780 Log: Don't access sockbuf fields directly, use accessor functions instead. It is safe to move the call to socantsendmore_locked() after sbdrop_locked() as long as we hold the sockbuf lock across the two calls. CR: D1805 Reviewed by: adrian, kmacy, julian, rwatson Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Feb 14 19:41:26 2015 (r278779) +++ head/sys/kern/uipc_socket.c Sat Feb 14 20:00:57 2015 (r278780) @@ -3439,11 +3439,9 @@ soisdisconnecting(struct socket *so) SOCKBUF_LOCK(&so->so_rcv); so->so_state &= ~SS_ISCONNECTING; so->so_state |= SS_ISDISCONNECTING; - so->so_rcv.sb_state |= SBS_CANTRCVMORE; - sorwakeup_locked(so); + socantrcvmore_locked(so); SOCKBUF_LOCK(&so->so_snd); - so->so_snd.sb_state |= SBS_CANTSENDMORE; - sowwakeup_locked(so); + socantsendmore_locked(so); wakeup(&so->so_timeo); } @@ -3458,12 +3456,10 @@ soisdisconnected(struct socket *so) SOCKBUF_LOCK(&so->so_rcv); so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING); so->so_state |= SS_ISDISCONNECTED; - so->so_rcv.sb_state |= SBS_CANTRCVMORE; - sorwakeup_locked(so); + socantrcvmore_locked(so); SOCKBUF_LOCK(&so->so_snd); - so->so_snd.sb_state |= SBS_CANTSENDMORE; sbdrop_locked(&so->so_snd, sbused(&so->so_snd)); - sowwakeup_locked(so); + socantsendmore_locked(so); wakeup(&so->so_timeo); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:09:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8A32E2D; Sat, 14 Feb 2015 20:09:15 +0000 (UTC) Received: from pmta1.delivery8.ore.mailhop.org (pmta1.delivery8.ore.mailhop.org [54.191.158.99]) by mx1.freebsd.org (Postfix) with ESMTP id B170BF57; Sat, 14 Feb 2015 20:09:15 +0000 (UTC) Received: from smtp3.ore.mailhop.org (172.31.36.112) by pmta1.delivery1.ore.mailhop.org id hrulm220r840; Sat, 14 Feb 2015 20:08:57 +0000 (envelope-from ) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YMj1X-0002pl-Jr; Sat, 14 Feb 2015 20:09:07 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1EK9639015469; Sat, 14 Feb 2015 13:09:06 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18qxpACM1e16AyJMbHyVzhm Message-ID: <1423944546.80968.151.camel@freebsd.org> Subject: Re: Phabricator + 'Reviewed by' [was Re: svn commit: r278472 - in head/sys: netinet netinet6] From: Ian Lepore To: Bryan Drewery Date: Sat, 14 Feb 2015 13:09:06 -0700 In-Reply-To: <54DFA938.6020207@FreeBSD.org> References: <201502091928.t19JSC5P066293@svn.freebsd.org> <38B8D2D0-862A-4DF5-9479-8EC234CF830B@FreeBSD.org> <54DE8F32.2090500@FreeBSD.org> <54DF6709.6030204@freebsd.org> <54DFA938.6020207@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Steven Hartland , svn-src-all@freebsd.org, phabric-admin@FreeBSD.org, Randall Stewart , "Bjoern A. Zeeb" , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:09:16 -0000 On Sat, 2015-02-14 at 13:59 -0600, Bryan Drewery wrote: > On 2/14/2015 9:17 AM, Steven Hartland wrote: > > > > On 13/02/2015 23:56, Bryan Drewery wrote: > >> On 2/9/2015 3:45 PM, Bjoern A. Zeeb wrote: > >>>> Commented upon by hiren and sbruno > >>>> See Phabricator D1777 for more details. > >>>> > >>>> Commented upon by hiren and sbruno > >>>> Reviewed by: adrian, jhb and bz > >>> I have not reviewed this; as a matter of fact you are aware that I > >>> still wanted to do that. > >>> > >> Something about Phabricator is not jiving with our commit terminology. > >> This has happened before as well with other commits. I'm sure everyone > >> is good-intentioned as well. > >> > >> There's not 1 person on D1777 who has 'accepted' it. That is what > >> warrants a 'Reviewed by' to me. > >> > >> It's clear to me, but seems unclear to others. I really think the > >> reviewer list needs to be split up. Rather than using icons, use > >> separate lists. Reviewers requested: accepted: commented: changes > >> requested:. > > I don't think it needs to be split up, that feels unnecessary, if > > someone hasn't accepted it then they haven't review it period IMO. > > Yes I too think it's obvious, yet I've seen at least 2 commits where the > reviewed by line was essentially a lie. It's in SVN forever now with > those names stamped as reviewers. > You make that sound like some sort of huge crisis, but we have glitches in commit messages (occasionally even a missing/empty message) from time to time, and life goes on. Phabricator is supposed to be a tool to make our lives better and easier, but it could all too easily turn into a stick to hit people with, and the first step on that path is making a bunch of rigid formal rules and procedures. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:32:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D514A91D; Sat, 14 Feb 2015 20:32:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF7FC238; Sat, 14 Feb 2015 20:32:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKWPcN064974; Sat, 14 Feb 2015 20:32:25 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKWPhJ064971; Sat, 14 Feb 2015 20:32:25 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142032.t1EKWPhJ064971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278781 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:32:26 -0000 Author: loos Date: Sat Feb 14 20:32:24 2015 New Revision: 278781 URL: https://svnweb.freebsd.org/changeset/base/278781 Log: MFC r273566, r273569: Provide a working GPIOBUS_IVAR() macro for FDT systems. Move the duplicated code to a single function. No functional changes. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:32:24 2015 (r278781) @@ -99,6 +99,34 @@ gpiobus_print_pins(struct gpiobus_ivar * printf("%d", range_start); } +int +gpiobus_init_softc(device_t dev) +{ + struct gpiobus_softc *sc; + + sc = GPIOBUS_SOFTC(dev); + sc->sc_busdev = dev; + sc->sc_dev = device_get_parent(dev); + + if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) + return (ENXIO); + + KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); + + /* Pins = GPIO_PIN_MAX() + 1 */ + sc->sc_npins++; + + sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (sc->sc_pins_mapped == NULL) + return (ENOMEM); + + /* Initialize the bus lock. */ + GPIOBUS_LOCK_INIT(sc); + + return (0); +} + static int gpiobus_parse_pins(struct gpiobus_softc *sc, device_t child, int mask) { @@ -163,30 +191,11 @@ gpiobus_probe(device_t dev) static int gpiobus_attach(device_t dev) { - struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); - int res; - - sc->sc_busdev = dev; - sc->sc_dev = device_get_parent(dev); - res = GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins); - if (res) - return (ENXIO); - - KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); - - /* - * Increase to get number of pins - */ - sc->sc_npins++; - - sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - - if (!sc->sc_pins_mapped) - return (ENOMEM); + int err; - /* init bus lock */ - GPIOBUS_LOCK_INIT(sc); + err = gpiobus_init_softc(dev); + if (err != 0) + return (err); /* * Get parent's pins and mark them as unmapped Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:32:24 2015 (r278781) @@ -41,7 +41,12 @@ #include "gpio_if.h" +#ifdef FDT +#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) \ + &((struct ofw_gpiobus_devinfo *)device_get_ivars(d))->opd_dinfo +#else #define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) +#endif #define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) #define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -84,6 +89,7 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif void gpiobus_print_pins(struct gpiobus_ivar *); +int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:32:24 2015 (r278781) @@ -264,33 +264,13 @@ ofw_gpiobus_probe(device_t dev) static int ofw_gpiobus_attach(device_t dev) { - struct gpiobus_softc *sc; + int err; phandle_t child; - sc = GPIOBUS_SOFTC(dev); - sc->sc_busdev = dev; - sc->sc_dev = device_get_parent(dev); - - /* Read the pin max. value */ - if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) - return (ENXIO); - - KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); - - /* - * Increase to get number of pins. - */ - sc->sc_npins++; - - sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - - if (!sc->sc_pins_mapped) - return (ENOMEM); - - /* Init the bus lock. */ - GPIOBUS_LOCK_INIT(sc); - + err = gpiobus_init_softc(dev); + if (err != 0) + return (err); + bus_generic_probe(dev); bus_enumerate_hinted_children(dev); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:37:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E0DDCC; Sat, 14 Feb 2015 20:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241C42A2; Sat, 14 Feb 2015 20:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKbc29065700; Sat, 14 Feb 2015 20:37:38 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKbYuS065674; Sat, 14 Feb 2015 20:37:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142037.t1EKbYuS065674@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278782 - in stable/10/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/rockchip arm/samsung/exynos arm/ti arm/xilinx arm/xscale/ixp425 mips/at... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:37:38 -0000 Author: loos Date: Sat Feb 14 20:37:33 2015 New Revision: 278782 URL: https://svnweb.freebsd.org/changeset/base/278782 Log: MFC r273799: Make the GPIO children attach to the first unit available and not only to unit 0. This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first. Modified: stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/freescale/imx/imx_gpio.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/lpc/lpc_gpio.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/samsung/exynos/exynos5_pad.c stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/arm/xilinx/zy7_gpio.c stable/10/sys/arm/xscale/ixp425/avila_gpio.c stable/10/sys/arm/xscale/ixp425/cambria_gpio.c stable/10/sys/mips/atheros/ar71xx_gpio.c stable/10/sys/mips/cavium/octeon_gpio.c stable/10/sys/mips/rt305x/rt305x_gpio.c stable/10/sys/powerpc/wii/wii_gpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -474,8 +474,8 @@ a10_gpio_attach(device_t dev) } sc->sc_gpio_npins = i; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); a10_gpio_sc = sc; Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -747,8 +747,9 @@ bcm_gpio_attach(device_t dev) bcm_gpio_sysctl_init(sc); - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); fail: Modified: stable/10/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -435,8 +435,8 @@ imx51_gpio_attach(device_t dev) "imx_gpio%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -146,8 +146,8 @@ vf_gpio_attach(device_t dev) "vf_gpio%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/lpc/lpc_gpio.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/lpc/lpc_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -192,8 +192,8 @@ lpc_gpio_attach(device_t dev) lpc_gpio_sc = sc; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -504,8 +504,8 @@ rk30_gpio_attach(device_t dev) } sc->sc_gpio_npins = i; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); rk30_gpio_sc = sc; Modified: stable/10/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 20:37:33 2015 (r278782) @@ -441,8 +441,8 @@ pad_attach(device_t dev) "pad%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -822,8 +822,8 @@ ti_gpio_attach(device_t dev) } /* Finish of the probe call */ - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/xilinx/zy7_gpio.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xilinx/zy7_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -329,8 +329,8 @@ zy7_gpio_attach(device_t dev) /* Completely reset. */ zy7_gpio_hw_reset(sc); - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -318,8 +318,9 @@ avila_gpio_attach(device_t dev) sc->sc_valid |= 1 << p->pin; } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); #undef N } Modified: stable/10/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -447,8 +447,9 @@ cambria_gpio_attach(device_t dev) cambria_gpio_pin_setflags(dev, pin, p->flags); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -442,8 +442,9 @@ ar71xx_gpio_attach(device_t dev) if ((pinon & (1 << j)) != 0) ar71xx_gpio_pin_set(dev, j, 1); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/cavium/octeon_gpio.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -441,8 +441,9 @@ octeon_gpio_attach(device_t dev) } } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -511,9 +511,8 @@ rt305x_gpio_attach(device_t dev) } #endif - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); - + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/powerpc/wii/wii_gpio.c ============================================================================== --- stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -182,8 +182,8 @@ wiigpio_attach(device_t dev) "GPIO_PIN_INPUT" : "GPIO_PIN_OUTPUT"); #endif } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); /* * We will be responsible for powering off the system. */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:50:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFFE52F4; Sat, 14 Feb 2015 20:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B2F391; Sat, 14 Feb 2015 20:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKoeZg071822; Sat, 14 Feb 2015 20:50:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKodXN071813; Sat, 14 Feb 2015 20:50:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142050.t1EKodXN071813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278783 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:50:40 -0000 Author: loos Date: Sat Feb 14 20:50:38 2015 New Revision: 278783 URL: https://svnweb.freebsd.org/changeset/base/278783 Log: MFC r273917, r273926: Fix the gpiobus locking by using a more sane model where it isn't necessary hold the gpiobus lock between the gpio calls. gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus what to do when the bus is already busy. When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep until the bus became free. With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right away and then it can act upon. This fixes the gpioiic(4) locking issues that arises when doing multiple concurrent access on the bus. Fix the build of non-FDT systems by moving the gpiobusvar.h header outside the FDT #ifdef. While here remove a few unused headers. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobus_if.m stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/gpioiic.c stable/10/sys/dev/gpio/gpioled.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) @@ -53,9 +53,7 @@ static void gpiobus_hinted_child(device_ /* * GPIOBUS interface */ -static void gpiobus_lock_bus(device_t); -static void gpiobus_unlock_bus(device_t); -static void gpiobus_acquire_bus(device_t, device_t); +static int gpiobus_acquire_bus(device_t, device_t, int); static void gpiobus_release_bus(device_t, device_t); static int gpiobus_pin_setflags(device_t, device_t, uint32_t, uint32_t); static int gpiobus_pin_getflags(device_t, device_t, uint32_t, uint32_t*); @@ -326,37 +324,26 @@ gpiobus_hinted_child(device_t bus, const device_delete_child(bus, child); } -static void -gpiobus_lock_bus(device_t busdev) +static int +gpiobus_acquire_bus(device_t busdev, device_t child, int how) { struct gpiobus_softc *sc; sc = device_get_softc(busdev); GPIOBUS_ASSERT_UNLOCKED(sc); GPIOBUS_LOCK(sc); -} - -static void -gpiobus_unlock_bus(device_t busdev) -{ - struct gpiobus_softc *sc; - - sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); + if (sc->sc_owner != NULL) { + if (how == GPIOBUS_DONTWAIT) { + GPIOBUS_UNLOCK(sc); + return (EWOULDBLOCK); + } + while (sc->sc_owner != NULL) + mtx_sleep(sc, &sc->sc_mtx, 0, "gpiobuswait", 0); + } + sc->sc_owner = child; GPIOBUS_UNLOCK(sc); -} -static void -gpiobus_acquire_bus(device_t busdev, device_t child) -{ - struct gpiobus_softc *sc; - - sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); - - if (sc->sc_owner) - panic("gpiobus: cannot serialize the access to device."); - sc->sc_owner = child; + return (0); } static void @@ -365,14 +352,15 @@ gpiobus_release_bus(device_t busdev, dev struct gpiobus_softc *sc; sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); - - if (!sc->sc_owner) + GPIOBUS_ASSERT_UNLOCKED(sc); + GPIOBUS_LOCK(sc); + if (sc->sc_owner == NULL) panic("gpiobus: releasing unowned bus."); if (sc->sc_owner != child) panic("gpiobus: you don't own the bus. game over."); - sc->sc_owner = NULL; + wakeup(sc); + GPIOBUS_UNLOCK(sc); } static int @@ -469,8 +457,6 @@ static device_method_t gpiobus_methods[] DEVMETHOD(bus_hinted_child, gpiobus_hinted_child), /* GPIO protocol */ - DEVMETHOD(gpiobus_lock_bus, gpiobus_lock_bus), - DEVMETHOD(gpiobus_unlock_bus, gpiobus_unlock_bus), DEVMETHOD(gpiobus_acquire_bus, gpiobus_acquire_bus), DEVMETHOD(gpiobus_release_bus, gpiobus_release_bus), DEVMETHOD(gpiobus_pin_getflags, gpiobus_pin_getflags), Modified: stable/10/sys/dev/gpio/gpiobus_if.m ============================================================================== --- stable/10/sys/dev/gpio/gpiobus_if.m Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobus_if.m Sat Feb 14 20:50:38 2015 (r278783) @@ -32,25 +32,12 @@ INTERFACE gpiobus; # -# Lock the gpio bus -# -METHOD void lock_bus { - device_t busdev; -}; - -# -# Unlock the gpio bus -# -METHOD void unlock_bus { - device_t busdev; -}; - -# # Dedicate the gpio bus control for a child # -METHOD void acquire_bus { +METHOD int acquire_bus { device_t busdev; device_t dev; + int how; }; # Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:50:38 2015 (r278783) @@ -56,6 +56,9 @@ #define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) #define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) +#define GPIOBUS_WAIT 1 +#define GPIOBUS_DONTWAIT 2 + struct gpiobus_softc { struct mtx sc_mtx; /* bus mutex */ Modified: stable/10/sys/dev/gpio/gpioiic.c ============================================================================== --- stable/10/sys/dev/gpio/gpioiic.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpioiic.c Sat Feb 14 20:50:38 2015 (r278783) @@ -154,18 +154,18 @@ static int gpioiic_callback(device_t dev, int index, caddr_t data) { struct gpioiic_softc *sc = device_get_softc(dev); - int error = 0; + int error, how; + how = GPIOBUS_DONTWAIT; + if (data != NULL && (int)*data == IIC_WAIT) + how = GPIOBUS_WAIT; + error = 0; switch (index) { case IIC_REQUEST_BUS: - GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); + error = GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev, how); break; case IIC_RELEASE_BUS: - GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); break; default: error = EINVAL; Modified: stable/10/sys/dev/gpio/gpioled.c ============================================================================== --- stable/10/sys/dev/gpio/gpioled.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpioled.c Sat Feb 14 20:50:38 2015 (r278783) @@ -31,11 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include +#include #include -#include #include #include #include @@ -43,12 +41,12 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include -#include #include #endif +#include #include -#include + #include "gpiobus_if.h" /* @@ -79,16 +77,23 @@ static int gpioled_detach(device_t); static void gpioled_control(void *priv, int onoff) { - struct gpioled_softc *sc = priv; + int error; + struct gpioled_softc *sc; + + sc = (struct gpioled_softc *)priv; GPIOLED_LOCK(sc); - GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - GPIO_PIN_OUTPUT); - GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); + error = GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev, + GPIOBUS_DONTWAIT); + if (error != 0) { + GPIOLED_UNLOCK(sc); + return; + } + error = GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, + GPIOLED_PIN, GPIO_PIN_OUTPUT); + if (error == 0) + GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, + onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); GPIOLED_UNLOCK(sc); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 20:57:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCEDD48C; Sat, 14 Feb 2015 20:57:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA6E646; Sat, 14 Feb 2015 20:57:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKvSDV075463; Sat, 14 Feb 2015 20:57:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKvSSu075459; Sat, 14 Feb 2015 20:57:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142057.t1EKvSSu075459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278784 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:57:29 -0000 Author: loos Date: Sat Feb 14 20:57:27 2015 New Revision: 278784 URL: https://svnweb.freebsd.org/changeset/base/278784 Log: MFC r274638: Add basic interrupt management code to gpiobus and ofw_gpiobus. This is the general support to allow the use of GPIO pins as interrupt sources for direct gpiobus children. The use of GPIO pins as generic interrupt sources (for an ethernet driver for example) will only be possible when arm/intrng is complete. Then, most of this code will need to be rewritten, but it works for now, is better than what we have and will allow further developments. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) @@ -38,6 +38,13 @@ __FBSDID("$FreeBSD$"); #include "gpiobus_if.h" +#undef GPIOBUS_DEBUG +#ifdef GPIOBUS_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif + static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -105,6 +112,11 @@ gpiobus_init_softc(device_t dev) sc = GPIOBUS_SOFTC(dev); sc->sc_busdev = dev; sc->sc_dev = device_get_parent(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "GPIO Interrupts"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0) + panic("%s: failed to set up rman.", __func__); if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) return (ENXIO); @@ -267,6 +279,7 @@ gpiobus_print_child(device_t dev, device retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(devi); + resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); return (retval); @@ -304,7 +317,9 @@ gpiobus_add_child(device_t dev, u_int or device_delete_child(dev, child); return (0); } + resource_list_init(&devi->rl); device_set_ivars(child, devi); + return (child); } @@ -314,14 +329,103 @@ gpiobus_hinted_child(device_t bus, const struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); struct gpiobus_ivar *devi; device_t child; - int pins; - + int irq, pins; child = BUS_ADD_CHILD(bus, 0, dname, dunit); devi = GPIOBUS_IVAR(child); resource_int_value(dname, dunit, "pins", &pins); if (gpiobus_parse_pins(sc, child, pins)) device_delete_child(bus, child); + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + +static int +gpiobus_set_resource(device_t dev, device_t child, int type, int rid, + u_long start, u_long count) +{ + struct gpiobus_ivar *devi; + struct resource_list_entry *rle; + + dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", + __func__, dev, child, type, rid, (void *)(intptr_t)start, count); + devi = GPIOBUS_IVAR(child); + rle = resource_list_add(&devi->rl, type, rid, start, + start + count - 1, count); + if (rle == NULL) + return (ENXIO); + + return (0); +} + +static struct resource * +gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct gpiobus_softc *sc; + struct resource *rv; + struct resource_list *rl; + struct resource_list_entry *rle; + int isdefault; + + if (type != SYS_RES_IRQ) + return (NULL); + isdefault = (start == 0UL && end == ~0UL && count == 1); + rle = NULL; + if (isdefault) { + rl = BUS_GET_RESOURCE_LIST(bus, child); + if (rl == NULL) + return (NULL); + rle = resource_list_find(rl, type, *rid); + if (rle == NULL) + return (NULL); + if (rle->res != NULL) + panic("%s: resource entry is busy", __func__); + start = rle->start; + count = rle->count; + end = rle->end; + } + sc = device_get_softc(bus); + rv = rman_reserve_resource(&sc->sc_intr_rman, start, end, count, flags, + child); + if (rv == NULL) + return (NULL); + rman_set_rid(rv, *rid); + if ((flags & RF_ACTIVE) != 0 && + bus_activate_resource(child, type, *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } + + return (rv); +} + +static int +gpiobus_release_resource(device_t bus __unused, device_t child, int type, + int rid, struct resource *r) +{ + int error; + + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + + return (rman_release_resource(r)); +} + +static struct resource_list * +gpiobus_get_resource_list(device_t bus __unused, device_t child) +{ + struct gpiobus_ivar *ivar; + + ivar = GPIOBUS_IVAR(child); + + return (&ivar->rl); } static int @@ -450,6 +554,15 @@ static device_method_t gpiobus_methods[] DEVMETHOD(device_resume, gpiobus_resume), /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_config_intr, bus_generic_config_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_set_resource, gpiobus_set_resource), + DEVMETHOD(bus_alloc_resource, gpiobus_alloc_resource), + DEVMETHOD(bus_release_resource, gpiobus_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource_list, gpiobus_get_resource_list), DEVMETHOD(bus_add_child, gpiobus_add_child), DEVMETHOD(bus_print_child, gpiobus_print_child), DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:57:27 2015 (r278784) @@ -34,6 +34,7 @@ #include #include +#include #ifdef FDT #include @@ -62,6 +63,7 @@ struct gpiobus_softc { struct mtx sc_mtx; /* bus mutex */ + struct rman sc_intr_rman; /* isr resources */ device_t sc_busdev; /* bus device */ device_t sc_owner; /* bus owner */ device_t sc_dev; /* driver device */ @@ -71,6 +73,7 @@ struct gpiobus_softc struct gpiobus_ivar { + struct resource_list rl; /* isr resource list */ uint32_t npins; /* pins total */ uint32_t *flags; /* pins flags */ uint32_t *pins; /* pins map */ Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) @@ -238,6 +238,13 @@ ofw_gpiobus_setup_devinfo(device_t dev, free(dinfo, M_DEVBUF); return (NULL); } + /* And now the interrupt resources. */ + resource_list_init(&dinfo->opd_dinfo.rl); + if (ofw_bus_intr_to_rl(dev, node, &dinfo->opd_dinfo.rl) != 0) { + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + free(dinfo, M_DEVBUF); + return (NULL); + } return (dinfo); } @@ -246,6 +253,7 @@ static void ofw_gpiobus_destroy_devinfo(struct ofw_gpiobus_devinfo *dinfo) { + resource_list_free(&dinfo->opd_dinfo.rl); ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); free(dinfo, M_DEVBUF); } @@ -326,6 +334,8 @@ ofw_gpiobus_print_child(device_t dev, de retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(&devi->opd_dinfo); + resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, + "%ld"); retval += bus_print_child_footer(dev, child); return (retval); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 21:02:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2BF3627; Sat, 14 Feb 2015 21:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A331474F; Sat, 14 Feb 2015 21:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EL2YN1079786; Sat, 14 Feb 2015 21:02:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EL2XMS079782; Sat, 14 Feb 2015 21:02:33 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142102.t1EL2XMS079782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 21:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278785 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 21:02:34 -0000 Author: loos Date: Sat Feb 14 21:02:33 2015 New Revision: 278785 URL: https://svnweb.freebsd.org/changeset/base/278785 Log: MFC r274642, 274643: Remove unnecessary code. After r273566, the gpiobus version of bus_print_child() also works on FDT systems. Fix gpiobus_child_location_str() to return a real string with the mapped pins. Make gpiobus_print_pins() static again. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #define dprintf(x, arg...) #endif +static void gpiobus_print_pins(struct gpiobus_ivar *, char *, size_t); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -69,11 +70,11 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -void -gpiobus_print_pins(struct gpiobus_ivar *devi) +static void +gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { - int range_start, range_stop, need_coma; - int i; + char tmp[128]; + int i, range_start, range_stop, need_coma; if (devi->npins == 0) return; @@ -83,11 +84,15 @@ gpiobus_print_pins(struct gpiobus_ivar * for (i = 1; i < devi->npins; i++) { if (devi->pins[i] != (range_stop + 1)) { if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); range_start = range_stop = devi->pins[i]; need_coma = 1; @@ -97,11 +102,15 @@ gpiobus_print_pins(struct gpiobus_ivar * } if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); } int @@ -273,12 +282,16 @@ gpiobus_resume(device_t dev) static int gpiobus_print_child(device_t dev, device_t child) { - struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + char pins[128]; int retval = 0; + struct gpiobus_ivar *devi; + devi = GPIOBUS_IVAR(child); + memset(pins, 0, sizeof(pins)); retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); - gpiobus_print_pins(devi); + gpiobus_print_pins(devi, pins, sizeof(pins)); + retval += printf("%s", pins); resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); @@ -289,8 +302,12 @@ static int gpiobus_child_location_str(device_t bus, device_t child, char *buf, size_t buflen) { + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + strlcpy(buf, "pin(s)=", buflen); + gpiobus_print_pins(devi, buf, buflen); - snprintf(buf, buflen, "pins=?"); return (0); } Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:02:33 2015 (r278785) @@ -94,7 +94,6 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif -void gpiobus_print_pins(struct gpiobus_ivar *); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) @@ -324,23 +324,6 @@ ofw_gpiobus_add_child(device_t dev, u_in return (child); } -static int -ofw_gpiobus_print_child(device_t dev, device_t child) -{ - struct ofw_gpiobus_devinfo *devi; - int retval = 0; - - devi = device_get_ivars(child); - retval += bus_print_child_header(dev, child); - retval += printf(" at pin(s) "); - gpiobus_print_pins(&devi->opd_dinfo); - resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, - "%ld"); - retval += bus_print_child_footer(dev, child); - - return (retval); -} - static const struct ofw_bus_devinfo * ofw_gpiobus_get_devinfo(device_t bus, device_t dev) { @@ -358,7 +341,6 @@ static device_method_t ofw_gpiobus_metho /* Bus interface */ DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - DEVMETHOD(bus_print_child, ofw_gpiobus_print_child), DEVMETHOD(bus_add_child, ofw_gpiobus_add_child), /* ofw_bus interface */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 21:16:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B42B7EC; Sat, 14 Feb 2015 21:16:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82252834; Sat, 14 Feb 2015 21:16:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ELGOKX085078; Sat, 14 Feb 2015 21:16:24 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ELGJGa085048; Sat, 14 Feb 2015 21:16:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142116.t1ELGJGa085048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 21:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278786 - in stable/10/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/rockchip arm/samsung/exynos arm/ti arm/xscale/ixp425 dev/gpio mips/atheros mips... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 21:16:24 -0000 Author: loos Date: Sat Feb 14 21:16:19 2015 New Revision: 278786 URL: https://svnweb.freebsd.org/changeset/base/278786 Log: MFC r274670, r274671, r276168: Moves all the duplicate code to a single function. Verify for invalid modes and unwanted flags before pass the new flags to driver. Make gpio_default_map_gpios() static. No functional changes. Improves the GPIO API description a little bit. gpio_pin_max must return the maximum supported pin number and not the total number of pins on the system. Modified: stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/freescale/imx/imx_gpio.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/samsung/exynos/exynos5_pad.c stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/arm/xscale/ixp425/avila_gpio.c stable/10/sys/arm/xscale/ixp425/cambria_gpio.c stable/10/sys/dev/gpio/gpio_if.m stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/gpioc.c stable/10/sys/mips/atheros/ar71xx_gpio.c stable/10/sys/mips/cavium/octeon_gpio.c stable/10/sys/mips/rt305x/rt305x_gpio.c stable/10/sys/powerpc/wii/wii_gpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -302,20 +302,6 @@ a10_gpio_pin_setflags(device_t dev, uint if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - a10_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -399,20 +399,6 @@ bcm_gpio_pin_setflags(device_t dev, uint if (bcm_gpio_pin_is_ro(sc, pin)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - bcm_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -268,18 +268,8 @@ imx51_gpio_pin_setflags(device_t dev, ui if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - imx51_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: stable/10/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -312,15 +312,6 @@ vf_gpio_pin_setflags(device_t dev, uint3 if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - vf_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -318,20 +318,6 @@ rk30_gpio_pin_setflags(device_t dev, uin if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - rk30_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 21:16:19 2015 (r278786) @@ -643,15 +643,6 @@ pad_pin_setflags(device_t dev, uint32_t if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - pad_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -456,16 +456,6 @@ ti_gpio_pin_setflags(device_t dev, uint3 uint32_t mask = (1UL << (pin % PINS_PER_BANK)); uint32_t reg_val; - /* Sanity check the flags supplied are valid, i.e. not input and output */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == 0x0000) - return (EINVAL); - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - TI_GPIO_LOCK(sc); /* Sanity check the pin number is valid */ Modified: stable/10/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -220,16 +220,8 @@ avila_gpio_pin_setflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - avila_gpio_pin_configure(sc, &sc->sc_pins[pin], flags); + return (0); } Modified: stable/10/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -317,15 +317,6 @@ cambria_gpio_pin_setflags(device_t dev, if (pin >= GPIO_PINS) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - GPIO_LOCK(sc); sc->sc_pins[pin].gp_flags = flags; Modified: stable/10/sys/dev/gpio/gpio_if.m ============================================================================== --- stable/10/sys/dev/gpio/gpio_if.m Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpio_if.m Sat Feb 14 21:16:19 2015 (r278786) @@ -32,9 +32,7 @@ INTERFACE gpio; CODE { - static gpio_map_gpios_t gpio_default_map_gpios; - - int + static int gpio_default_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) @@ -58,11 +56,11 @@ HEADER { }; # -# Get total number of pins +# Get maximum pin number # METHOD int pin_max { device_t dev; - int *npins; + int *maxpin; }; # Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:16:19 2015 (r278786) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,6 +71,23 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); +int +gpio_check_flags(uint32_t caps, uint32_t flags) +{ + + /* Check for unwanted flags. */ + if ((flags & caps) == 0 || (flags & caps) != flags) + return (EINVAL); + /* Cannot mix input/output together. */ + if (flags & GPIO_PIN_INPUT && flags & GPIO_PIN_OUTPUT) + return (EINVAL); + /* Cannot mix pull-up/pull-down together. */ + if (flags & GPIO_PIN_PULLUP && flags & GPIO_PIN_PULLDOWN) + return (EINVAL); + + return (0); +} + static void gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { @@ -490,11 +508,16 @@ gpiobus_pin_setflags(device_t dev, devic { struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + uint32_t caps; if (pin >= devi->npins) return (EINVAL); + if (GPIO_PIN_GETCAPS(sc->sc_dev, devi->pins[pin], &caps) != 0) + return (EINVAL); + if (gpio_check_flags(caps, flags) != 0) + return (EINVAL); - return GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags); + return (GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags)); } static int Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:16:19 2015 (r278786) @@ -94,6 +94,7 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif +int gpio_check_flags(uint32_t, uint32_t); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/gpioc.c ============================================================================== --- stable/10/sys/dev/gpio/gpioc.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpioc.c Sat Feb 14 21:16:19 2015 (r278786) @@ -29,19 +29,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include +#include #include #include #include #include -#include -#include -#include -#include +#include + #include "gpio_if.h" #undef GPIOC_DEBUG @@ -119,6 +116,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cm struct gpioc_softc *sc = cdev->si_drv1; struct gpio_pin pin; struct gpio_req req; + uint32_t caps; switch (cmd) { case GPIOMAXPIN: @@ -141,8 +139,12 @@ gpioc_ioctl(struct cdev *cdev, u_long cm case GPIOSETCONFIG: bcopy(arg, &pin, sizeof(pin)); dprintf("set config pin %d\n", pin.gp_pin); - res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, - pin.gp_flags); + res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); + if (res == 0) + res = gpio_check_flags(caps, pin.gp_flags); + if (res == 0) + res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, + pin.gp_flags); break; case GPIOGET: bcopy(arg, &req, sizeof(req)); Modified: stable/10/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -241,16 +241,8 @@ ar71xx_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: stable/10/sys/mips/cavium/octeon_gpio.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -219,16 +219,8 @@ octeon_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: stable/10/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -242,18 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - rt305x_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: stable/10/sys/powerpc/wii/wii_gpio.c ============================================================================== --- stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -295,11 +295,6 @@ wiigpio_pin_setflags(device_t dev, uint3 if (pin >= WIIGPIO_NPINS) return (EINVAL); - if ((flags & ~(GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) != 0) - return (EINVAL); - if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == - (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) - return (EINVAL); sc = device_get_softc(dev); pinbank = WIIGPIO_PINBANK(pin); pinmask = WIIGPIO_PINMASK(pin); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 22:12:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71A70475; Sat, 14 Feb 2015 22:12:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BE15D71; Sat, 14 Feb 2015 22:12:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EMCJlt013408; Sat, 14 Feb 2015 22:12:19 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EMCI8w013399; Sat, 14 Feb 2015 22:12:18 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201502142212.t1EMCI8w013399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sat, 14 Feb 2015 22:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278787 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 22:12:19 -0000 Author: grembo (ports committer) Date: Sat Feb 14 22:12:17 2015 New Revision: 278787 URL: https://svnweb.freebsd.org/changeset/base/278787 Log: Quirk based support of Chromebook keyboard found in Acer C720 This probably supports other devices based on SeaBIOS, which need to be added to the smbios based quirks table. The functionality has been ported from DragonFlyBSD and adapted to FreeBSD's more general purpose environment. Devices not covered by a quirk shouldn't be affected at all. Thanks to jhb and kostikbel for reviewing the code. Reviewed by: kostikbel, jhb Approved by: jhb, kostikbel Differential Revision: https://reviews.freebsd.org/D1802 Modified: head/sys/dev/atkbdc/atkbd.c head/sys/dev/atkbdc/atkbdc.c head/sys/dev/atkbdc/atkbdcreg.h head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/atkbd.c ============================================================================== --- head/sys/dev/atkbdc/atkbd.c Sat Feb 14 21:16:19 2015 (r278786) +++ head/sys/dev/atkbdc/atkbd.c Sat Feb 14 22:12:17 2015 (r278787) @@ -77,6 +77,10 @@ typedef struct atkbd_state { static void atkbd_timeout(void *arg); static void atkbd_shutdown_final(void *v); +static int atkbd_reset(KBDC kbdc, int flags, int c); + +#define HAS_QUIRK(p, q) (((atkbdc_softc_t *)(p))->quirks & q) +#define ALLOW_DISABLE_KBD(kbdc) !HAS_QUIRK(kbdc, KBDC_QUIRK_KEEP_ACTIVATED) int atkbd_probe_unit(device_t dev, int irq, int flags) @@ -1095,6 +1099,39 @@ atkbd_shutdown_final(void *v) #endif } +static int +atkbd_reset(KBDC kbdc, int flags, int c) +{ + /* reset keyboard hardware */ + if (!(flags & KB_CONF_NO_RESET) && !reset_kbd(kbdc)) { + /* + * KEYBOARD ERROR + * Keyboard reset may fail either because the keyboard + * doen't exist, or because the keyboard doesn't pass + * the self-test, or the keyboard controller on the + * motherboard and the keyboard somehow fail to shake hands. + * It is just possible, particularly in the last case, + * that the keyboard controller may be left in a hung state. + * test_controller() and test_kbd_port() appear to bring + * the keyboard controller back (I don't know why and how, + * though.) + */ + empty_both_buffers(kbdc, 10); + test_controller(kbdc); + test_kbd_port(kbdc); + /* + * We could disable the keyboard port and interrupt... but, + * the keyboard may still exist (see above). + */ + set_controller_command_byte(kbdc, + ALLOW_DISABLE_KBD(kbdc) ? 0xff : KBD_KBD_CONTROL_BITS, c); + if (bootverbose) + printf("atkbd: failed to reset the keyboard.\n"); + return (EIO); + } + return (0); +} + /* local functions */ static int @@ -1250,13 +1287,14 @@ probe_keyboard(KBDC kbdc, int flags) kbdc_set_device_mask(kbdc, m | KBD_KBD_CONTROL_BITS); } else { /* try to restore the command byte as before */ - set_controller_command_byte(kbdc, 0xff, c); + set_controller_command_byte(kbdc, + ALLOW_DISABLE_KBD(kbdc) ? 0xff : KBD_KBD_CONTROL_BITS, c); kbdc_set_device_mask(kbdc, m); } #endif kbdc_lock(kbdc, FALSE); - return err; + return (HAS_QUIRK(kbdc, KBDC_QUIRK_IGNORE_PROBE_RESULT) ? 0 : err); } static int @@ -1299,6 +1337,12 @@ init_keyboard(KBDC kbdc, int *type, int return EIO; } + if (HAS_QUIRK(kbdc, KBDC_QUIRK_RESET_AFTER_PROBE) && + atkbd_reset(kbdc, flags, c)) { + kbdc_lock(kbdc, FALSE); + return EIO; + } + /* * Check if we have an XT keyboard before we attempt to reset it. * The procedure assumes that the keyboard and the controller have @@ -1343,31 +1387,9 @@ init_keyboard(KBDC kbdc, int *type, int if (bootverbose) printf("atkbd: keyboard ID 0x%x (%d)\n", id, *type); - /* reset keyboard hardware */ - if (!(flags & KB_CONF_NO_RESET) && !reset_kbd(kbdc)) { - /* - * KEYBOARD ERROR - * Keyboard reset may fail either because the keyboard - * doen't exist, or because the keyboard doesn't pass - * the self-test, or the keyboard controller on the - * motherboard and the keyboard somehow fail to shake hands. - * It is just possible, particularly in the last case, - * that the keyboard controller may be left in a hung state. - * test_controller() and test_kbd_port() appear to bring - * the keyboard controller back (I don't know why and how, - * though.) - */ - empty_both_buffers(kbdc, 10); - test_controller(kbdc); - test_kbd_port(kbdc); - /* - * We could disable the keyboard port and interrupt... but, - * the keyboard may still exist (see above). - */ - set_controller_command_byte(kbdc, 0xff, c); + if (!HAS_QUIRK(kbdc, KBDC_QUIRK_RESET_AFTER_PROBE) && + atkbd_reset(kbdc, flags, c)) { kbdc_lock(kbdc, FALSE); - if (bootverbose) - printf("atkbd: failed to reset the keyboard.\n"); return EIO; } @@ -1387,7 +1409,8 @@ init_keyboard(KBDC kbdc, int *type, int * The XT kbd isn't usable unless the proper scan * code set is selected. */ - set_controller_command_byte(kbdc, 0xff, c); + set_controller_command_byte(kbdc, ALLOW_DISABLE_KBD(kbdc) + ? 0xff : KBD_KBD_CONTROL_BITS, c); kbdc_lock(kbdc, FALSE); printf("atkbd: unable to set the XT keyboard mode.\n"); return EIO; @@ -1402,6 +1425,17 @@ init_keyboard(KBDC kbdc, int *type, int c |= KBD_TRANSLATION; #endif + /* + * Some keyboards require a SETLEDS command to be sent after + * the reset command before they will send keystrokes to us + */ + if (HAS_QUIRK(kbdc, KBDC_QUIRK_SETLEDS_ON_INIT) && + send_kbd_command_and_data(kbdc, KBDC_SET_LEDS, 0) != KBD_ACK) { + printf("atkbd: setleds failed\n"); + } + if (!ALLOW_DISABLE_KBD(kbdc)) + send_kbd_command(kbdc, KBDC_ENABLE_KBD); + /* enable the keyboard port and intr. */ if (!set_controller_command_byte(kbdc, KBD_KBD_CONTROL_BITS | KBD_TRANSLATION | KBD_OVERRIDE_KBD_LOCK, @@ -1412,7 +1446,9 @@ init_keyboard(KBDC kbdc, int *type, int * This is serious; we are left with the disabled * keyboard intr. */ - set_controller_command_byte(kbdc, 0xff, c); + set_controller_command_byte(kbdc, ALLOW_DISABLE_KBD(kbdc) + ? 0xff : (KBD_KBD_CONTROL_BITS | KBD_TRANSLATION | + KBD_OVERRIDE_KBD_LOCK), c); kbdc_lock(kbdc, FALSE); printf("atkbd: unable to enable the keyboard port and intr.\n"); return EIO; Modified: head/sys/dev/atkbdc/atkbdc.c ============================================================================== --- head/sys/dev/atkbdc/atkbdc.c Sat Feb 14 21:16:19 2015 (r278786) +++ head/sys/dev/atkbdc/atkbdc.c Sat Feb 14 22:12:17 2015 (r278787) @@ -114,6 +114,41 @@ static int wait_for_kbd_ack(atkbdc_softc static int wait_for_aux_data(atkbdc_softc_t *kbdc); static int wait_for_aux_ack(atkbdc_softc_t *kbdc); +struct atkbdc_quirks { + const char* bios_vendor; + const char* maker; + const char* product; + int quirk; +}; + +static struct atkbdc_quirks quirks[] = { + {"coreboot", "Acer", "Peppy", + KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | + KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT}, + + {NULL, NULL, NULL, 0} +}; + +#define QUIRK_STR_MATCH(s1, s2) (s1 == NULL || \ + (s2 != NULL && !strcmp(s1, s2))) + +static int +atkbdc_getquirks(void) +{ + int i; + char* bios_vendor = kern_getenv("smbios.bios.vendor"); + char* maker = kern_getenv("smbios.system.maker"); + char* product = kern_getenv("smbios.system.product"); + + for (i=0; quirks[i].quirk != 0; ++i) + if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) && + QUIRK_STR_MATCH(quirks[i].maker, maker) && + QUIRK_STR_MATCH(quirks[i].product, product)) + return (quirks[i].quirk); + + return (0); +} + atkbdc_softc_t *atkbdc_get_softc(int unit) { @@ -295,6 +330,7 @@ atkbdc_setup(atkbdc_softc_t *sc, bus_spa #else sc->retry = 5000; #endif + sc->quirks = atkbdc_getquirks(); return 0; } @@ -1124,7 +1160,8 @@ void kbdc_set_device_mask(KBDC p, int mask) { kbdcp(p)->command_mask = - mask & (KBD_KBD_CONTROL_BITS | KBD_AUX_CONTROL_BITS); + mask & (((kbdcp(p)->quirks & KBDC_QUIRK_KEEP_ACTIVATED) + ? 0 : KBD_KBD_CONTROL_BITS) | KBD_AUX_CONTROL_BITS); } int Modified: head/sys/dev/atkbdc/atkbdcreg.h ============================================================================== --- head/sys/dev/atkbdc/atkbdcreg.h Sat Feb 14 21:16:19 2015 (r278786) +++ head/sys/dev/atkbdc/atkbdcreg.h Sat Feb 14 22:12:17 2015 (r278787) @@ -202,6 +202,11 @@ typedef struct atkbdc_softc { kqueue kbd; /* keyboard data queue */ kqueue aux; /* auxiliary data queue */ int retry; + int quirks; /* controller doesn't like deactivate */ +#define KBDC_QUIRK_KEEP_ACTIVATED (1 << 0) +#define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1) +#define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2) +#define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3) } atkbdc_softc_t; enum kbdc_device_ivar { Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sat Feb 14 21:16:19 2015 (r278786) +++ head/sys/dev/atkbdc/psm.c Sat Feb 14 22:12:17 2015 (r278787) @@ -371,6 +371,10 @@ static devclass_t psm_devclass; /* other flags (flags) */ #define PSM_FLAGS_FINGERDOWN 0x0001 /* VersaPad finger down */ +#define kbdcp(p) ((atkbdc_softc_t *)(p)) +#define ALWAYS_RESTORE_CONTROLLER(kbdc) !(kbdcp(kbdc)->quirks \ + & KBDC_QUIRK_KEEP_ACTIVATED) + /* Tunables */ static int tap_enabled = -1; TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled); @@ -1231,7 +1235,8 @@ psmprobe(device_t dev) * this is CONTROLLER ERROR; I don't know how to recover * from this error... */ - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); printf("psm%d: unable to set the command byte.\n", unit); endprobe(ENXIO); } @@ -1270,7 +1275,8 @@ psmprobe(device_t dev) recover_from_error(sc->kbdc); if (sc->config & PSM_CONFIG_IGNPORTERROR) break; - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: the aux port is not functioning (%d).\n", unit, i); @@ -1293,7 +1299,8 @@ psmprobe(device_t dev) */ if (!reset_aux_dev(sc->kbdc)) { recover_from_error(sc->kbdc); - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: failed to reset the aux " "device.\n", unit); @@ -1315,7 +1322,8 @@ psmprobe(device_t dev) if (!enable_aux_dev(sc->kbdc) || !disable_aux_dev(sc->kbdc)) { /* MOUSE ERROR */ recover_from_error(sc->kbdc); - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: failed to enable the aux device.\n", unit); @@ -1337,7 +1345,8 @@ psmprobe(device_t dev) /* verify the device is a mouse */ sc->hw.hwid = get_aux_id(sc->kbdc); if (!is_a_mouse(sc->hw.hwid)) { - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: unknown device type (%d).\n", unit, sc->hw.hwid); @@ -1443,7 +1452,8 @@ psmprobe(device_t dev) * this is CONTROLLER ERROR; I don't know the proper way to * recover from this error... */ - restore_controller(sc->kbdc, command_byte); + if (ALWAYS_RESTORE_CONTROLLER(sc->kbdc)) + restore_controller(sc->kbdc, command_byte); printf("psm%d: unable to set the command byte.\n", unit); endprobe(ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 23:25:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5223EAD; Sat, 14 Feb 2015 23:25:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E13D3B0; Sat, 14 Feb 2015 23:25:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ENPe3x046633; Sat, 14 Feb 2015 23:25:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENPeJJ046632; Sat, 14 Feb 2015 23:25:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142325.t1ENPeJJ046632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278788 - in stable: 10/contrib/llvm/tools/clang/lib/Serialization 9/contrib/llvm/tools/clang/lib/Serialization X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:25:40 -0000 Author: dim Date: Sat Feb 14 23:25:39 2015 New Revision: 278788 URL: https://svnweb.freebsd.org/changeset/base/278788 Log: Pull in r201130 from upstream clang trunk (by Ted Kremenek): Fix PCH deserialization bug with local static symbols being treated as local extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes and . This fixes a crash in audio/murmur, which is using both PCH and Boost. Direct commit to stable/10 and stable/9, since head has clang 3.5.1, which already includes this change. Reported by: smh PR: 197389 Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 22:12:17 2015 (r278787) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 23:25:39 2015 (r278788) @@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec VD->setCachedLinkage(VarLinkage); // Reconstruct the one piece of the IdentifierNamespace that we need. - if (VarLinkage != NoLinkage && + if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && VD->getLexicalDeclContext()->isFunctionOrMethod()) VD->setLocalExternDecl(); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 23:25:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5975BEAE; Sat, 14 Feb 2015 23:25:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42D283B1; Sat, 14 Feb 2015 23:25:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ENPfgN046639; Sat, 14 Feb 2015 23:25:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENPfY4046638; Sat, 14 Feb 2015 23:25:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142325.t1ENPfY4046638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278788 - in stable: 10/contrib/llvm/tools/clang/lib/Serialization 9/contrib/llvm/tools/clang/lib/Serialization X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:25:41 -0000 Author: dim Date: Sat Feb 14 23:25:39 2015 New Revision: 278788 URL: https://svnweb.freebsd.org/changeset/base/278788 Log: Pull in r201130 from upstream clang trunk (by Ted Kremenek): Fix PCH deserialization bug with local static symbols being treated as local extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes and . This fixes a crash in audio/murmur, which is using both PCH and Boost. Direct commit to stable/10 and stable/9, since head has clang 3.5.1, which already includes this change. Reported by: smh PR: 197389 Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Changes in other areas also in this revision: Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 22:12:17 2015 (r278787) +++ stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 23:25:39 2015 (r278788) @@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec VD->setCachedLinkage(VarLinkage); // Reconstruct the one piece of the IdentifierNamespace that we need. - if (VarLinkage != NoLinkage && + if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && VD->getLexicalDeclContext()->isFunctionOrMethod()) VD->setLocalExternDecl(); From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 23:28:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 915C520F; Sat, 14 Feb 2015 23:28:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AE843D7; Sat, 14 Feb 2015 23:28:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ENSAdY047021; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENSA4K047020; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142328.t1ENSA4K047020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278789 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:28:10 -0000 Author: dim Date: Sat Feb 14 23:28:09 2015 New Revision: 278789 URL: https://svnweb.freebsd.org/changeset/base/278789 Log: Add clang patches corresponding to r278788. Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Sat Feb 14 23:28:09 2015 (r278789) @@ -0,0 +1,67 @@ +Pull in r201130 from upstream clang trunk (by Ted Kremenek): + + Fix PCH deserialization bug with local static symbols being treated + as local extern. + + This triggered a miscompilation of code using Boost's + function_template.hpp when it was included inside a PCH file. A + local static within that header would be treated as local extern, + resulting in the wrong mangling. This only occurred during PCH + deserialization. + + Fixes and . + +This fixes a crash in audio/murmur, which is using both PCH and Boost. + +Introduced here: http://svnweb.freebsd.org/changeset/base/278788 + +Index: tools/clang/lib/Serialization/ASTReaderDecl.cpp +=================================================================== +--- tools/clang/lib/Serialization/ASTReaderDecl.cpp ++++ tools/clang/lib/Serialization/ASTReaderDecl.cpp +@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::V + VD->setCachedLinkage(VarLinkage); + + // Reconstruct the one piece of the IdentifierNamespace that we need. +- if (VarLinkage != NoLinkage && ++ if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && + VD->getLexicalDeclContext()->isFunctionOrMethod()) + VD->setLocalExternDecl(); + +Index: tools/clang/test/PCH/local_static.cpp +=================================================================== +--- tools/clang/test/PCH/local_static.cpp ++++ tools/clang/test/PCH/local_static.cpp +@@ -0,0 +1,20 @@ ++// Test this without PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s ++// RUN: FileCheck --input-file %t.no_pch.ll %s ++ ++// Test with PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s ++// RUN: FileCheck --input-file %t.pch.ll %s ++ ++void test(Bar &b) { ++ b.f(); ++ static int s; ++} ++ ++// Check if the mangling of static and local extern variables ++// are correct and preserved by PCH. ++ ++// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4 ++// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4 ++ +Index: tools/clang/test/PCH/local_static.h +=================================================================== +--- tools/clang/test/PCH/local_static.h ++++ tools/clang/test/PCH/local_static.h +@@ -0,0 +1,7 @@ ++class Bar { ++public: ++ template ++ void f() { ++ static const T y = 0; ++ } ++}; From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 23:28:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3834A210; Sat, 14 Feb 2015 23:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 219CC3D8; Sat, 14 Feb 2015 23:28:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ENSBVl047027; Sat, 14 Feb 2015 23:28:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENSA8c047026; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142328.t1ENSA8c047026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278789 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:28:11 -0000 Author: dim Date: Sat Feb 14 23:28:09 2015 New Revision: 278789 URL: https://svnweb.freebsd.org/changeset/base/278789 Log: Add clang patches corresponding to r278788. Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Sat Feb 14 23:28:09 2015 (r278789) @@ -0,0 +1,67 @@ +Pull in r201130 from upstream clang trunk (by Ted Kremenek): + + Fix PCH deserialization bug with local static symbols being treated + as local extern. + + This triggered a miscompilation of code using Boost's + function_template.hpp when it was included inside a PCH file. A + local static within that header would be treated as local extern, + resulting in the wrong mangling. This only occurred during PCH + deserialization. + + Fixes and . + +This fixes a crash in audio/murmur, which is using both PCH and Boost. + +Introduced here: http://svnweb.freebsd.org/changeset/base/278788 + +Index: tools/clang/lib/Serialization/ASTReaderDecl.cpp +=================================================================== +--- tools/clang/lib/Serialization/ASTReaderDecl.cpp ++++ tools/clang/lib/Serialization/ASTReaderDecl.cpp +@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::V + VD->setCachedLinkage(VarLinkage); + + // Reconstruct the one piece of the IdentifierNamespace that we need. +- if (VarLinkage != NoLinkage && ++ if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && + VD->getLexicalDeclContext()->isFunctionOrMethod()) + VD->setLocalExternDecl(); + +Index: tools/clang/test/PCH/local_static.cpp +=================================================================== +--- tools/clang/test/PCH/local_static.cpp ++++ tools/clang/test/PCH/local_static.cpp +@@ -0,0 +1,20 @@ ++// Test this without PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s ++// RUN: FileCheck --input-file %t.no_pch.ll %s ++ ++// Test with PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s ++// RUN: FileCheck --input-file %t.pch.ll %s ++ ++void test(Bar &b) { ++ b.f(); ++ static int s; ++} ++ ++// Check if the mangling of static and local extern variables ++// are correct and preserved by PCH. ++ ++// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4 ++// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4 ++ +Index: tools/clang/test/PCH/local_static.h +=================================================================== +--- tools/clang/test/PCH/local_static.h ++++ tools/clang/test/PCH/local_static.h +@@ -0,0 +1,7 @@ ++class Bar { ++public: ++ template ++ void f() { ++ static const T y = 0; ++ } ++};