PERFORCE change 140067 for review
Sam Leffler
sam at FreeBSD.org
Tue Apr 15 05:14:32 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=140067
Change 140067 by sam at sam_ebb on 2008/04/15 05:13:52
IFC @ 140064
Affected files ...
.. //depot/projects/vap/sbin/restore/dirs.c#5 integrate
.. //depot/projects/vap/sys/amd64/include/pcb_ext.h#3 delete
.. //depot/projects/vap/sys/dev/ata/ata-all.h#9 integrate
.. //depot/projects/vap/sys/dev/ata/ata-chipset.c#9 integrate
.. //depot/projects/vap/sys/dev/ata/ata-dma.c#8 integrate
.. //depot/projects/vap/sys/dev/ata/ata-lowlevel.c#8 integrate
.. //depot/projects/vap/sys/dev/k8temp/k8temp.c#2 integrate
.. //depot/projects/vap/sys/dev/re/if_re.c#11 integrate
.. //depot/projects/vap/sys/ia64/conf/GENERIC#9 integrate
.. //depot/projects/vap/sys/ia64/conf/SKI#5 integrate
.. //depot/projects/vap/sys/ia64/ia64/interrupt.c#9 integrate
.. //depot/projects/vap/sys/ia64/ia64/machdep.c#12 integrate
.. //depot/projects/vap/sys/ia64/ia64/sapic.c#5 integrate
.. //depot/projects/vap/sys/kern/sched_ule.c#13 integrate
.. //depot/projects/vap/sys/kern/uipc_socket.c#10 integrate
.. //depot/projects/vap/sys/mips/include/ns16550.h#2 delete
.. //depot/projects/vap/sys/mips/include/pcb_ext.h#2 delete
.. //depot/projects/vap/sys/mips/mips/machdep.c#2 integrate
.. //depot/projects/vap/sys/mips/mips/mainbus.c#2 integrate
.. //depot/projects/vap/sys/net/bpf.c#12 integrate
.. //depot/projects/vap/sys/netinet/sctp_constants.h#3 integrate
.. //depot/projects/vap/sys/netinet/sctp_indata.c#4 integrate
.. //depot/projects/vap/sys/netinet/sctp_input.c#4 integrate
.. //depot/projects/vap/sys/netinet/sctp_output.c#5 integrate
.. //depot/projects/vap/sys/netinet/sctp_usrreq.c#4 integrate
.. //depot/projects/vap/sys/netinet/sctp_var.h#3 integrate
.. //depot/projects/vap/sys/netinet6/sctp6_usrreq.c#4 integrate
.. //depot/projects/vap/sys/sys/protosw.h#5 integrate
.. //depot/projects/vap/sys/sys/socket.h#8 integrate
.. //depot/projects/vap/usr.sbin/ndiscvt/ndiscvt.c#3 integrate
.. //depot/projects/vap/usr.sbin/ndiscvt/ndisgen.sh#3 integrate
Differences ...
==== //depot/projects/vap/sbin/restore/dirs.c#5 (text+ko) ====
@@ -37,7 +37,7 @@
static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/restore/dirs.c,v 1.33 2008/04/11 21:48:13 mckusick Exp $";
+ "$FreeBSD: src/sbin/restore/dirs.c,v 1.34 2008/04/14 20:15:53 mckusick Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -120,6 +120,7 @@
static void rst_seekdir(RST_DIR *, long, long);
static long rst_telldir(RST_DIR *);
static struct direct *searchdir(ino_t, char *);
+static void fail_dirtmp(char *);
/*
* Extract directory contents, building up a directory structure
@@ -147,7 +148,7 @@
if (fd == -1 || (df = fdopen(fd, "w")) == NULL) {
if (fd != -1)
close(fd);
- warn("%s - cannot create directory temporary\nfopen", dirfile);
+ warn("%s: cannot create directory database", dirfile);
done(1);
}
if (genmode != 0) {
@@ -160,7 +161,7 @@
if (fd == -1 || (mf = fdopen(fd, "w")) == NULL) {
if (fd != -1)
close(fd);
- warn("%s - cannot create modefile\nfopen", modefile);
+ warn("%s: cannot create modefile", modefile);
done(1);
}
}
@@ -172,25 +173,24 @@
for (;;) {
curfile.name = "<directory file - name unknown>";
curfile.action = USING;
- if (curfile.mode == 0 || (curfile.mode & IFMT) != IFDIR) {
- (void) fclose(df);
- dirp = opendirfile(dirfile);
- if (dirp == NULL)
- fprintf(stderr, "opendirfile: %s\n",
- strerror(errno));
- if (mf != NULL)
- (void) fclose(mf);
- i = dirlookup(dot);
- if (i == 0)
- panic("Root directory is not on tape\n");
- return;
- }
+ if (curfile.mode == 0 || (curfile.mode & IFMT) != IFDIR)
+ break;
itp = allocinotab(&curfile, seekpt);
getfile(putdir, putdirattrs, xtrnull);
putent(&nulldir);
flushent();
itp->t_size = seekpt - itp->t_seekpt;
}
+ if (fclose(df) != 0)
+ fail_dirtmp(dirfile);
+ dirp = opendirfile(dirfile);
+ if (dirp == NULL)
+ fprintf(stderr, "opendirfile: %s\n", strerror(errno));
+ if (mf != NULL && fclose(mf) != 0)
+ fail_dirtmp(modefile);
+ i = dirlookup(dot);
+ if (i == 0)
+ panic("Root directory is not on tape\n");
}
/*
@@ -390,7 +390,8 @@
if (dirloc + dp->d_reclen > DIRBLKSIZ) {
((struct direct *)(dirbuf + prev))->d_reclen =
DIRBLKSIZ - prev;
- (void) fwrite(dirbuf, 1, DIRBLKSIZ, df);
+ if (fwrite(dirbuf, DIRBLKSIZ, 1, df) != 1)
+ fail_dirtmp(dirfile);
dirloc = 0;
}
memmove(dirbuf + dirloc, dp, (long)dp->d_reclen);
@@ -405,7 +406,8 @@
flushent(void)
{
((struct direct *)(dirbuf + prev))->d_reclen = DIRBLKSIZ - prev;
- (void) fwrite(dirbuf, (int)dirloc, 1, df);
+ if (fwrite(dirbuf, (int)dirloc, 1, df) != 1)
+ fail_dirtmp(dirfile);
seekpt = ftell(df);
dirloc = 0;
}
@@ -417,8 +419,8 @@
putdirattrs(char *buf, long size)
{
- if (mf != NULL)
- (void) fwrite(buf, 1, size, mf);
+ if (mf != NULL && fwrite(buf, size, 1, mf) != 1)
+ fail_dirtmp(modefile);
}
/*
@@ -582,6 +584,11 @@
myuid = getuid();
for (;;) {
(void) fread((char *)&node, 1, sizeof(struct modeinfo), mf);
+ if (ferror(mf)) {
+ warn("%s: cannot read modefile.", modefile);
+ fprintf(stderr, "Mode, owner, and times not set.\n");
+ break;
+ }
if (feof(mf))
break;
if (node.extsize > 0) {
@@ -596,8 +603,22 @@
}
if (bufsize >= node.extsize) {
(void) fread(buf, 1, node.extsize, mf);
+ if (ferror(mf)) {
+ warn("%s: cannot read modefile.",
+ modefile);
+ fprintf(stderr, "Not all external ");
+ fprintf(stderr, "attributes set.\n");
+ break;
+ }
} else {
(void) fseek(mf, node.extsize, SEEK_CUR);
+ if (ferror(mf)) {
+ warn("%s: cannot seek in modefile.",
+ modefile);
+ fprintf(stderr, "Not all directory ");
+ fprintf(stderr, "attributes set.\n");
+ break;
+ }
}
}
ep = lookupino(node.ino);
@@ -639,8 +660,6 @@
}
if (bufsize > 0)
free(buf);
- if (ferror(mf))
- panic("error setting directory modes\n");
(void) fclose(mf);
}
@@ -734,7 +753,8 @@
node.flags = ctxp->file_flags;
node.uid = ctxp->uid;
node.gid = ctxp->gid;
- (void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
+ if (fwrite((char *)&node, sizeof(struct modeinfo), 1, mf) != 1)
+ fail_dirtmp(modefile);
return (itp);
}
@@ -760,9 +780,33 @@
{
closemt();
- if (modefile[0] != '#')
+ if (modefile[0] != '#') {
+ (void) truncate(modefile, 0);
(void) unlink(modefile);
- if (dirfile[0] != '#')
+ }
+ if (dirfile[0] != '#') {
+ (void) truncate(dirfile, 0);
(void) unlink(dirfile);
+ }
exit(exitcode);
}
+
+/*
+ * Print out information about the failure to save directory,
+ * extended attribute, and mode information.
+ */
+static void
+fail_dirtmp(char *filename)
+{
+ const char *tmpdir;
+
+ warn("%s: cannot write directory database", filename);
+ if (errno == ENOSPC) {
+ if ((tmpdir = getenv("TMPDIR")) == NULL || tmpdir[0] == '\0')
+ tmpdir = _PATH_TMP;
+ fprintf(stderr, "Try making space in %s, %s\n%s\n", tmpdir,
+ "or set environment variable TMPDIR",
+ "to an alternate location with more disk space.");
+ }
+ done(1);
+}
==== //depot/projects/vap/sys/dev/ata/ata-all.h#9 (text+ko) ====
@@ -23,7 +23,7 @@
* (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: src/sys/dev/ata/ata-all.h,v 1.131 2008/04/13 16:05:34 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.132 2008/04/14 18:34:24 sos Exp $
*/
/* ATA register defines */
@@ -418,8 +418,8 @@
device_t dev; /* device handle */
int unit; /* physical unit */
#define ATA_MASTER 0x00
+#define ATA_SLAVE 0x01
#define ATA_PM 0x0f
-#define ATA_SLAVE 0x10
struct ata_params param; /* ata param structure */
int mode; /* current transfermode */
==== //depot/projects/vap/sys/dev/ata/ata-chipset.c#9 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.215 2008/04/12 17:21:22 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.216 2008/04/14 18:34:24 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -1055,9 +1055,10 @@
{
struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
struct ata_channel *ch = device_get_softc(dev);
+ int offset = ch->unit << 7;
+#ifdef AHCI_PM
struct ata_ahci_cmd_tab *ctp =
(struct ata_ahci_cmd_tab *)(ch->dma.work + ATA_AHCI_CT_OFFSET);
- int offset = ch->unit << 7;
int timeout = 0;
/* kick controller into sane state if needed */
@@ -1097,7 +1098,7 @@
} while (ATA_INL(ctlr->r_res2, ATA_AHCI_P_TFD + offset) & ATA_S_BUSY);
if (bootverbose)
device_printf(dev, "BUSY wait time=%dms\n", timeout);
-
+#endif
return ATA_INL(ctlr->r_res2, ATA_AHCI_P_SIG + offset);
}
@@ -4306,7 +4307,7 @@
ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), port & 0x0f);
/* softreset device on this channel */
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_MASTER);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_MASTER));
DELAY(10);
ATA_IDX_OUTB(ch, ATA_CONTROL, ATA_A_IDS | ATA_A_RESET);
ata_udelay(10000);
==== //depot/projects/vap/sys/dev/ata/ata-dma.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.152 2008/04/11 11:30:27 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.153 2008/04/14 18:34:24 sos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -112,8 +112,8 @@
&ch->dma.work_map))
goto error;
- if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map ,ch->dma.work,
- MAXWSPCSZ, ata_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT) ||
+ if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work,
+ MAXWSPCSZ, ata_dmasetupc_cb, &dcba, 0) ||
dcba.error) {
bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map);
goto error;
@@ -202,8 +202,8 @@
}
if (bus_dmamap_load(request->dma.sg_tag, request->dma.sg_map,
- request->dma.sg, MAXTABSZ,
- ata_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT) || dcba.error){
+ request->dma.sg, MAXTABSZ, ata_dmasetupc_cb, &dcba, 0)||
+ dcba.error) {
bus_dmamem_free(request->dma.sg_tag,
request->dma.sg, request->dma.sg_map);
device_printf(request->dev, "FAILURE - load sg\n");
==== //depot/projects/vap/sys/dev/ata/ata-lowlevel.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.81 2008/04/10 13:05:05 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.82 2008/04/14 18:34:24 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -463,7 +463,7 @@
int mask = 0, timeout;
/* do we have any signs of ATA/ATAPI HW being present ? */
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_MASTER);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_MASTER));
DELAY(10);
ostat0 = ATA_IDX_INB(ch, ATA_STATUS);
if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5) {
@@ -473,7 +473,7 @@
/* in some setups we dont want to test for a slave */
if (!(ch->flags & ATA_NO_SLAVE)) {
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_SLAVE);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_SLAVE));
DELAY(10);
ostat1 = ATA_IDX_INB(ch, ATA_STATUS);
if ((ostat1 & 0xf8) != 0xf8 && ostat1 != 0xa5) {
@@ -493,7 +493,7 @@
return;
/* reset (both) devices on this channel */
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_MASTER);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_MASTER));
DELAY(10);
ATA_IDX_OUTB(ch, ATA_CONTROL, ATA_A_IDS | ATA_A_RESET);
ata_udelay(10000);
@@ -504,7 +504,7 @@
/* wait for BUSY to go inactive */
for (timeout = 0; timeout < 310; timeout++) {
if ((mask & 0x01) && (stat0 & ATA_S_BUSY)) {
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(ATA_MASTER));
DELAY(10);
err = ATA_IDX_INB(ch, ATA_ERROR);
lsb = ATA_IDX_INB(ch, ATA_CYL_LSB);
@@ -534,7 +534,7 @@
if ((mask & 0x02) && (stat1 & ATA_S_BUSY) &&
!((mask & 0x01) && (stat0 & ATA_S_BUSY))) {
- ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_SLAVE);
+ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_DEV(ATA_SLAVE));
DELAY(10);
err = ATA_IDX_INB(ch, ATA_ERROR);
lsb = ATA_IDX_INB(ch, ATA_CYL_LSB);
@@ -582,9 +582,8 @@
}
if (bootverbose)
- device_printf(dev, "reset tp2 stat0=%02x stat1=%02x devices=0x%b\n",
- stat0, stat1, ch->devices,
- "\20\4ATAPI_SLAVE\3ATAPI_MASTER\2ATA_SLAVE\1ATA_MASTER");
+ device_printf(dev, "reset tp2 stat0=%02x stat1=%02x devices=0x%x\n",
+ stat0, stat1, ch->devices);
}
/* must be called with ATA channel locked and state_mtx held */
==== //depot/projects/vap/sys/dev/k8temp/k8temp.c#2 (text+ko) ====
@@ -23,7 +23,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/vap/sys/dev/k8temp/k8temp.c#1 $
+ * $P4: //depot/projects/vap/sys/dev/k8temp/k8temp.c#2 $
*/
/*
==== //depot/projects/vap/sys/dev/re/if_re.c#11 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.113 2008/03/31 04:03:14 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.114 2008/04/15 00:46:15 yongari Exp $");
/*
* RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
@@ -1185,23 +1185,17 @@
device_printf(dev, "Using %d MSI messages\n",
msic);
sc->rl_msi = 1;
+ /* Explicitly set MSI enable bit. */
+ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
+ cfg = CSR_READ_1(sc, RL_CFG2);
+ cfg |= RL_CFG2_MSI;
+ CSR_WRITE_1(sc, RL_CFG2, cfg);
+ CSR_WRITE_1(sc, RL_EECMD, 0);
} else
pci_release_msi(dev);
}
}
- /* For MSI capable hardwares, explicitily set/clear MSI enable bit. */
- if (msic != 0) {
- CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
- cfg = CSR_READ_1(sc, RL_CFG2);
- if (sc->rl_msi != 0)
- cfg |= RL_CFG2_MSI;
- else
- cfg &= ~RL_CFG2_MSI;
- CSR_WRITE_1(sc, RL_CFG2, cfg);
- CSR_WRITE_1(sc, RL_EECMD, 0);
- }
-
/* Allocate interrupt */
if (sc->rl_msi == 0) {
rid = 0;
==== //depot/projects/vap/sys/ia64/conf/GENERIC#9 (text+ko) ====
@@ -18,7 +18,7 @@
#
# For hardware specific information check HARDWARE.TXT
#
-# $FreeBSD: src/sys/ia64/conf/GENERIC,v 1.96 2008/03/27 11:54:18 dfr Exp $
+# $FreeBSD: src/sys/ia64/conf/GENERIC,v 1.97 2008/04/15 05:02:41 marcel Exp $
cpu ITANIUM
ident GENERIC
@@ -48,7 +48,7 @@
options NFS_ROOT # NFS usable as root device
options PROCFS # Process filesystem (/proc)
options PSEUDOFS # Pseudo-filesystem framework
-options SCHED_4BSD # 4BSD scheduler
+options SCHED_ULE # ULE scheduler
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options SCTP # Stream Control Transmission Protocol
options SMP # Symmetric Multi-Processor support
==== //depot/projects/vap/sys/ia64/conf/SKI#5 (text+ko) ====
@@ -17,7 +17,7 @@
# If you are in doubt as to the purpose or necessity of a line, check
# first in NOTES.
#
-# $FreeBSD: src/sys/ia64/conf/SKI,v 1.24 2006/06/15 19:58:53 netchild Exp $
+# $FreeBSD: src/sys/ia64/conf/SKI,v 1.25 2008/04/15 05:02:41 marcel Exp $
cpu ITANIUM
ident SKI
@@ -35,8 +35,8 @@
options MD_ROOT # MD usable as root device
options PROCFS # Process filesystem (/proc)
options PSEUDOFS # Pseudo-filesystem framework
-options SCHED_4BSD # 4BSD scheduler
-#options SCHED_ULE # ULE scheduler
+#options SCHED_4BSD # 4BSD scheduler
+options SCHED_ULE # ULE scheduler
options SKI # Include SKI support code
options SOFTUPDATES # Enable FFS soft updates support
options SYSVMSG # SYSV-style message queues
==== //depot/projects/vap/sys/ia64/ia64/interrupt.c#9 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.67 2008/04/11 23:10:39 jeff Exp $ */
+/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.68 2008/04/15 05:02:42 marcel Exp $ */
/* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */
/*-
@@ -47,6 +47,7 @@
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/sched.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
@@ -241,6 +242,9 @@
} else if (vector == ipi_vector[IPI_TEST]) {
CTR1(KTR_SMP, "IPI_TEST, cpuid=%d", PCPU_GET(cpuid));
mp_ipi_test++;
+ } else if (vector == ipi_vector[IPI_PREEMPT]) {
+ CTR1(KTR_SMP, "IPI_PREEMPT, cpuid=%d", PCPU_GET(cpuid));
+ sched_preempt(curthread);
#endif
} else {
ints[PCPU_GET(cpuid)]++;
==== //depot/projects/vap/sys/ia64/ia64/machdep.c#12 (text+ko) ====
@@ -26,12 +26,13 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.235 2008/03/30 23:09:14 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.236 2008/04/15 05:02:42 marcel Exp $");
#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_msgbuf.h"
+#include "opt_sched.h"
#include <sys/param.h>
#include <sys/proc.h>
@@ -370,6 +371,12 @@
if (PCPU_GET(fpcurthread) == old)
old->td_frame->tf_special.psr |= IA64_PSR_DFH;
if (!savectx(oldpcb)) {
+ old->td_lock = mtx;
+#if defined(SCHED_ULE) && defined(SMP)
+ /* td_lock is volatile */
+ while (new->td_lock == &blocked_lock)
+ ;
+#endif
newpcb = new->td_pcb;
oldpcb->pcb_current_pmap =
pmap_switch(newpcb->pcb_current_pmap);
@@ -890,12 +897,16 @@
{
u_int64_t start, end, now;
+ sched_pin();
+
start = ia64_get_itc();
end = start + (itc_frequency * n) / 1000000;
/* printf("DELAY from 0x%lx to 0x%lx\n", start, end); */
do {
now = ia64_get_itc();
} while (now < end || (now > start && end < start));
+
+ sched_unpin();
}
/*
==== //depot/projects/vap/sys/ia64/ia64/sapic.c#5 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/ia64/ia64/sapic.c,v 1.14 2007/07/30 22:29:33 marcel Exp $
+ * $FreeBSD: src/sys/ia64/ia64/sapic.c,v 1.15 2008/04/14 20:34:45 marcel Exp $
*/
#include "opt_ddb.h"
@@ -202,7 +202,7 @@
sapic_read_rte(sa, irq - sa->sa_base, &rte);
rte.rte_destination_id = (lid >> 24) & 255;
rte.rte_destination_eid = (lid >> 16) & 255;
- rte.rte_delivery_mode = SAPIC_DELMODE_LOWPRI;
+ rte.rte_delivery_mode = SAPIC_DELMODE_FIXED;
rte.rte_vector = vector;
rte.rte_mask = 0;
sapic_write_rte(sa, irq - sa->sa_base, &rte);
==== //depot/projects/vap/sys/kern/sched_ule.c#13 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.240 2008/04/04 01:16:18 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.241 2008/04/15 05:02:42 marcel Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_sched.h"
@@ -72,7 +72,7 @@
#include <machine/cpu.h>
#include <machine/smp.h>
-#if !defined(__i386__) && !defined(__amd64__) && !defined(__powerpc__) && !defined(__arm__)
+#if defined(__sparc64__) || defined(__mips__)
#error "This architecture is not currently compatible with ULE"
#endif
==== //depot/projects/vap/sys/kern/uipc_socket.c#10 (text+ko) ====
@@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.308 2008/03/25 09:38:59 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.309 2008/04/14 18:06:04 rrs Exp $");
#include "opt_inet.h"
#include "opt_mac.h"
@@ -1859,7 +1859,9 @@
if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR))
return (EINVAL);
-
+ if (pr->pr_usrreqs->pru_flush != NULL) {
+ (*pr->pr_usrreqs->pru_flush)(so, how);
+ }
if (how != SHUT_WR)
sorflush(so);
if (how != SHUT_RD)
==== //depot/projects/vap/sys/mips/mips/machdep.c#2 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/mips/mips/machdep.c,v 1.1 2008/04/13 07:27:37 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/mips/mips/machdep.c,v 1.2 2008/04/15 02:50:07 imp Exp $");
#include "opt_md.h"
#include "opt_ddb.h"
@@ -93,7 +93,6 @@
#endif
#include <sys/random.h>
-#include <machine/ns16550.h>
#include <net/if.h>
#define BOOTINFO_DEBUG 0
@@ -293,19 +292,6 @@
PCPU_SET(curpcb, thread0.td_pcb);
}
-#ifdef DEBUG_UART_POLLED
-void
-init_bootstrap_console()
-{
- /*
- * Initalize the (temporary) bootstrap console interface, so
- * we can use printf until the VM system starts being setup.
- * The real console is initialized before then.
- */
- uart_post_init(PA_2_K1VA(ADDR_NS16550_UART1));
-}
-#endif
-
struct msgbuf *msgbufp=0;
#if 0
==== //depot/projects/vap/sys/mips/mips/mainbus.c#2 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/mips/mips/mainbus.c,v 1.1 2008/04/13 07:27:37 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/mips/mips/mainbus.c,v 1.2 2008/04/15 02:50:07 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,11 +60,6 @@
#include <machine/pmap.h>
#include <machine/resource.h>
-#ifdef DCHU_DEBUG_UART
-#include <machine/pltfm.h>
-#include <machine/ns16550.h>
-#endif
-
static struct rman irq_rman, port_rman, mem_rman;
static int mainbus_probe(device_t);
@@ -116,10 +111,6 @@
};
static devclass_t mainbus_devclass;
-#ifdef DEBUG_UART
-#define printf(s) puts_post(PA_2_K1VA(ADDR_NS16550_UART1), s)
-#endif
-
DRIVER_MODULE(mainbus, root, mainbus_driver, mainbus_devclass, 0, 0);
static int
@@ -179,9 +170,7 @@
int retval = 0;
retval += bus_print_child_header(bus, child);
-#ifndef DEBUG_UART
retval += printf(" on motherboard\n");
-#endif
return (retval);
}
==== //depot/projects/vap/sys/net/bpf.c#12 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.191 2008/04/07 02:51:00 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.192 2008/04/15 00:50:01 jkim Exp $");
#include "opt_bpf.h"
#include "opt_mac.h"
@@ -88,8 +88,6 @@
#define PRINET 26 /* interruptible */
-#define M_SKIP_BPF M_SKIP_FIREWALL
-
/*
* bpf_iflist is a list of BPF interface structures, each corresponding to a
* specific DLT. The same network interface might have several BPF interface
@@ -843,9 +841,6 @@
mc = m_dup(m, M_DONTWAIT);
if (mc != NULL)
mc->m_pkthdr.rcvif = ifp;
- /* XXX Do not return the same packet twice. */
- if (d->bd_direction == BPF_D_INOUT)
- m->m_flags |= M_SKIP_BPF;
} else
mc = NULL;
@@ -1573,9 +1568,12 @@
BPFIF_UNLOCK(bp);
}
-#define BPF_CHECK_DIRECTION(d, m) \
- if (((d)->bd_direction == BPF_D_IN && (m)->m_pkthdr.rcvif == NULL) || \
- ((d)->bd_direction == BPF_D_OUT && (m)->m_pkthdr.rcvif != NULL))
+#define BPF_CHECK_DIRECTION(d, i) \
+ (((d)->bd_direction == BPF_D_IN && (i) == NULL) || \
+ ((d)->bd_direction == BPF_D_OUT && (i) != NULL))
+#define BPF_CHECK_DUPLICATE(d, i) \
+ ((d)->bd_feedback && \
+ (d)->bd_direction == BPF_D_INOUT && (i) == NULL)
/*
* Incoming linkage from device drivers, when packet is in an mbuf chain.
@@ -1588,18 +1586,14 @@
int gottime;
struct timeval tv;
- if (m->m_flags & M_SKIP_BPF) {
- m->m_flags &= ~M_SKIP_BPF;
- return;
- }
-
gottime = 0;
pktlen = m_length(m, NULL);
BPFIF_LOCK(bp);
LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
- BPF_CHECK_DIRECTION(d, m)
+ if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif) ||
+ BPF_CHECK_DUPLICATE(d, m->m_pkthdr.rcvif))
continue;
BPFD_LOCK(d);
++d->bd_rcount;
@@ -1642,11 +1636,6 @@
int gottime;
struct timeval tv;
- if (m->m_flags & M_SKIP_BPF) {
- m->m_flags &= ~M_SKIP_BPF;
- return;
- }
-
gottime = 0;
pktlen = m_length(m, NULL);
@@ -1662,7 +1651,8 @@
BPFIF_LOCK(bp);
LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
- BPF_CHECK_DIRECTION(d, m)
+ if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif) ||
+ BPF_CHECK_DUPLICATE(d, m->m_pkthdr.rcvif))
continue;
BPFD_LOCK(d);
++d->bd_rcount;
@@ -1685,6 +1675,7 @@
}
#undef BPF_CHECK_DIRECTION
+#undef BPF_CHECK_DUPLICATE
/*
* Move the packet data from interface memory (pkt) into the
==== //depot/projects/vap/sys/netinet/sctp_constants.h#3 (text+ko) ====
@@ -31,7 +31,7 @@
/* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_constants.h,v 1.34 2007/10/30 14:09:23 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_constants.h,v 1.35 2008/04/14 14:33:07 rrs Exp $");
#ifndef __sctp_constants_h__
#define __sctp_constants_h__
@@ -190,35 +190,36 @@
#define SCTP_MBUF_IALLOC 91
#define SCTP_MBUF_IFREE 92
#define SCTP_MBUF_ICOPY 93
-#define SCTP_SORCV_FREECTL 94
-#define SCTP_SORCV_DOESCPY 95
-#define SCTP_SORCV_DOESLCK 96
-#define SCTP_SORCV_DOESADJ 97
-#define SCTP_SORCV_BOTWHILE 98
-#define SCTP_SORCV_PASSBF 99
-#define SCTP_SORCV_ADJD 100
-#define SCTP_UNKNOWN_MAX 101
-#define SCTP_RANDY_STUFF 102
-#define SCTP_RANDY_STUFF1 103
-#define SCTP_STRMOUT_LOG_ASSIGN 104
-#define SCTP_STRMOUT_LOG_SEND 105
-#define SCTP_FLIGHT_LOG_DOWN_CA 106
-#define SCTP_FLIGHT_LOG_UP 107
-#define SCTP_FLIGHT_LOG_DOWN_GAP 108
-#define SCTP_FLIGHT_LOG_DOWN_RSND 109
-#define SCTP_FLIGHT_LOG_UP_RSND 110
-#define SCTP_FLIGHT_LOG_DOWN_RSND_TO 111
-#define SCTP_FLIGHT_LOG_DOWN_WP 112
-#define SCTP_FLIGHT_LOG_UP_REVOKE 113
-#define SCTP_FLIGHT_LOG_DOWN_PDRP 114
-#define SCTP_FLIGHT_LOG_DOWN_PMTU 115
-#define SCTP_SACK_LOG_NORMAL 116
-#define SCTP_SACK_LOG_EXPRESS 117
-#define SCTP_MAP_TSN_ENTERS 118
-#define SCTP_THRESHOLD_CLEAR 119
-#define SCTP_THRESHOLD_INCR 120
+#define SCTP_MBUF_SPLIT 94
+#define SCTP_SORCV_FREECTL 95
+#define SCTP_SORCV_DOESCPY 96
+#define SCTP_SORCV_DOESLCK 97
+#define SCTP_SORCV_DOESADJ 98
+#define SCTP_SORCV_BOTWHILE 99
+#define SCTP_SORCV_PASSBF 100
+#define SCTP_SORCV_ADJD 101
+#define SCTP_UNKNOWN_MAX 102
+#define SCTP_RANDY_STUFF 103
+#define SCTP_RANDY_STUFF1 104
+#define SCTP_STRMOUT_LOG_ASSIGN 105
+#define SCTP_STRMOUT_LOG_SEND 106
+#define SCTP_FLIGHT_LOG_DOWN_CA 107
+#define SCTP_FLIGHT_LOG_UP 108
+#define SCTP_FLIGHT_LOG_DOWN_GAP 109
+#define SCTP_FLIGHT_LOG_DOWN_RSND 110
+#define SCTP_FLIGHT_LOG_UP_RSND 111
+#define SCTP_FLIGHT_LOG_DOWN_RSND_TO 112
+#define SCTP_FLIGHT_LOG_DOWN_WP 113
+#define SCTP_FLIGHT_LOG_UP_REVOKE 114
+#define SCTP_FLIGHT_LOG_DOWN_PDRP 115
+#define SCTP_FLIGHT_LOG_DOWN_PMTU 116
+#define SCTP_SACK_LOG_NORMAL 117
+#define SCTP_SACK_LOG_EXPRESS 118
+#define SCTP_MAP_TSN_ENTERS 119
+#define SCTP_THRESHOLD_CLEAR 120
+#define SCTP_THRESHOLD_INCR 121
-#define SCTP_LOG_MAX_TYPES 121
+#define SCTP_LOG_MAX_TYPES 122
/*
* To turn on various logging, you must first enable 'options KTR' and
* you might want to bump the entires 'options KTR_ENTRIES=80000'.
==== //depot/projects/vap/sys/netinet/sctp_indata.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_indata.c,v 1.48 2008/01/28 10:25:43 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_indata.c,v 1.49 2008/04/14 14:34:29 rrs Exp $");
#include <netinet/sctp_os.h>
#include <netinet/sctp_var.h>
@@ -582,6 +582,7 @@
/* The incoming sseq is behind where we last delivered? */
SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n",
control->sinfo_ssn, strm->last_sequence_delivered);
+protocol_error:
/*
* throw it in the stream so it gets cleaned up in
* association destruction
@@ -659,6 +660,11 @@
* Ok, we did not deliver this guy, find the correct place
* to put it on the queue.
*/
+ if ((compare_with_wrap(asoc->cumulative_tsn,
+ control->sinfo_tsn, MAX_TSN)) ||
+ (control->sinfo_tsn == asoc->cumulative_tsn)) {
+ goto protocol_error;
+ }
if (TAILQ_EMPTY(&strm->inqueue)) {
/* Empty queue */
if (sctp_logging_level & SCTP_STR_LOGGING_ENABLE) {
@@ -3343,7 +3349,7 @@
tp1->sent++;
}
}
- } else if (tp1->rec.data.doing_fast_retransmit) {
+ } else if ((tp1->rec.data.doing_fast_retransmit) && (sctp_cmt_on_off == 0)) {
/*
* For those that have done a FR we must take
* special consideration if we strike. I.e the
==== //depot/projects/vap/sys/netinet/sctp_input.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
/* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.67 2008/01/31 08:22:24 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.68 2008/04/14 18:13:33 rrs Exp $");
#include <netinet/sctp_os.h>
#include <netinet/sctp_var.h>
@@ -2182,6 +2182,20 @@
/* out of memory or ?? */
return (NULL);
}
+#ifdef SCTP_MBUF_LOGGING
+ if (sctp_logging_level & SCTP_MBUF_LOGGING_ENABLE) {
+ struct mbuf *mat;
+
+ mat = m_sig;
+ while (mat) {
+ if (SCTP_BUF_IS_EXTENDED(mat)) {
+ sctp_log_mb(mat, SCTP_MBUF_SPLIT);
+ }
+ mat = SCTP_BUF_NEXT(mat);
+ }
+ }
+#endif
+
/*
* compute the signature/digest for the cookie
*/
@@ -2795,7 +2809,7 @@
}
}
/* stop the timer */
- sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22);
+ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22);
SCTP_STAT_INCR_COUNTER32(sctps_shutdown);
/* free the TCB */
SCTPDBG(SCTP_DEBUG_INPUT2,
@@ -4807,6 +4821,19 @@
SCTP_BUF_NEXT(mm) = SCTP_M_COPYM(m, *offset, SCTP_SIZE32(chk_length),
M_DONTWAIT);
if (SCTP_BUF_NEXT(mm)) {
+#ifdef SCTP_MBUF_LOGGING
+ if (sctp_logging_level & SCTP_MBUF_LOGGING_ENABLE) {
+ struct mbuf *mat;
+
+ mat = SCTP_BUF_NEXT(mm);
+ while (mat) {
+ if (SCTP_BUF_IS_EXTENDED(mat)) {
+ sctp_log_mb(mat, SCTP_MBUF_ICOPY);
+ }
+ mat = SCTP_BUF_NEXT(mat);
+ }
+ }
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list