CVS commit: src/sys/dev/usb
Module Name:src Committed By: njoly Date: Wed Jun 11 07:05:03 UTC 2014 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add Intel new vendor id, and Rate Matching Hub devices. To generate a diff of this commit: cvs rdiff -u -r1.672 -r1.673 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.672 src/sys/dev/usb/usbdevs:1.673 --- src/sys/dev/usb/usbdevs:1.672 Fri May 30 16:11:52 2014 +++ src/sys/dev/usb/usbdevs Wed Jun 11 07:05:03 2014 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp $ +$NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -579,6 +579,7 @@ vendor ARKMICROCHIPS 0x6547 ArkMicroChip vendor 3COM2 0x6891 3Com vendor EDIMAX 0x7392 EDIMAX vendor INTEL 0x8086 Intel +vendor INTEL2 0x8087 Intel vendor ALLWIN 0x8516 ALLWIN Tech vendor MOSCHIP 0x9710 MosChip Semiconductor vendor NETGEAR4 0x9846 Netgear @@ -1789,6 +1790,9 @@ product INTEL AP310 0x0200 AP310 AnyPoi product INTEL I2011B 0x Wireless 2011B product INTEL TESTBOARD 0x9890 82930 test board +product INTEL2 RMH 0x0020 Rate Matching Hub +product INTEL2 RMH2 0x0024 Rate Matching Hub + /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN product INTERSIL PRISM_2X 0x3642 Prism2.x WLAN
CVS commit: src/sys/dev/usb
Module Name:src Committed By: njoly Date: Wed Jun 11 07:05:35 UTC 2014 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.664 -r1.665 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.665 -r1.666 src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.664 src/sys/dev/usb/usbdevs.h:1.665 --- src/sys/dev/usb/usbdevs.h:1.664 Fri May 30 16:12:22 2014 +++ src/sys/dev/usb/usbdevs.h Wed Jun 11 07:05:35 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.664 2014/05/30 16:12:22 nonaka Exp $ */ +/* $NetBSD: usbdevs.h,v 1.665 2014/06/11 07:05:35 njoly Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp + * NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp */ /* @@ -586,6 +586,7 @@ #define USB_VENDOR_3COM2 0x6891 /* 3Com */ #define USB_VENDOR_EDIMAX 0x7392 /* EDIMAX */ #define USB_VENDOR_INTEL 0x8086 /* Intel */ +#define USB_VENDOR_INTEL2 0x8087 /* Intel */ #define USB_VENDOR_ALLWIN 0x8516 /* ALLWIN Tech */ #define USB_VENDOR_MOSCHIP 0x9710 /* MosChip Semiconductor */ #define USB_VENDOR_NETGEAR4 0x9846 /* Netgear */ @@ -1796,6 +1797,9 @@ #define USB_PRODUCT_INTEL_I2011B 0x /* Wireless 2011B */ #define USB_PRODUCT_INTEL_TESTBOARD 0x9890 /* 82930 test board */ +#define USB_PRODUCT_INTEL2_RMH 0x0020 /* Rate Matching Hub */ +#define USB_PRODUCT_INTEL2_RMH2 0x0024 /* Rate Matching Hub */ + /* Intersil products */ #define USB_PRODUCT_INTERSIL_PRISM_GT 0x1000 /* PrismGT USB 2.0 WLAN */ #define USB_PRODUCT_INTERSIL_PRISM_2X 0x3642 /* Prism2.x WLAN */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.665 src/sys/dev/usb/usbdevs_data.h:1.666 --- src/sys/dev/usb/usbdevs_data.h:1.665 Fri May 30 16:12:22 2014 +++ src/sys/dev/usb/usbdevs_data.h Wed Jun 11 07:05:35 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.665 2014/05/30 16:12:22 nonaka Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.666 2014/06/11 07:05:35 njoly Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.672 2014/05/30 16:11:52 nonaka Exp + * NetBSD: usbdevs,v 1.673 2014/06/11 07:05:03 njoly Exp */ /* @@ -2123,6 +2123,10 @@ const struct usb_vendor usb_vendors[] = Intel, }, { + USB_VENDOR_INTEL2, + Intel, + }, + { USB_VENDOR_ALLWIN, ALLWIN Tech, }, @@ -2155,7 +2159,7 @@ const struct usb_vendor usb_vendors[] = GNU Radio USRP, }, }; -const int usb_nvendors = 529; +const int usb_nvendors = 530; const struct usb_product usb_products[] = { { @@ -5615,6 +5619,14 @@ const struct usb_product usb_products[] 82930 test board, }, { + USB_VENDOR_INTEL2, USB_PRODUCT_INTEL2_RMH, + Rate Matching Hub, + }, + { + USB_VENDOR_INTEL2, USB_PRODUCT_INTEL2_RMH2, + Rate Matching Hub, + }, + { USB_VENDOR_INTERSIL, USB_PRODUCT_INTERSIL_PRISM_GT, PrismGT USB 2.0 WLAN, }, @@ -10147,4 +10159,4 @@ const struct usb_product usb_products[] Prestige, }, }; -const int usb_nproducts = 1997; +const int usb_nproducts = 1999;
CVS commit: src/lib/libquota
Module Name:src Committed By: martin Date: Wed Jun 11 08:43:01 UTC 2014 Modified Files: src/lib/libquota: quota_nfs.c Log Message: Some more errno remapping: if the NFS server is unreachable because we have no route to it, assume there are no quotas. While this might sound like an impossible scenario, it actually happens inside rump tests when we have a virtual shmif network but are querying quotas for / which happens to be on NFS (but of course outside of the shmif setup). This fixes tests/fs/nfs/t_rquotad on diskless clients. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libquota/quota_nfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libquota/quota_nfs.c diff -u src/lib/libquota/quota_nfs.c:1.3 src/lib/libquota/quota_nfs.c:1.4 --- src/lib/libquota/quota_nfs.c:1.3 Thu Jun 5 13:14:23 2014 +++ src/lib/libquota/quota_nfs.c Wed Jun 11 08:43:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: quota_nfs.c,v 1.3 2014/06/05 13:14:23 martin Exp $ */ +/* $NetBSD: quota_nfs.c,v 1.4 2014/06/11 08:43:01 martin Exp $ */ /*- * Copyright (c) 2011 Manuel Bouyer * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: quota_nfs.c,v 1.3 2014/06/05 13:14:23 martin Exp $); +__RCSID($NetBSD: quota_nfs.c,v 1.4 2014/06/11 08:43:01 martin Exp $); #include sys/types.h #include sys/param.h /* XXX for DEV_BSIZE */ @@ -191,9 +191,21 @@ __quota_nfs_get(struct quotahandle *qh, free(host); if (ret != RPC_SUCCESS) { - /* if the file server does not support any quotas at all, - return ENOENT */ - errno = sverrno == ENOTCONN ? ENOENT : sverrno; + /* + * Remap some error codes for callers convenience: + * - if the file server does not support any quotas at all, + *return ENOENT + * - if the server can not be reached something is very + *wrong - or we are run inside a virtual rump network + *but querying an NFS mount from the host. Make sure + *to fail silently and return ENOENT as well. + */ + if (ret == RPC_SYSTEMERROR + rpc_createerr.cf_error.re_errno == EHOSTUNREACH) + sverrno = ENOENT; + else if (sverrno == ENOTCONN) + sverrno = ENOENT; + errno = sverrno; return -1; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 13:15:44 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Fix sense of conditional for GTTMMADR size. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.86 src/sys/dev/pci/agp_i810.c:1.87 --- src/sys/dev/pci/agp_i810.c:1.86 Tue Jun 10 22:02:58 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 13:15:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.86 2014/06/10 22:02:58 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.87 2014/06/11 13:15:44 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.86 2014/06/10 22:02:58 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.87 2014/06/11 13:15:44 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -484,12 +484,12 @@ agp_i810_attach(device_t parent, device_ /* Map the GTT, from either part of the MMIO region or its own BAR. */ if (gtt_bar == 0) { isc-gtt_bst = isc-bst; - if (isc-gtt_size (mmadr_size - gtt_off)) { + if ((mmadr_size - gtt_off) isc-gtt_size) { aprint_error_dev(self, GTTMMADR too small for GTT - : %PRIxMAX (%PRIxMAX - %PRIxMAX)\n, - (uintmax_t)isc-gtt_size, + : (%PRIxMAX - %PRIxMAX) %PRIxMAX\n, (uintmax_t)mmadr_size, - (uintmax_t)gtt_off); + (uintmax_t)gtt_off, + (uintmax_t)isc-gtt_size); error = ENXIO; goto fail4; }
CVS commit: src/usr.sbin/ifmcstat
Module Name:src Committed By: joerg Date: Wed Jun 11 14:05:28 UTC 2014 Modified Files: src/usr.sbin/ifmcstat: ifmcstat.c Log Message: Add a const for the oid list. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/ifmcstat/ifmcstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifmcstat/ifmcstat.c diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.17 src/usr.sbin/ifmcstat/ifmcstat.c:1.18 --- src/usr.sbin/ifmcstat/ifmcstat.c:1.17 Tue Jun 10 09:38:30 2014 +++ src/usr.sbin/ifmcstat/ifmcstat.c Wed Jun 11 14:05:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ifmcstat.c,v 1.17 2014/06/10 09:38:30 joerg Exp $ */ +/* $NetBSD: ifmcstat.c,v 1.18 2014/06/11 14:05:28 joerg Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: ifmcstat.c,v 1.17 2014/06/10 09:38:30 joerg Exp $); +__RCSID($NetBSD: ifmcstat.c,v 1.18 2014/06/11 14:05:28 joerg Exp $); #include err.h #include errno.h @@ -101,7 +101,7 @@ main(void) } static void * -fetch_sysctl(size_t *len, int oids[], size_t oidlen, const char *msg) +fetch_sysctl(size_t *len, const int oids[], size_t oidlen, const char *msg) { void *data;
CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: reinoud Date: Wed Jun 11 14:49:50 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos4_reg.h exynos5_reg.h Log Message: Add USB2HOST aliases for exynos4 and exynos5 from where the ehci/ohci/phy are referenced from To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/samsung/exynos4_reg.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/samsung/exynos5_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/samsung/exynos4_reg.h diff -u src/sys/arch/arm/samsung/exynos4_reg.h:1.6 src/sys/arch/arm/samsung/exynos4_reg.h:1.7 --- src/sys/arch/arm/samsung/exynos4_reg.h:1.6 Wed Jun 4 10:27:26 2014 +++ src/sys/arch/arm/samsung/exynos4_reg.h Wed Jun 11 14:49:50 2014 @@ -205,9 +205,12 @@ #define EXYNOS4_SDMMC4_OFFSET 0x0255 #define EXYNOS4_MIPI_HSI_OFFSET 0x0256 /* LCD0 */ #define EXYNOS4_SROMC_OFFSET 0x0257 + +#define EXYNOS4_USB2HOST_OFFSET 0x0258 #define EXYNOS4_USBHOST0_OFFSET 0x0258 /* USB EHCI */ #define EXYNOS4_USBHOST1_OFFSET 0x0259 /* USB OHCI companion to EHCI (paired) */ #define EXYNOS4_USBOTG1_OFFSET 0x025B /* USB On The Go interface */ + #define EXYNOS4_PDMA0_OFFSET 0x0268 /* Peripheral DMA */ #define EXYNOS4_PDMA1_OFFSET 0x0269 #define EXYNOS4_GADC_OFFSET 0x026C /* General AD Converter */ Index: src/sys/arch/arm/samsung/exynos5_reg.h diff -u src/sys/arch/arm/samsung/exynos5_reg.h:1.9 src/sys/arch/arm/samsung/exynos5_reg.h:1.10 --- src/sys/arch/arm/samsung/exynos5_reg.h:1.9 Tue Jun 10 20:17:33 2014 +++ src/sys/arch/arm/samsung/exynos5_reg.h Wed Jun 11 14:49:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos5_reg.h,v 1.9 2014/06/10 20:17:33 matt Exp $ */ +/* $NetBSD: exynos5_reg.h,v 1.10 2014/06/11 14:49:50 reinoud Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -125,10 +125,12 @@ #define EXYNOS5_USB3_XHCI0_OFFSET 0x0200 #define EXYNOS5_USB3_PHY0_OFFSET 0x0210 +#define EXYNOS5_USB2HOST_OFFSET 0x0211 #define EXYNOS5_USB2_HOST_EHCI_OFFSET 0x0211 #define EXYNOS5_USB2_HOST_OHCI_OFFSET 0x0212 #define EXYNOS5_USB2_HOST_CTRL_OFFSET 0x0213 #define EXYNOS5_USB2_DEVICE_LINK_OFFSET 0x0214 + #define EXYNOS5_MIPI_HSI_OFFSET 0x0216 #define EXYNOS5_SATA PHY CONTROL_OFFSET 0x0217 #define EXYNOS5_MCUCTL_IOP_OFFSET 0x0218 /* XXX unknown XXX */
CVS commit: src/usr.sbin/mlxctl
Module Name:src Committed By: joerg Date: Wed Jun 11 14:51:49 UTC 2014 Modified Files: src/usr.sbin/mlxctl: Makefile dklist.c Log Message: Use hw.iostats and not kvm. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/mlxctl/Makefile cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/mlxctl/dklist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mlxctl/Makefile diff -u src/usr.sbin/mlxctl/Makefile:1.3 src/usr.sbin/mlxctl/Makefile:1.4 --- src/usr.sbin/mlxctl/Makefile:1.3 Sun Aug 14 17:57:44 2011 +++ src/usr.sbin/mlxctl/Makefile Wed Jun 11 14:51:49 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.3 2011/08/14 17:57:44 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/06/11 14:51:49 joerg Exp $ PROG= mlxctl SRCS= cmds.c config.c dklist.c main.c util.c MAN= mlxctl.8 -LDADD= -lkvm -DPADD= ${LIBKVM} +LDADD= -lutil +DPADD= ${LIButil} .include bsd.prog.mk Index: src/usr.sbin/mlxctl/dklist.c diff -u src/usr.sbin/mlxctl/dklist.c:1.9 src/usr.sbin/mlxctl/dklist.c:1.10 --- src/usr.sbin/mlxctl/dklist.c:1.9 Fri Apr 17 04:03:39 2009 +++ src/usr.sbin/mlxctl/dklist.c Wed Jun 11 14:51:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dklist.c,v 1.9 2009/04/17 04:03:39 lukem Exp $ */ +/* $NetBSD: dklist.c,v 1.10 2014/06/11 14:51:49 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -63,53 +63,32 @@ #ifndef lint #include sys/cdefs.h -__RCSID($NetBSD: dklist.c,v 1.9 2009/04/17 04:03:39 lukem Exp $); +__RCSID($NetBSD: dklist.c,v 1.10 2014/06/11 14:51:49 joerg Exp $); #endif /* not lint */ #include sys/types.h -#include sys/disk.h +#include sys/iostat.h #include sys/ioctl.h +#include sys/sysctl.h #include dev/ic/mlxreg.h #include dev/ic/mlxio.h +#include ctype.h #include err.h +#include errno.h #include fcntl.h -#include kvm.h #include limits.h -#include nlist.h #include stdio.h #include stdlib.h #include string.h -#include ctype.h #include unistd.h +#include util.h #include extern.h static SIMPLEQ_HEAD(, mlx_disk) mlx_disks; -static struct nlist namelist[] = { -#define X_DISK_COUNT 0 - { _iostat_count, 0, 0, 0, 0 }, /* number of disks */ -#define X_DISKLIST 1 - { _iostatlist, 0, 0, 0, 0 }, /* TAILQ of disks */ - { NULL, 0, 0, 0, 0 }, -}; - -#define KVM_ERROR(_string) { \ - warnx(%s, (_string)); \ - errx(1, %s, kvm_geterr(kd)); \ -} - -/* - * Dereference the namelist pointer `v' and fill in the local copy - * 'p' which is of size 's'. - */ -#define deref_nl(kd, v, p, s) \ -deref_kptr(kd, (void *)namelist[(v)].n_value, (p), (s)); - -static void deref_kptr(kvm_t *, void *, void *, size_t); - void mlx_disk_init(void) { @@ -167,62 +146,46 @@ mlx_disk_add(const char *name) errx(EXIT_FAILURE, %s is not attached to %s, name, mlxname); } -void -mlx_disk_add_all(void) +static void * +fetch_sysctl(size_t *len, const int oids[], size_t oidlen, const char *msg) { - struct iostatlist_head iostat_head; - struct io_stats cur_drive, *drv; -char errbuf[_POSIX2_LINE_MAX]; - char buf[12]; - int i, ndrives; - kvm_t *kd; - - /* Open the kernel. */ -if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf)) == NULL) - errx(1, kvm_openfiles: %s, errbuf); - - /* Obtain the namelist symbols from the kernel. */ - if (kvm_nlist(kd, namelist)) - KVM_ERROR(kvm_nlist failed to read symbols.); - - /* Get the number of attached drives. */ - deref_nl(kd, X_DISK_COUNT, ndrives, sizeof(ndrives)); - - if (ndrives 0) - errx(EXIT_FAILURE, invalid _disk_count %d., ndrives); - if (ndrives == 0) - errx(EXIT_FAILURE, no drives attached.); + void *data; - /* Get a pointer to the first disk. */ - deref_nl(kd, X_DISKLIST, iostat_head, sizeof(iostat_head)); - drv = TAILQ_FIRST(iostat_head); - - /* Try to add each disk to the list. */ - for (i = 0; i ndrives; i++) { - deref_kptr(kd, drv, cur_drive, sizeof(cur_drive)); - deref_kptr(kd, cur_drive.io_name, buf, sizeof(buf)); - if (cur_drive.io_type == IOSTAT_DISK) - mlx_disk_add0(buf); - drv = TAILQ_NEXT(cur_drive, io_link); - } + *len = 0; + data = NULL; - kvm_close(kd); + for (;;) { + if (sysctl(oids, oidlen, data, len, NULL, 0) == 0) { + if (data != NULL || len == 0) +return data; + errno = ENOMEM; + } + free(data); + if (errno == ENOMEM) { + data = emalloc(*len); + continue; + } + err(1, %s, msg); + } } -/* - * Dereference the kernel pointer `kptr' and fill in the local copy pointed - * to by `ptr'. The storage space must be pre-allocated, and the size of - * the copy passed in `len'. - */ -static void -deref_kptr(kvm_t *kd, void *kptr, void *ptr, size_t len) +void +mlx_disk_add_all(void) { - char buf[128]; + struct io_sysctl *data; + size_t i, len; + static const int mib[3] = { CTL_HW, HW_IOSTATS, sizeof(*data) }; + + data = fetch_sysctl(len, mib, __arraycount(mib), hw.iostats failed); + len /= sizeof(*data); - if ((size_t)kvm_read(kd,
CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: reinoud Date: Wed Jun 11 14:54:32 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos4_loc.c exynos5_loc.c exynos_usb.c exynos_var.h Log Message: Remove the exyo_usb_locinfo structure as exyousb becomes usb2 only To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/samsung/exynos4_loc.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/samsung/exynos5_loc.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/samsung/exynos_usb.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/samsung/exynos_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/samsung/exynos4_loc.c diff -u src/sys/arch/arm/samsung/exynos4_loc.c:1.8 src/sys/arch/arm/samsung/exynos4_loc.c:1.9 --- src/sys/arch/arm/samsung/exynos4_loc.c:1.8 Fri Jun 6 14:28:58 2014 +++ src/sys/arch/arm/samsung/exynos4_loc.c Wed Jun 11 14:54:32 2014 @@ -272,7 +272,7 @@ static const struct exyo_locators exynos { sscom, OFFANDSIZE(,UART1), 1, IRQ_UART1, 0 }, { sscom, OFFANDSIZE(,UART2), 2, IRQ_UART2, 0 }, { sscom, OFFANDSIZE(,UART3), 3, IRQ_UART3, 0 }, - { exyousb, 0, 0, NOPORT, NOINTR, 0}, /* uses usb locators */ + { exyousb, OFFANDSIZE(,USB2HOST), NOPORT, IRQ_UHOST, 0 }, }; const struct exyo_locinfo exynos4_locinfo = { @@ -301,24 +301,3 @@ const struct exyo_locinfo exynos4_i2c_lo .nlocators = __arraycount(exynos4_i2c_locators) }; - -/* usb locators */ -const struct exyo_usb_locinfo exynos4_usb_locinfo = { - .uloc_pmuregs_offset = EXYNOS4_PMU_OFFSET, - .uloc_sysregs_offset = 0, - - .uloc_ehci_offset = EXYNOS4_USBHOST0_OFFSET, - .uloc_ohci_offset = EXYNOS4_USBHOST1_OFFSET, - .uloc_usbotg_offset = EXYNOS4_USBOTG1_OFFSET, - .uloc_usb2phy_offset = EXYNOS4_USBOTG1_OFFSET, - - .uloc_usbhost_irq = IRQ_UHOST, - .uloc_usbotg_irq = IRQ_HSOTG, - .uloc_usb3_irq = 0, /* no usb3 */ - - .uloc_usb3_xhci0_offset = 0, /* no usb3 */ - .uloc_usb3_xhci1_offset = 0, /* no usb3 */ - .uloc_usb3_phy0_offset = 0, /* no usb3 */ - .uloc_usb3_phy1_offset = 0, /* no usb3 */ -}; - Index: src/sys/arch/arm/samsung/exynos5_loc.c diff -u src/sys/arch/arm/samsung/exynos5_loc.c:1.6 src/sys/arch/arm/samsung/exynos5_loc.c:1.7 --- src/sys/arch/arm/samsung/exynos5_loc.c:1.6 Fri Jun 6 14:28:58 2014 +++ src/sys/arch/arm/samsung/exynos5_loc.c Wed Jun 11 14:54:32 2014 @@ -237,23 +237,3 @@ const struct exyo_locinfo exynos5_i2c_lo }; -/* usb locators */ -const struct exyo_usb_locinfo exynos5_usb_locinfo = { - .uloc_pmuregs_offset = EXYNOS5_ALIVE_OFFSET, - .uloc_sysregs_offset = EXYNOS5_SYSREG_OFFSET, - - .uloc_ehci_offset = EXYNOS5_USB2_HOST_EHCI_OFFSET, - .uloc_ohci_offset = EXYNOS5_USB2_HOST_OHCI_OFFSET, - .uloc_usbotg_offset = EXYNOS5_USB2_DEVICE_LINK_OFFSET, - .uloc_usb2phy_offset = EXYNOS5_USB2_DEVICE_LINK_OFFSET, - - .uloc_usbhost_irq = IRQ_USB_HOST20, - .uloc_usbotg_irq = IRQ_USBOTG, - .uloc_usb3_irq = IRQ_USB_DRD30, - - .uloc_usb3_xhci0_offset = EXYNOS5_USB3_XHCI0_OFFSET, - .uloc_usb3_xhci1_offset = EXYNOS5_USB3_XHCI1_OFFSET, - .uloc_usb3_phy0_offset = EXYNOS5_USB3_PHY0_OFFSET, - .uloc_usb3_phy1_offset = EXYNOS5_USB3_PHY1_OFFSET, -}; - Index: src/sys/arch/arm/samsung/exynos_usb.c diff -u src/sys/arch/arm/samsung/exynos_usb.c:1.5 src/sys/arch/arm/samsung/exynos_usb.c:1.6 --- src/sys/arch/arm/samsung/exynos_usb.c:1.5 Fri Jun 6 14:28:58 2014 +++ src/sys/arch/arm/samsung/exynos_usb.c Wed Jun 11 14:54:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_usb.c,v 1.5 2014/06/06 14:28:58 reinoud Exp $ */ +/* $NetBSD: exynos_usb.c,v 1.6 2014/06/11 14:54:32 reinoud Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: exynos_usb.c,v 1.5 2014/06/06 14:28:58 reinoud Exp $); +__KERNEL_RCSID(1, $NetBSD: exynos_usb.c,v 1.6 2014/06/11 14:54:32 reinoud Exp $); #include sys/param.h #include sys/systm.h @@ -67,10 +67,13 @@ __KERNEL_RCSID(1, $NetBSD: exynos_usb.c #include arm/samsung/exynos_var.h #include arm/samsung/exynos_io.h +#define EHCI_OFFSET (0) +#define OHCI_OFFSET (1*EXYNOS_BLOCK_SIZE) +#define DEVLINK_OFFSET (2*EXYNOS_BLOCK_SIZE) /* Exynos5 */ +#define USB2PHY_OFFSET (3*EXYNOS_BLOCK_SIZE) struct exynos_usb_softc { device_t sc_self; - const struct exyo_usb_locinfo *sc_locinfo; /* keep our tags here */ bus_dma_tag_t sc_dmat; @@ -81,11 +84,11 @@ struct exynos_usb_softc { bus_space_handle_t sc_usb2phy_bsh; bus_space_handle_t sc_pmuregs_bsh; - bus_space_handle_t sc_sysregs_bsh; device_t sc_ohci_dev; device_t sc_ehci_dev; + int sc_irq; void *sc_intrh; } exynos_usb_sc; @@ -130,23 +133,15 @@ exynos_usb_attach(device_t parent, devic struct exyo_locators *loc = exyoaa-exyo_loc; struct exynos_gpio_pindata XuhostOVERCUR; struct exynos_gpio_pindata XuhostPWREN; + bus_size_t pmu_offset; /* no locators expected */ - KASSERT(loc-loc_offset == 0); - KASSERT(loc-loc_size == 0); -
CVS commit: src/usr.bin/ipcs
Module Name:src Committed By: joerg Date: Wed Jun 11 14:57:55 UTC 2014 Modified Files: src/usr.bin/ipcs: Makefile ipcs.1 ipcs.c Log Message: Remove KVM support. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/ipcs/Makefile cvs rdiff -u -r1.19 -r1.20 src/usr.bin/ipcs/ipcs.1 cvs rdiff -u -r1.42 -r1.43 src/usr.bin/ipcs/ipcs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ipcs/Makefile diff -u src/usr.bin/ipcs/Makefile:1.10 src/usr.bin/ipcs/Makefile:1.11 --- src/usr.bin/ipcs/Makefile:1.10 Tue Apr 14 22:15:21 2009 +++ src/usr.bin/ipcs/Makefile Wed Jun 11 14:57:55 2014 @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.10 2009/04/14 22:15:21 lukem Exp $ +# $NetBSD: Makefile,v 1.11 2014/06/11 14:57:55 joerg Exp $ PROG= ipcs -DPADD+= ${LIBKVM} -LDADD+= -lkvm .include bsd.prog.mk Index: src/usr.bin/ipcs/ipcs.1 diff -u src/usr.bin/ipcs/ipcs.1:1.19 src/usr.bin/ipcs/ipcs.1:1.20 --- src/usr.bin/ipcs/ipcs.1:1.19 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/ipcs/ipcs.1 Wed Jun 11 14:57:55 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: ipcs.1,v 1.19 2014/03/18 18:20:45 riastradh Exp $ +.\ $NetBSD: ipcs.1,v 1.20 2014/06/11 14:57:55 joerg Exp $ .\ .\ Copyright (c) 1994 SigmaSoft, Th. Lockert .\ All rights reserved. @@ -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. .\ -.Dd March 21, 2004 +.Dd June 11, 2014 .Dt IPCS 1 .Os .Sh NAME @@ -32,8 +32,6 @@ .Sh SYNOPSIS .Nm .Op Fl abcmopqstMQST -.Op Fl C Ar system -.Op Fl N Ar core .Sh DESCRIPTION The .Nm @@ -95,17 +93,8 @@ of the last control operation on an IPC the last send or receive of a message, the last attach or detach of a shared memory segment, or the last operation on a semaphore. -.It Fl C Ar system -Extract the name list from the specified system instead of the -default -.Dq Pa /netbsd . .It Fl M Display system information about shared memory. -.It Fl N Ar core -Extract values associated with the name list from the specified -core instead of the default -.Dq Pa /dev/kmem . -and semaphores. .It Fl Q Display system information about messages queues. .It Fl S @@ -138,13 +127,6 @@ System data structures may change while is running; the output of .Nm is not guaranteed to be consistent. -.Sh FILES -.Bl -tag -width /etc/passwd -compact -.It Pa /dev/kmem -default kernel memory -.It Pa /netbsd -default system name list -.El .Sh SEE ALSO .Xr ipcrm 1 , .Xr shmat 2 , Index: src/usr.bin/ipcs/ipcs.c diff -u src/usr.bin/ipcs/ipcs.c:1.42 src/usr.bin/ipcs/ipcs.c:1.43 --- src/usr.bin/ipcs/ipcs.c:1.42 Sun Jan 18 01:10:34 2009 +++ src/usr.bin/ipcs/ipcs.c Wed Jun 11 14:57:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ipcs.c,v 1.42 2009/01/18 01:10:34 lukem Exp $ */ +/* $NetBSD: ipcs.c,v 1.43 2014/06/11 14:57:55 joerg Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -66,9 +66,7 @@ #include err.h #include fcntl.h #include grp.h -#include kvm.h #include limits.h -#include nlist.h #include paths.h #include pwd.h #include stdio.h @@ -90,13 +88,11 @@ #define PID 8 #define TIME 16 -static char *core = NULL, *namelist = NULL; static int display = 0; static int option = 0; static void cvt_time(time_t, char *, size_t); static char*fmt_perm(u_short); -static void ipcs_kvm(void); static void msg_sysctl(void); static void sem_sysctl(void); static void shm_sysctl(void); @@ -174,7 +170,7 @@ main(int argc, char *argv[]) int i; time_t now; - while ((i = getopt(argc, argv, MmQqSsabC:cN:optT)) != -1) + while ((i = getopt(argc, argv, MmQqSsabcoptT)) != -1) switch (i) { case 'M': display |= SHMTOTAL; @@ -203,15 +199,9 @@ main(int argc, char *argv[]) case 'b': option |= BIGGEST; break; - case 'C': - core = optarg; - break; case 'c': option |= CREATOR; break; - case 'N': - namelist = optarg; - break; case 'o': option |= OUTSTANDING; break; @@ -229,22 +219,19 @@ main(int argc, char *argv[]) usage(); (void)time(now); - (void)printf(IPC status from %s as of %s\n, + (void)printf(IPC status from running system as of %s\n, /* and extra \n from ctime(3) */ - core == NULL ? running system : core, ctime(now)); + ctime(now)); if (display == 0) display = SHMINFO | MSGINFO | SEMINFO; - if (core == NULL) { - if (display (MSGINFO | MSGTOTAL)) - msg_sysctl(); - if (display (SHMINFO | SHMTOTAL)) - shm_sysctl(); - if (display (SEMINFO | SEMTOTAL)) - sem_sysctl(); - } else - ipcs_kvm(); + if (display (MSGINFO | MSGTOTAL)) + msg_sysctl(); + if (display (SHMINFO | SHMTOTAL)) + shm_sysctl(); + if (display (SEMINFO | SEMTOTAL)) + sem_sysctl(); return 0; } @@ -680,214 +667,12 @@ done: free(buf); } -static struct nlist symbols[] = { - { .n_name = _sema }, -#define X_SEMA 0 - { .n_name = _seminfo },
CVS commit: [netbsd-6] src/sys/arch/mips
Module Name:src Committed By: msaitoh Date: Wed Jun 11 15:38:05 UTC 2014 Modified Files: src/sys/arch/mips/include [netbsd-6]: pmap.h src/sys/arch/mips/mips [netbsd-6]: pmap.c pmap_segtab.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1068): sys/arch/mips/mips/pmap.c: revision 1.214 sys/arch/mips/include/pmap.h: revision 1.63 sys/arch/mips/mips/pmap_segtab.c: revision 1.8 Deal with incompatible cache aliases. Specifically, - always flush an ephemeral page on unmap - track unmanaged mappings (mappings entered via pmap_kenter_pa) for aliases where required and handle appropriately (via pmap_enter_pv) Hopefully this (finally) addresses the instability reported in the following PRs: PR/44900 - R5000/Rm5200 mips ports are broken PR/46890 - upcoming NetBSD 6.0 release is very unstable/unusable on cobalt qube2 PR/48628 - cobalt and hpcmips ports are dead To generate a diff of this commit: cvs rdiff -u -r1.61.8.1 -r1.61.8.2 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.207.2.2 -r1.207.2.3 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/arch/mips/mips/pmap_segtab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.61.8.1 src/sys/arch/mips/include/pmap.h:1.61.8.2 --- src/sys/arch/mips/include/pmap.h:1.61.8.1 Thu Jul 5 18:39:42 2012 +++ src/sys/arch/mips/include/pmap.h Wed Jun 11 15:38:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.61.8.1 2012/07/05 18:39:42 riz Exp $ */ +/* $NetBSD: pmap.h,v 1.61.8.2 2014/06/11 15:38:04 msaitoh Exp $ */ /* * Copyright (c) 1992, 1993 @@ -283,6 +283,7 @@ void pmap_prefer(vaddr_t, vaddr_t *, vsi #endif /* MIPS3_PLUS */ #define PMAP_STEAL_MEMORY /* enable pmap_steal_memory() */ +#define PMAP_ENABLE_PMAP_KMPAGE /* enable the PMAP_KMPAGE flag */ /* * Alternate mapping hooks for pool pages. Avoids thrashing the TLB. @@ -329,6 +330,7 @@ typedef struct pv_entry { struct pv_entry *pv_next; /* next pv_entry */ struct pmap *pv_pmap; /* pmap where mapping lies */ vaddr_t pv_va; /* virtual address for mapping */ +#define PV_KENTER 0x001 } *pv_entry_t; #define PG_MD_UNCACHED 0x0001 /* page is mapped uncached */ Index: src/sys/arch/mips/mips/pmap.c diff -u src/sys/arch/mips/mips/pmap.c:1.207.2.2 src/sys/arch/mips/mips/pmap.c:1.207.2.3 --- src/sys/arch/mips/mips/pmap.c:1.207.2.2 Wed May 21 20:39:17 2014 +++ src/sys/arch/mips/mips/pmap.c Wed Jun 11 15:38:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.207.2.2 2014/05/21 20:39:17 bouyer Exp $ */ +/* $NetBSD: pmap.c,v 1.207.2.3 2014/06/11 15:38:05 msaitoh Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.207.2.2 2014/05/21 20:39:17 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.207.2.3 2014/06/11 15:38:05 msaitoh Exp $); /* * Manages physical address maps. @@ -317,7 +317,7 @@ u_int pmap_page_colormask; /* Forward function declarations */ void pmap_remove_pv(pmap_t, vaddr_t, struct vm_page *, bool); -void pmap_enter_pv(pmap_t, vaddr_t, struct vm_page *, u_int *); +void pmap_enter_pv(pmap_t, vaddr_t, struct vm_page *, u_int *, int); pt_entry_t *pmap_pte(pmap_t, vaddr_t); /* @@ -386,13 +386,13 @@ pmap_page_syncicache(struct vm_page *pg) } PG_MD_PVLIST_UNLOCK(md); kpreempt_disable(); - pmap_tlb_syncicache(md-pvh_first.pv_va, onproc); + pmap_tlb_syncicache(trunc_page(md-pvh_first.pv_va), onproc); kpreempt_enable(); #else if (MIPS_HAS_R4K_MMU) { if (PG_MD_CACHED_P(md)) { mips_icache_sync_range_index( - md-pvh_first.pv_va, PAGE_SIZE); + trunc_page(md-pvh_first.pv_va), PAGE_SIZE); } } else { mips_icache_sync_range(MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(pg)), @@ -436,10 +436,10 @@ pmap_map_ephemeral_page(struct vm_page * */ (void)PG_MD_PVLIST_LOCK(md, false); if (PG_MD_CACHED_P(md) - mips_cache_badalias(pv-pv_va, va)) - mips_dcache_wbinv_range_index(pv-pv_va, PAGE_SIZE); - if (pv-pv_pmap == NULL) - pv-pv_va = va; + mips_cache_badalias(pv-pv_va, va)) { + mips_dcache_wbinv_range_index(trunc_page(pv-pv_va), + PAGE_SIZE); + } PG_MD_PVLIST_UNLOCK(md); } @@ -450,23 +450,13 @@ static void pmap_unmap_ephemeral_page(struct vm_page *pg, vaddr_t va, pt_entry_t old_pt_entry) { - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - pv_entry_t pv = md-pvh_first; - - if (MIPS_CACHE_VIRTUAL_ALIAS) { - (void)PG_MD_PVLIST_LOCK(md, false); - if (PG_MD_CACHED_P(md) - || (pv-pv_pmap != NULL - mips_cache_badalias(pv-pv_va, va))) { - /* - * If this page was previously cached or we had to use an - * incompatible alias and it has a valid mapping, flush it - * from the cache. - */ - mips_dcache_wbinv_range(va, PAGE_SIZE); - } -
CVS commit: [netbsd-6] src/external/mit/xorg/lib/fontconfig/etc
Module Name:src Committed By: msaitoh Date: Wed Jun 11 15:46:39 UTC 2014 Modified Files: src/external/mit/xorg/lib/fontconfig/etc [netbsd-6]: fonts.conf Log Message: Pull up following revision(s) (requested by wiz in ticket #1077): external/mit/xorg/lib/fontconfig/etc/fonts.conf: revision 1.7 via patch Also look in new pkgsrc default path, /usr/pkg/share/fonts. Noted by tsutsui. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.6.1 \ src/external/mit/xorg/lib/fontconfig/etc/fonts.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/fontconfig/etc/fonts.conf diff -u src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.5 src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.5.6.1 --- src/external/mit/xorg/lib/fontconfig/etc/fonts.conf:1.5 Sat Feb 12 04:49:19 2011 +++ src/external/mit/xorg/lib/fontconfig/etc/fonts.conf Wed Jun 11 15:46:39 2014 @@ -1,6 +1,6 @@ ?xml version=1.0? !DOCTYPE fontconfig SYSTEM fonts.dtd -!-- $NetBSD: fonts.conf,v 1.5 2011/02/12 04:49:19 jmcneill Exp $ -- +!-- $NetBSD: fonts.conf,v 1.5.6.1 2014/06/11 15:46:39 msaitoh Exp $ -- !-- /etc/fonts/fonts.conf file to configure system font access -- fontconfig @@ -26,6 +26,7 @@ dir/usr/X11R7/lib/X11/fonts/dir dir/usr/pkg/lib/X11/fonts/dir + dir/usr/pkg/share/fonts/dir dir~/.fonts/dir !--
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Wed Jun 11 15:47:54 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1068 and 1077. To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.117 src/doc/CHANGES-6.2:1.1.2.118 --- src/doc/CHANGES-6.2:1.1.2.117 Fri Jun 6 05:10:59 2014 +++ src/doc/CHANGES-6.2 Wed Jun 11 15:47:54 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.117 2014/06/06 05:10:59 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.118 2014/06/11 15:47:54 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -2887,3 +2887,17 @@ crypto/external/bsd/openssl/lib/libcrypt CVE-2014-0195, CVE-2014-3470 and fix some double free. Avoid NULL dereference. (FreeBSD SA14:10). [christos, ticket #1078] + +sys/arch/mips/include/pmap.h 1.63 +sys/arch/mips/mips/pmap.c 1.214 +sys/arch/mips/mips/pmap_segtab.c 1.8 + + Deal with incompatible cache aliases. Hopefully this addresses the + instability reported in PR#44900, PR#46890 and PR#48628. + [skrll, ticket #1068] + +external/mit/xorg/lib/fontconfig/etc/fonts.conf 1.7 via patch + + Also look in new pkgsrc default path, /usr/pkg/share/fonts. + Noted by tsutsui. + [wiz, ticket #1077]
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 16:45:06 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Check bounds more carefully to avoid integer overflow. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.88 src/sys/dev/pci/agp_i810.c:1.89 --- src/sys/dev/pci/agp_i810.c:1.88 Wed Jun 11 14:04:48 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 16:45:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.88 2014/06/11 14:04:48 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.89 2014/06/11 16:45:06 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.88 2014/06/11 14:04:48 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.89 2014/06/11 16:45:06 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1123,7 +1123,8 @@ agp_i810_alloc_memory(struct agp_softc * return NULL; if ((size (AGP_PAGE_SIZE - 1)) != 0) return NULL; - if (sc-as_allocated + size sc-as_maxmem) + KASSERT(sc-as_allocated = sc-as_maxmem); + if (size (sc-as_maxmem - sc-as_allocated)) return NULL; switch (type) { case AGP_I810_MEMTYPE_MAIN:
CVS commit: src/games/tetris
Module Name:src Committed By: christos Date: Wed Jun 11 16:47:39 UTC 2014 Modified Files: src/games/tetris: screen.c shapes.c tetris.c tetris.h Log Message: Add a little color. In order to minimize logic differences, keep 0 as the empty board value, and since 7 is white, turn white into black (0) when painting. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/games/tetris/screen.c cvs rdiff -u -r1.8 -r1.9 src/games/tetris/shapes.c cvs rdiff -u -r1.24 -r1.25 src/games/tetris/tetris.c cvs rdiff -u -r1.12 -r1.13 src/games/tetris/tetris.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/tetris/screen.c diff -u src/games/tetris/screen.c:1.27 src/games/tetris/screen.c:1.28 --- src/games/tetris/screen.c:1.27 Mon Oct 3 08:32:28 2011 +++ src/games/tetris/screen.c Wed Jun 11 12:47:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: screen.c,v 1.27 2011/10/03 12:32:28 roy Exp $ */ +/* $NetBSD: screen.c,v 1.28 2014/06/11 16:47:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -94,6 +94,18 @@ moveto(int r, int c) putpad(buf); } +static void +setcolor(int c) +{ + char *buf; + if (set_a_foreground == NULL) + return; + + buf = tiparm(set_a_foreground, c == 7 ? 0 : c); + if (buf != NULL) + putpad(buf); +} + /* * Set up from termcap. */ @@ -312,6 +324,7 @@ scr_update(void) /* draw */ putpad(enter_standout_mode); + setcolor(nextshape-color); moveto(r, 2*c); putstr( ); for(i=0; i3; i++) { @@ -349,7 +362,14 @@ scr_update(void) exit_standout_mode); cur_so = so; } +setcolor(so); +#ifdef DEBUG +char buf[3]; +snprintf(buf, sizeof(buf), %d%d, so, so); +putstr(buf); +#else putstr( ); +#endif } else putstr(so ? XX : ); ccol = i + 1; Index: src/games/tetris/shapes.c diff -u src/games/tetris/shapes.c:1.8 src/games/tetris/shapes.c:1.9 --- src/games/tetris/shapes.c:1.8 Mon May 25 00:33:53 2009 +++ src/games/tetris/shapes.c Wed Jun 11 12:47:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: shapes.c,v 1.8 2009/05/25 04:33:53 dholland Exp $ */ +/* $NetBSD: shapes.c,v 1.9 2014/06/11 16:47:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -53,25 +53,25 @@ #define BR B_COLS+1 /* bottom right */ const struct shape shapes[] = { - /* 0*/ { 7, { TL, TC, MR, } }, - /* 1*/ { 8, { TC, TR, ML, } }, - /* 2*/ { 9, { ML, MR, BC, } }, - /* 3*/ { 3, { TL, TC, ML, } }, - /* 4*/ { 12, { ML, BL, MR, } }, - /* 5*/ { 15, { ML, BR, MR, } }, - /* 6*/ { 18, { ML, MR, 2 } }, /* sticks out */ - /* 7*/ { 0, { TC, ML, BL, } }, - /* 8*/ { 1, { TC, MR, BR, } }, - /* 9*/ { 10, { TC, MR, BC, } }, - /*10*/ { 11, { TC, ML, MR, } }, - /*11*/ { 2, { TC, ML, BC, } }, - /*12*/ { 13, { TC, BC, BR, } }, - /*13*/ { 14, { TR, ML, MR, } }, - /*14*/ { 4, { TL, TC, BC, } }, - /*15*/ { 16, { TR, TC, BC, } }, - /*16*/ { 17, { TL, MR, ML, } }, - /*17*/ { 5, { TC, BC, BL, } }, - /*18*/ { 6, { TC, BC, 2*B_COLS } } /* sticks out */ + /* 0*/ { 7, 7, { TL, TC, MR, } }, + /* 1*/ { 1, 8, { TC, TR, ML, } }, + /* 2*/ { 2, 9, { ML, MR, BC, } }, + /* 3*/ { 3, 3, { TL, TC, ML, } }, + /* 4*/ { 4, 12, { ML, BL, MR, } }, + /* 5*/ { 5, 15, { ML, BR, MR, } }, + /* 6*/ { 6, 18, { ML, MR, 2 } }, /* sticks out */ + /* 7*/ { 7, 0, { TC, ML, BL, } }, + /* 8*/ { 1, 1, { TC, MR, BR, } }, + /* 9*/ { 2, 10, { TC, MR, BC, } }, + /*10*/ { 2, 11, { TC, ML, MR, } }, + /*11*/ { 2, 2, { TC, ML, BC, } }, + /*12*/ { 4, 13, { TC, BC, BR, } }, + /*13*/ { 4, 14, { TR, ML, MR, } }, + /*14*/ { 4, 4, { TL, TC, BC, } }, + /*15*/ { 5, 16, { TR, TC, BC, } }, + /*16*/ { 5, 17, { TL, MR, ML, } }, + /*17*/ { 5, 5, { TC, BC, BL, } }, + /*18*/ { 6, 6, { TC, BC, 2*B_COLS } } /* sticks out */ }; /* @@ -97,6 +97,7 @@ void place(const struct shape *shape, int pos, int onoff) { const int *o = shape-off; + onoff = onoff ? shape-color : 0; board[pos] = onoff; board[pos + *o++] = onoff; Index: src/games/tetris/tetris.c diff -u src/games/tetris/tetris.c:1.24 src/games/tetris/tetris.c:1.25 --- src/games/tetris/tetris.c:1.24 Wed Aug 31 12:24:56 2011 +++ src/games/tetris/tetris.c Wed Jun 11 12:47:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.c,v 1.24 2011/08/31 16:24:56 plunky Exp $ */ +/* $NetBSD: tetris.c,v 1.25 2014/06/11 16:47:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -92,7 +92,7 @@ setup_board(void) p = board; for (i = B_SIZE; i; i--) - *p++ = i = (2 * B_COLS) || (i % B_COLS) 2; + *p++ = (i = (2 * B_COLS) || (i % B_COLS) 2) ? 7 : 0; } /* Index: src/games/tetris/tetris.h diff -u src/games/tetris/tetris.h:1.12 src/games/tetris/tetris.h:1.13 --- src/games/tetris/tetris.h:1.12 Wed Aug 12 04:51:21 2009 +++ src/games/tetris/tetris.h Wed Jun 11 12:47:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.h,v 1.12 2009/08/12 08:51:21 dholland Exp $ */ +/* $NetBSD: tetris.h,v 1.13 2014/06/11 16:47:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -123,6
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 16:48:15 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Add missing bus_dmamap_destroy. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.89 src/sys/dev/pci/agp_i810.c:1.90 --- src/sys/dev/pci/agp_i810.c:1.89 Wed Jun 11 16:45:06 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 16:48:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.89 2014/06/11 16:45:06 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.90 2014/06/11 16:48:15 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.89 2014/06/11 16:45:06 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.90 2014/06/11 16:48:15 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1195,6 +1195,8 @@ agp_i810_free_memory(struct agp_softc *s switch (mem-am_type) { case AGP_I810_MEMTYPE_MAIN: + bus_dmamap_destroy(sc-as_dmat, mem-am_dmamap); + break; case AGP_I810_MEMTYPE_DCACHE: break; case AGP_I810_MEMTYPE_HWCURSOR:
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 16:58:29 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Add missing bus_dmamap_destroy. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.90 src/sys/dev/pci/agp_i810.c:1.91 --- src/sys/dev/pci/agp_i810.c:1.90 Wed Jun 11 16:48:15 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 16:58:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.90 2014/06/11 16:48:15 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.91 2014/06/11 16:58:29 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.90 2014/06/11 16:48:15 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.91 2014/06/11 16:58:29 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1242,7 +1242,7 @@ agp_i810_bind_memory(struct agp_softc *s switch (mem-am_type) { case AGP_I810_MEMTYPE_MAIN: - error = agp_i810_bind_memory_main(sc, mem, offset); + error = agp_generic_bind_memory(sc, mem, offset); break; case AGP_I810_MEMTYPE_DCACHE: error = agp_i810_bind_memory_dcache(sc, mem, offset); @@ -1261,7 +1261,7 @@ agp_i810_bind_memory(struct agp_softc *s return 0; } -static int +static int __unused agp_i810_bind_memory_main(struct agp_softc *sc, struct agp_memory *mem, off_t offset) { @@ -1294,7 +1294,7 @@ agp_i810_bind_memory_main(struct agp_sof segs = malloc(nseg_alloc * sizeof(*segs), M_AGP, M_WAITOK); /* Allocate DMA-safe physical segments. */ - error = bus_dmamem_alloc(sc-as_dmat, mem-am_size, PAGE_SIZE, + error = bus_dmamem_alloc(sc-as_dmat, mem-am_size, AGP_PAGE_SIZE, 0, segs, nseg_alloc, nseg, BUS_DMA_WAITOK); if (error) goto fail1; @@ -1414,7 +1414,7 @@ agp_i810_unbind_memory(struct agp_softc case AGP_I810_MEMTYPE_MAIN: case AGP_I810_MEMTYPE_HWCURSOR: for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) - agp_i810_unbind_page(sc, mem-am_offset + i); + (void)agp_i810_unbind_page(sc, mem-am_offset + i); break; case AGP_I810_MEMTYPE_DCACHE: KASSERT(isc-chiptype == CHIP_I810);
CVS commit: src/usr.sbin/iostat
Module Name:src Committed By: joerg Date: Wed Jun 11 17:01:04 UTC 2014 Modified Files: src/usr.sbin/iostat: Makefile iostat.8 iostat.c Log Message: Remove KVM related options. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/iostat/Makefile cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/iostat/iostat.8 cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/iostat/iostat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/iostat/Makefile diff -u src/usr.sbin/iostat/Makefile:1.24 src/usr.sbin/iostat/Makefile:1.25 --- src/usr.sbin/iostat/Makefile:1.24 Fri Jan 7 03:12:27 2011 +++ src/usr.sbin/iostat/Makefile Wed Jun 11 17:01:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2011/01/07 03:12:27 jakllsch Exp $ +# $NetBSD: Makefile,v 1.25 2014/06/11 17:01:04 joerg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include bsd.own.mk @@ -13,7 +13,7 @@ CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/vmst # drvstats.c pulled in from ../../usr.bin/vmstat SRCS= drvstats.c iostat.c -DPADD= ${LIBKVM} ${LIBM} -LDADD= -lkvm -lm +DPADD= ${LIBM} +LDADD= -lm .include bsd.prog.mk Index: src/usr.sbin/iostat/iostat.8 diff -u src/usr.sbin/iostat/iostat.8:1.22 src/usr.sbin/iostat/iostat.8:1.23 --- src/usr.sbin/iostat/iostat.8:1.22 Thu Aug 7 11:25:22 2003 +++ src/usr.sbin/iostat/iostat.8 Wed Jun 11 17:01:04 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: iostat.8,v 1.22 2003/08/07 11:25:22 agc Exp $ +.\ $NetBSD: iostat.8,v 1.23 2014/06/11 17:01:04 joerg Exp $ .\ .\ Copyright (c) 1985, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ from: @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\ -.Dd March 1, 2003 +.Dd June 11, 2014 .Dt IOSTAT 8 .Os .Sh NAME @@ -41,8 +41,6 @@ statistics .Nm .Op Fl CdDITx .Op Fl c Ar count -.Op Fl M Ar core -.Op Fl N Ar system .Op Fl w Ar wait .Op Ar drives .Sh DESCRIPTION @@ -106,13 +104,6 @@ transfers, and time spent in transfers. Use of this flag disables the default display. .It Fl I Show the running total values, rather than an average. -.It Fl M Ar core -Extract values associated with the name list from the specified core -instead of the default -.Dq Pa /dev/mem . -.It Fl N Ar system -Extract the name list from the specified system instead of the default -.Dq Pa /netbsd . .It Fl T Show tty statistics. This is enabled by default unless the @@ -191,13 +182,6 @@ Seconds spent in disk activity % of CPU time in idle mode .El .El -.Sh FILES -.Bl -tag -width /dev/mem -compact -.It Pa /netbsd -Default kernel namelist. -.It Pa /dev/mem -Default memory file. -.El .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , Index: src/usr.sbin/iostat/iostat.c diff -u src/usr.sbin/iostat/iostat.c:1.60 src/usr.sbin/iostat/iostat.c:1.61 --- src/usr.sbin/iostat/iostat.c:1.60 Tue Aug 30 19:06:06 2011 +++ src/usr.sbin/iostat/iostat.c Wed Jun 11 17:01:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: iostat.c,v 1.60 2011/08/30 19:06:06 joerg Exp $ */ +/* $NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $ */ /* * Copyright (c) 1996 John M. Vinopal @@ -71,7 +71,7 @@ __COPYRIGHT(@(#) Copyright (c) 1986, 19 #if 0 static char sccsid[] = @(#)iostat.c 8.3 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: iostat.c,v 1.60 2011/08/30 19:06:06 joerg Exp $); +__RCSID($NetBSD: iostat.c,v 1.61 2014/06/11 17:01:04 joerg Exp $); #endif #endif /* not lint */ @@ -91,9 +91,6 @@ __RCSID($NetBSD: iostat.c,v 1.60 2011/0 #include drvstats.h -/* Namelist and memory files. */ -char *nlistf, *memf; - int hz; static int reps, interval; static int todo = 0; @@ -130,7 +127,7 @@ main(int argc, char *argv[]) struct timespec tv; struct ttysize ts; - while ((ch = getopt(argc, argv, Cc:dDIM:N:Tw:x)) != -1) + while ((ch = getopt(argc, argv, Cc:dDITw:x)) != -1) switch (ch) { case 'c': if ((reps = atoi(optarg)) = 0) @@ -150,12 +147,6 @@ main(int argc, char *argv[]) case 'I': todo |= SHOW_TOTALS; break; - case 'M': - memf = optarg; - break; - case 'N': - nlistf = optarg; - break; case 'T': todo |= SHOW_TTY; break; @@ -450,8 +441,8 @@ static void usage(void) { - (void)fprintf(stderr, usage: iostat [-CdDITx] [-c count] [-M core] - [-N system] [-w wait] [drives]\n); + (void)fprintf(stderr, usage: iostat [-CdDITx] [-c count] + [-w wait] [drives]\n); exit(1); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 17:01:31 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Back out previous mistake. If you mixed `cvs diff' and `cvs commit' in your shell history, remember to hit C-p the right number of times before RET. Oops. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.91 src/sys/dev/pci/agp_i810.c:1.92 --- src/sys/dev/pci/agp_i810.c:1.91 Wed Jun 11 16:58:29 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 17:01:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.91 2014/06/11 16:58:29 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.92 2014/06/11 17:01:31 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.91 2014/06/11 16:58:29 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.92 2014/06/11 17:01:31 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1242,7 +1242,7 @@ agp_i810_bind_memory(struct agp_softc *s switch (mem-am_type) { case AGP_I810_MEMTYPE_MAIN: - error = agp_generic_bind_memory(sc, mem, offset); + error = agp_i810_bind_memory_main(sc, mem, offset); break; case AGP_I810_MEMTYPE_DCACHE: error = agp_i810_bind_memory_dcache(sc, mem, offset); @@ -1261,7 +1261,7 @@ agp_i810_bind_memory(struct agp_softc *s return 0; } -static int __unused +static int agp_i810_bind_memory_main(struct agp_softc *sc, struct agp_memory *mem, off_t offset) { @@ -1294,7 +1294,7 @@ agp_i810_bind_memory_main(struct agp_sof segs = malloc(nseg_alloc * sizeof(*segs), M_AGP, M_WAITOK); /* Allocate DMA-safe physical segments. */ - error = bus_dmamem_alloc(sc-as_dmat, mem-am_size, AGP_PAGE_SIZE, + error = bus_dmamem_alloc(sc-as_dmat, mem-am_size, PAGE_SIZE, 0, segs, nseg_alloc, nseg, BUS_DMA_WAITOK); if (error) goto fail1; @@ -1414,7 +1414,7 @@ agp_i810_unbind_memory(struct agp_softc case AGP_I810_MEMTYPE_MAIN: case AGP_I810_MEMTYPE_HWCURSOR: for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) - (void)agp_i810_unbind_page(sc, mem-am_offset + i); + agp_i810_unbind_page(sc, mem-am_offset + i); break; case AGP_I810_MEMTYPE_DCACHE: KASSERT(isc-chiptype == CHIP_I810);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 17:02:09 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Ignore result of agp_i810_unbind_page in agp_i810_unbind_memory. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.92 src/sys/dev/pci/agp_i810.c:1.93 --- src/sys/dev/pci/agp_i810.c:1.92 Wed Jun 11 17:01:31 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 17:02:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.92 2014/06/11 17:01:31 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.93 2014/06/11 17:02:09 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.92 2014/06/11 17:01:31 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.93 2014/06/11 17:02:09 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1414,7 +1414,7 @@ agp_i810_unbind_memory(struct agp_softc case AGP_I810_MEMTYPE_MAIN: case AGP_I810_MEMTYPE_HWCURSOR: for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) - agp_i810_unbind_page(sc, mem-am_offset + i); + (void)agp_i810_unbind_page(sc, mem-am_offset + i); break; case AGP_I810_MEMTYPE_DCACHE: KASSERT(isc-chiptype == CHIP_I810);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 17:15:18 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Fix various mistakes in yesterday's commit. - Set mem-am_nseg, particularly before trying to use it. - Avoid error-prone local copies in agp_i810_bind_memory_main. - Omit missing DMA unload/free in agp_i810_unbind_memory. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.93 src/sys/dev/pci/agp_i810.c:1.94 --- src/sys/dev/pci/agp_i810.c:1.93 Wed Jun 11 17:02:09 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 17:15:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.93 2014/06/11 17:02:09 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.94 2014/06/11 17:15:18 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.93 2014/06/11 17:02:09 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.94 2014/06/11 17:15:18 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1266,8 +1266,7 @@ agp_i810_bind_memory_main(struct agp_sof off_t offset) { struct agp_i810_softc *const isc = sc-as_chipc; - bus_dma_segment_t *segs; - int nseg_alloc, nseg; + int nseg; uint32_t i, j; unsigned seg; bus_addr_t addr; @@ -1286,29 +1285,30 @@ agp_i810_bind_memory_main(struct agp_sof return EINVAL; /* Allocate an array of DMA segments. */ - nseg_alloc = (mem-am_size AGP_PAGE_SHIFT); - if (nseg_alloc (SIZE_MAX / sizeof(*segs))) { + nseg = (mem-am_size AGP_PAGE_SHIFT); + if (nseg (SIZE_MAX / sizeof(*mem-am_dmaseg))) { error = ENOMEM; goto fail0; } - segs = malloc(nseg_alloc * sizeof(*segs), M_AGP, M_WAITOK); + mem-am_dmaseg = malloc(nseg*sizeof(*mem-am_dmaseg), M_AGP, M_WAITOK); /* Allocate DMA-safe physical segments. */ error = bus_dmamem_alloc(sc-as_dmat, mem-am_size, PAGE_SIZE, - 0, segs, nseg_alloc, nseg, BUS_DMA_WAITOK); + 0, mem-am_dmaseg, nseg, mem-am_nseg, BUS_DMA_WAITOK); if (error) goto fail1; - KASSERT(nseg = nseg_alloc); + KASSERT(mem-am_nseg = nseg); /* Shrink the array of DMA segments if we can. */ - if (nseg nseg_alloc) { - segs = realloc(segs, nseg, M_AGP, M_WAITOK); - nseg_alloc = nseg; + if (mem-am_nseg nseg) { + mem-am_dmaseg = realloc(mem-am_dmaseg, mem-am_nseg, M_AGP, + M_WAITOK); + nseg = mem-am_nseg; } /* Load the DMA map. */ error = bus_dmamap_load_raw(sc-as_dmat, mem-am_dmamap, - segs, mem-am_nseg, mem-am_size, BUS_DMA_WAITOK); + mem-am_dmaseg, mem-am_nseg, mem-am_size, BUS_DMA_WAITOK); if (error) goto fail2; @@ -1334,15 +1334,16 @@ agp_i810_bind_memory_main(struct agp_sof } /* Success! */ - mem-am_dmaseg = segs; mem-am_offset = offset; return 0; fail3: for (j = 0; j i; j += AGP_PAGE_SIZE) (void)agp_i810_unbind_page(sc, offset + j); bus_dmamap_unload(sc-as_dmat, mem-am_dmamap); -fail2: bus_dmamem_free(sc-as_dmat, segs, nseg_alloc); -fail1: free(segs, M_AGP); +fail2: bus_dmamem_free(sc-as_dmat, mem-am_dmaseg, mem-am_nseg); +fail1: free(mem-am_dmaseg, M_AGP); + mem-am_dmaseg = NULL; + mem-am_nseg = 0; fail0: KASSERT(error); return error; } @@ -1412,15 +1413,23 @@ agp_i810_unbind_memory(struct agp_softc switch (mem-am_type) { case AGP_I810_MEMTYPE_MAIN: - case AGP_I810_MEMTYPE_HWCURSOR: for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) (void)agp_i810_unbind_page(sc, mem-am_offset + i); + bus_dmamap_unload(sc-as_dmat, mem-am_dmamap); + bus_dmamem_free(sc-as_dmat, mem-am_dmaseg, mem-am_nseg); + free(mem-am_dmaseg, M_AGP); + mem-am_offset = 0; break; case AGP_I810_MEMTYPE_DCACHE: KASSERT(isc-chiptype == CHIP_I810); for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) (void)agp_i810_write_gtt_entry(isc, i, 0); break; + case AGP_I810_MEMTYPE_HWCURSOR: + for (i = 0; i mem-am_size; i += AGP_PAGE_SIZE) + (void)agp_i810_unbind_page(sc, mem-am_offset + i); + mem-am_offset = 0; + break; default: panic(invalid agp i810 memory type: %d, mem-am_type); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Wed Jun 11 19:35:46 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Fix fencepost. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.94 src/sys/dev/pci/agp_i810.c:1.95 --- src/sys/dev/pci/agp_i810.c:1.94 Wed Jun 11 17:15:18 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 19:35:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.94 2014/06/11 17:15:18 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.95 2014/06/11 19:35:46 riastradh Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.94 2014/06/11 17:15:18 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.95 2014/06/11 19:35:46 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -1323,7 +1323,7 @@ agp_i810_bind_memory_main(struct agp_sof do { KASSERT(0 len); KASSERT((len (AGP_PAGE_SIZE - 1)) == 0); - KASSERT((offset + i) (mem-am_size - len)); + KASSERT((offset + i) = (mem-am_size - len)); error = agp_i810_bind_page(sc, offset + i, addr); if (error) goto fail3;
CVS commit: src/sys/dev/pckbport
Module Name:src Committed By: riastradh Date: Wed Jun 11 20:09:17 UTC 2014 Modified Files: src/sys/dev/pckbport: wskbdmap_mfii.c Log Message: Nuke trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pckbport/wskbdmap_mfii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pckbport/wskbdmap_mfii.c diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.23 src/sys/dev/pckbport/wskbdmap_mfii.c:1.24 --- src/sys/dev/pckbport/wskbdmap_mfii.c:1.23 Sat Oct 13 17:51:51 2012 +++ src/sys/dev/pckbport/wskbdmap_mfii.c Wed Jun 11 20:09:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbdmap_mfii.c,v 1.23 2012/10/13 17:51:51 jdc Exp $ */ +/* $NetBSD: wskbdmap_mfii.c,v 1.24 2014/06/11 20:09:17 riastradh Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wskbdmap_mfii.c,v 1.23 2012/10/13 17:51:51 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: wskbdmap_mfii.c,v 1.24 2014/06/11 20:09:17 riastradh Exp $); #include opt_wskbdmap.h #include sys/types.h @@ -307,7 +307,7 @@ static const keysym_t pckbd_keydesc_sg[] KC(53), KS_minus, KS_underscore, KC(86), KS_less, KS_greater, KS_backslash, KC(184), KS_Mode_switch,KS_Multi_key, -}; +}; static const keysym_t pckbd_keydesc_sg_nodead[] = { /* pos normal shifted altgr shift-altgr */ @@ -516,21 +516,21 @@ static const keysym_t pckbd_keydesc_es[] KC(184), KS_Mode_switch, KS_Multi_key, }; -static const keysym_t pckbd_keydesc_cz[] = { -/* pos normal shifted altgr shift-altgr */ -KC(2), KS_plus, KS_1, KS_asciitilde, -KC(3), KS_ecaron, KS_2, KS_dead_caron, -KC(4), KS_scaron, KS_3, KS_dead_circumflex, -KC(5), KS_ccaron, KS_4, KS_dead_breve, -KC(6), KS_rcaron, KS_5, KS_dead_abovering, -KC(7), KS_zcaron, KS_6, KS_dead_ogonek, -KC(8), KS_yacute, KS_7, KS_dead_grave, -KC(9), KS_aacute, KS_8, KS_dead_dotaccent, -KC(10), KS_iacute, KS_9, KS_dead_acute, -KC(11), KS_eacute, KS_0, KS_dead_hungarumlaut, +static const keysym_t pckbd_keydesc_cz[] = { +/* pos normal shifted altgr shift-altgr */ +KC(2), KS_plus, KS_1, KS_asciitilde, +KC(3), KS_ecaron, KS_2, KS_dead_caron, +KC(4), KS_scaron, KS_3, KS_dead_circumflex, +KC(5), KS_ccaron, KS_4, KS_dead_breve, +KC(6), KS_rcaron, KS_5, KS_dead_abovering, +KC(7), KS_zcaron, KS_6, KS_dead_ogonek, +KC(8), KS_yacute, KS_7, KS_dead_grave, +KC(9), KS_aacute, KS_8, KS_dead_dotaccent, +KC(10), KS_iacute, KS_9, KS_dead_acute, +KC(11), KS_eacute, KS_0, KS_dead_hungarumlaut, KC(12), KS_equal, KS_percent, KS_dead_diaeresis, KC(13), KS_dead_acute, KS_dead_caron, KS_dead_cedilla, -KC(26), KS_uacute, KS_slash, +KC(26), KS_uacute, KS_slash, KC(27), KS_adiaeresis, KS_parenleft, KS_multiply, KC(39), KS_uabovering, KS_quotedbl, KS_dollar, KC(40), KS_section, KS_exclam, KS_ssharp, @@ -552,8 +552,8 @@ static const keysym_t pckbd_keydesc_cz[] KC(47), KS_v, KS_V, KS_at, KC(48), KS_b, KS_B, KS_braceleft, KC(49), KS_n, KS_N, KS_braceright, -KC(184), KS_Mode_switch,KS_Multi_key, -}; +KC(184), KS_Mode_switch,KS_Multi_key, +}; static const keysym_t pckbd_keydesc_pt[] = { /* pos normal shifted altgr shift-altgr */
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Wed Jun 11 22:34:26 UTC 2014 Modified Files: src/sys/dev/mii: gentbi.c Log Message: Print vendor and model like ukphy(4). To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/mii/gentbi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/mii/gentbi.c diff -u src/sys/dev/mii/gentbi.c:1.24 src/sys/dev/mii/gentbi.c:1.25 --- src/sys/dev/mii/gentbi.c:1.24 Mon Oct 19 18:41:13 2009 +++ src/sys/dev/mii/gentbi.c Wed Jun 11 22:34:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gentbi.c,v 1.24 2009/10/19 18:41:13 bouyer Exp $ */ +/* $NetBSD: gentbi.c,v 1.25 2014/06/11 22:34:26 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gentbi.c,v 1.24 2009/10/19 18:41:13 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: gentbi.c,v 1.25 2014/06/11 22:34:26 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -130,14 +130,26 @@ gentbiattach(device_t parent, device_t s struct mii_softc *sc = device_private(self); struct mii_attach_args *ma = aux; struct mii_data *mii = ma-mii_data; + int oui = MII_OUI(ma-mii_id1, ma-mii_id2); + int model = MII_MODEL(ma-mii_id2); + int rev = MII_REV(ma-mii_id2); + const char *descr; + + if ((descr = mii_get_descr(oui, model)) != NULL) + aprint_normal(: %s (OUI 0x%06x, model 0x%04x), rev. %d\n, + descr, oui, model, rev); + else + aprint_normal(: OUI 0x%06x, model 0x%04x, rev. %d\n, + oui, model, rev); - aprint_naive(: Media interface\n); - aprint_normal(: Generic ten-bit interface, rev. %d\n, - MII_REV(ma-mii_id2)); + aprint_naive(: Generic ten-bit interface\n); sc-mii_dev = self; sc-mii_inst = mii-mii_instance; sc-mii_phy = ma-mii_phyno; + sc-mii_mpd_oui = oui; + sc-mii_mpd_model = model; + sc-mii_mpd_rev = rev; sc-mii_funcs = gentbi_funcs; sc-mii_pdata = mii; sc-mii_flags = ma-mii_flags;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Thu Jun 12 03:23:58 UTC 2014 Modified Files: src/sys/dev/pci: agp_i810.c Log Message: Giving a 0 gtt_size for G4X causes a panic when you try to bus map 0 size. Give it 256, like the default aperture size for it. Now it works again. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.95 src/sys/dev/pci/agp_i810.c:1.96 --- src/sys/dev/pci/agp_i810.c:1.95 Wed Jun 11 15:35:46 2014 +++ src/sys/dev/pci/agp_i810.c Wed Jun 11 23:23:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.95 2014/06/11 19:35:46 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.96 2014/06/12 03:23:58 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.95 2014/06/11 19:35:46 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_i810.c,v 1.96 2014/06/12 03:23:58 christos Exp $); #include sys/param.h #include sys/systm.h @@ -823,7 +823,7 @@ agp_i810_init(struct agp_softc *sc) } break; case CHIP_G4X: - gtt_size = 0; + gtt_size = 256; break; default: panic(impossible chiptype %d, isc-chiptype);