CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: ozaki-r Date: Mon Mar 31 06:32:31 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.27 src/sys/arch/atari/stand/installboot/installboot.c:1.28 --- src/sys/arch/atari/stand/installboot/installboot.c:1.27 Sat Mar 29 05:03:43 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Mon Mar 31 06:32:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.27 2014/03/29 05:03:43 ozaki-r Exp $ */ +/* $NetBSD: installboot.c,v 1.28 2014/03/31 06:32:31 ozaki-r Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -228,7 +228,7 @@ install_fd(char *devnm, struct disklabel machpath = milanpath; else machpath = stdpath; - size_t xxboolen = strlen(mdecpath) + strlen(machpath) + 8; + size_t xxbootlen = strlen(mdecpath) + strlen(machpath) + 8; xxboot = alloca(xxbootlen); snprintf(xxboot, xxbootlen, "%s%sfdboot", mdecpath, machpath); bootxx = alloca(xxbootlen);
CVS commit: src/external/apache2/mDNSResponder/nss
Module Name:src Committed By: christos Date: Mon Mar 31 02:03:38 UTC 2014 Modified Files: src/external/apache2/mDNSResponder/nss: Makefile nss_mdnsd.c Log Message: Convert to the new thread safe gethostby{name,addr} nsswitch ABI. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/apache2/mDNSResponder/nss/Makefile \ src/external/apache2/mDNSResponder/nss/nss_mdnsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/nss/Makefile diff -u src/external/apache2/mDNSResponder/nss/Makefile:1.3 src/external/apache2/mDNSResponder/nss/Makefile:1.4 --- src/external/apache2/mDNSResponder/nss/Makefile:1.3 Sun Dec 13 03:02:36 2009 +++ src/external/apache2/mDNSResponder/nss/Makefile Sun Mar 30 22:03:38 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2009/12/13 08:02:36 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2014/03/31 02:03:38 christos Exp $ LIB= nss_mdnsd SHLIB_MAJOR= 0 @@ -13,6 +13,8 @@ NOPICINSTALL= # don't install _pic.a lib .include "${.CURDIR}/../Makefile.inc" +CPPFLAGS+=-I${NETBSDSRCDIR}/lib/libc/net + SRCS= nss_mdnsd.c LDADD+= -ldns_sd DPADD+= ${LIBDNS_SD} Index: src/external/apache2/mDNSResponder/nss/nss_mdnsd.c diff -u src/external/apache2/mDNSResponder/nss/nss_mdnsd.c:1.3 src/external/apache2/mDNSResponder/nss/nss_mdnsd.c:1.4 --- src/external/apache2/mDNSResponder/nss/nss_mdnsd.c:1.3 Wed Nov 4 18:34:59 2009 +++ src/external/apache2/mDNSResponder/nss/nss_mdnsd.c Sun Mar 30 22:03:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nss_mdnsd.c,v 1.3 2009/11/04 23:34:59 tsarna Exp $ */ +/* $NetBSD: nss_mdnsd.c,v 1.4 2014/03/31 02:03:38 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -61,6 +61,8 @@ #include +#include "hostent.h" + /* * Pool of mdnsd connections */ @@ -154,7 +156,6 @@ typedef struct search_iter { charbuf[MAXHOSTNAMELEN]; } search_iter; -static hostent_ctx h_ctx; static DNSServiceFlags svc_flags = 0; ns_mtab *nss_module_register(const char *, u_int *, nss_module_unregister_fn *); @@ -170,11 +171,12 @@ static void _mdns_addrinfo_init(addrinfo static void _mdns_addrinfo_add_ai(addrinfo_ctx *, struct addrinfo *); static struct addrinfo *_mdns_addrinfo_done(addrinfo_ctx *); -static int _mdns_gethtbyname_abs(const char *, int, svc_ref **, short); +static int _mdns_gethtbyname_abs(struct getnamaddr *, struct hostent_ctx *, +const char *, int, svc_ref **, short); static void _mdns_hostent_init(hostent_ctx *, int, int); static void _mdns_hostent_add_host(hostent_ctx *, const char *); static void _mdns_hostent_add_addr(hostent_ctx *, const void *, uint16_t); -static struct hostent *_mdns_hostent_done(hostent_ctx *); +static int _mdns_hostent_done(struct getnamaddr *, hostent_ctx *); static void _mdns_addrinfo_cb(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType, const char *, const struct sockaddr *, @@ -357,6 +359,7 @@ _mdns_gethtbyaddr(void *cbrv, void *cbda DNSServiceRef sdRef; svc_ref *sr; bool retry = true; +struct getnamaddr *info = cbrv; UNUSED(cbdata); @@ -369,7 +372,7 @@ _mdns_gethtbyaddr(void *cbrv, void *cbda /* if mcast-only don't bother for non-LinkLocal addrs) */ if (svc_flags & kDNSServiceFlagsForceMulticast) { if ((addr[0] != 169) || (addr[1] != 254)) { -h_errno = HOST_NOT_FOUND; +*info->he = HOST_NOT_FOUND; return NS_NOTFOUND; } } @@ -383,7 +386,7 @@ _mdns_gethtbyaddr(void *cbrv, void *cbda /* if mcast-only don't bother for non-LinkLocal addrs) */ if (svc_flags & kDNSServiceFlagsForceMulticast) { if ((addr[0] != 0xfe) || ((addr[1] & 0xc0) != 0x80)) { -h_errno = HOST_NOT_FOUND; +*info->he = HOST_NOT_FOUND; return NS_NOTFOUND; } } @@ -397,27 +400,28 @@ _mdns_gethtbyaddr(void *cbrv, void *cbda if (advance > 0 && qp + advance < ep) qp += advance; else { -h_errno = NETDB_INTERNAL; +*info->he = NETDB_INTERNAL; return NS_NOTFOUND; } } if (strlcat(qbuf, "ip6.arpa", sizeof(qbuf)) >= sizeof(qbuf)) { -h_errno = NETDB_INTERNAL; +*info->he = NETDB_INTERNAL; return NS_NOTFOUND; } break; default: -h_errno = NO_RECOVERY; +*info->he = NO_RECOVERY; return NS_UNAVAIL; } +hostent_ctx h_ctx; _mdns_hostent_init(&h_ctx, af, addrlen); _mdns_hostent_add_addr(&h_ctx, addr, addrlen); sr = get_svc_ref(); if (!sr) { -h_errno = NETDB_INTERNAL; +*info->he = NETDB_INTERNAL; return NS_UNAVAIL; } @@ -444,7 +448,7 @@ _mdns_gethtbyaddr(void *cbrv, void *c
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Mon Mar 31 01:59:36 UTC 2014 Modified Files: src/share/mk: bsd.x11.mk Log Message: make pkg-config files be cleaned by "make clean" To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.111 src/share/mk/bsd.x11.mk:1.112 --- src/share/mk/bsd.x11.mk:1.111 Sun Mar 23 20:40:18 2014 +++ src/share/mk/bsd.x11.mk Mon Mar 31 01:59:36 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.111 2014/03/23 20:40:18 mrg Exp $ +# $NetBSD: bsd.x11.mk,v 1.112 2014/03/31 01:59:36 mrg Exp $ .include @@ -246,7 +246,7 @@ pkgconfig-install: ${_PKGDEST.${_pkg}} # Add a dependancy on the configure file if it exists; this way we # will rebuild the .pc file if the version in configure changes. .if exists(${PKGDIST.${_pkg}}/configure) -${_pkg}.pc: ${PKGDIST.${_pkg}}/configure +${_pkg}.pc: ${PKGDIST.${_pkg}}/configure Makefile .endif .endfor# } @@ -357,7 +357,7 @@ ${_pkg}.pc: ${PKGDIST.${_pkg}}/configure < ${.IMPSRC} > ${.TARGET}.tmp && \ mv -f ${.TARGET}.tmp ${.TARGET} -CLEANDIRFILES+= ${_PKGCONFIG_FILES} ${_PKGCONFIG_FILES:C/$/.tmp/} +CLEANFILES+= ${_PKGCONFIG_FILES} ${_PKGCONFIG_FILES:C/$/.tmp/} .endif #
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Mon Mar 31 01:49:04 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: tag a variable with __diagused To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/sys/arch/arm/arm32/pmap.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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.272 src/sys/arch/arm/arm32/pmap.c:1.273 --- src/sys/arch/arm/arm32/pmap.c:1.272 Sun Mar 30 15:55:08 2014 +++ src/sys/arch/arm/arm32/pmap.c Mon Mar 31 01:49:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.272 2014/03/30 15:55:08 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.273 2014/03/31 01:49:04 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.272 2014/03/30 15:55:08 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.273 2014/03/31 01:49:04 matt Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -1607,7 +1607,7 @@ pmap_free_l2_bucket(pmap_t pm, struct l2 l2b->l2b_kva = NULL; pd_entry_t * const pdep = pmap_l1_kva(pm) + l1slot; - pd_entry_t pde = *pdep; + pd_entry_t pde __diagused = *pdep; #ifdef ARM_MMU_EXTENDED /*
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Mon Mar 31 01:48:37 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pmap.h vmparam.h Log Message: For ARM_MMU_EXTENDED, a KERNEL_BASE >= 0x8000 is ok but a VM_USER_MAXADDRESS can not be more than 0x8000 - PAGE_SIZE. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/arch/arm/include/arm32/pmap.h cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/include/arm32/vmparam.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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.127 src/sys/arch/arm/include/arm32/pmap.h:1.128 --- src/sys/arch/arm/include/arm32/pmap.h:1.127 Mon Mar 31 01:35:05 2014 +++ src/sys/arch/arm/include/arm32/pmap.h Mon Mar 31 01:48:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.127 2014/03/31 01:35:05 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.128 2014/03/31 01:48:37 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -103,8 +103,8 @@ * user and kernel, we can use the TTBR0/TTBR1 to have separate L1 tables for * user and kernel address spaces. */ -#if KERNEL_BASE != 0x8000 -#error ARMv6 or later systems must have a KERNEL_BASE of 0x8000 +#if (KERNEL_BASE & 0x8000) == 0 +#error ARMv6 or later systems must have a KERNEL_BASE >= 0x8000 #endif #endif /* ARM_MMU_EXTENDED */ Index: src/sys/arch/arm/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.33 src/sys/arch/arm/include/arm32/vmparam.h:1.34 --- src/sys/arch/arm/include/arm32/vmparam.h:1.33 Wed Feb 26 16:16:18 2014 +++ src/sys/arch/arm/include/arm32/vmparam.h Mon Mar 31 01:48:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.33 2014/02/26 16:16:18 martin Exp $ */ +/* $NetBSD: vmparam.h,v 1.34 2014/03/31 01:48:37 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -78,7 +78,11 @@ * Mach derived constants */ #define VM_MIN_ADDRESS ((vaddr_t) PAGE_SIZE) +#ifdef ARM_MMU_EXTENDED +#define VM_MAXUSER_ADDRESS ((vaddr_t) 0x8000 - PAGE_SIZE) +#else #define VM_MAXUSER_ADDRESS ((vaddr_t) KERNEL_BASE - PAGE_SIZE) +#endif #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) KERNEL_BASE)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Mon Mar 31 01:35:05 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Add a missing 0 to an #error To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/arch/arm/include/arm32/pmap.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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.126 src/sys/arch/arm/include/arm32/pmap.h:1.127 --- src/sys/arch/arm/include/arm32/pmap.h:1.126 Sun Mar 30 15:50:51 2014 +++ src/sys/arch/arm/include/arm32/pmap.h Mon Mar 31 01:35:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.126 2014/03/30 15:50:51 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.127 2014/03/31 01:35:05 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -104,7 +104,7 @@ * user and kernel address spaces. */ #if KERNEL_BASE != 0x8000 -#error ARMv6 or later systems must have a KERNEL_BASE of 0x800 +#error ARMv6 or later systems must have a KERNEL_BASE of 0x8000 #endif #endif /* ARM_MMU_EXTENDED */
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Mon Mar 31 00:00:22 UTC 2014 Modified Files: src/usr.sbin/mtree: getid.c Log Message: say why we can't use the password or the group databases. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/mtree/getid.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/mtree/getid.c diff -u src/usr.sbin/mtree/getid.c:1.8 src/usr.sbin/mtree/getid.c:1.9 --- src/usr.sbin/mtree/getid.c:1.8 Wed Oct 16 13:27:42 2013 +++ src/usr.sbin/mtree/getid.c Sun Mar 30 20:00:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $ */ +/* $NetBSD: getid.c,v 1.9 2014/03/31 00:00:22 christos Exp $ */ /* from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */ /* from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */ @@ -65,7 +65,7 @@ #endif #include -__RCSID("$NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $"); +__RCSID("$NetBSD: getid.c,v 1.9 2014/03/31 00:00:22 christos Exp $"); #include @@ -206,7 +206,12 @@ grstart(void) } if (grfile[0] == '\0') /* sanity check */ return 0; - return (_gr_fp = fopen(grfile, "r")) ? 1 : 0; + + _gr_fp = fopen(grfile, "r"); + if (_gr_fp != NULL) + return 1; + warn("Can't open `%s'", grfile); + return 0; } @@ -350,7 +355,11 @@ pwstart(void) } if (pwfile[0] == '\0') /* sanity check */ return 0; - return (_pw_fp = fopen(pwfile, "r")) ? 1 : 0; + _pw_fp = fopen(pwfile, "r"); + if (_pw_fp != NULL) + return 1; + warn("Can't open `%s'", pwfile); + return 0; }
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sun Mar 30 23:28:14 UTC 2014 Modified Files: src/share/man/man9: pci_intr.9 Log Message: Say how big the buffer should be. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/pci_intr.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pci_intr.9 diff -u src/share/man/man9/pci_intr.9:1.16 src/share/man/man9/pci_intr.9:1.17 --- src/share/man/man9/pci_intr.9:1.16 Sat Mar 29 20:18:09 2014 +++ src/share/man/man9/pci_intr.9 Sun Mar 30 19:28:14 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_intr.9,v 1.16 2014/03/30 00:18:09 christos Exp $ +.\" $NetBSD: pci_intr.9,v 1.17 2014/03/30 23:28:14 christos Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 29, 2014 +.Dd March 30, 2014 .Dt PCI_INTR 9 .Os .Sh NAME @@ -84,6 +84,11 @@ identifies a particular interrupt source If the driver wishes to refer to the interrupt source in an attach or error message, it should use the value returned by .Fn pci_intr_string . +The buffer passed to +.Fn pci_intr_string +should be at least +.Dv PCI_INTRSTR_LEN +bytes. .Pp Subsequently, when the driver is prepared to receive interrupts, it should call
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: christos Date: Sun Mar 30 23:25:20 UTC 2014 Modified Files: src/sys/dev/marvell: mvpex.c Log Message: provide a buffer for pci_intr_string() To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/marvell/mvpex.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/marvell/mvpex.c diff -u src/sys/dev/marvell/mvpex.c:1.11 src/sys/dev/marvell/mvpex.c:1.12 --- src/sys/dev/marvell/mvpex.c:1.11 Sun Mar 30 18:39:29 2014 +++ src/sys/dev/marvell/mvpex.c Sun Mar 30 19:25:20 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mvpex.c,v 1.11 2014/03/30 22:39:29 htodd Exp $ */ +/* $NetBSD: mvpex.c,v 1.12 2014/03/30 23:25:20 christos Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.11 2014/03/30 22:39:29 htodd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.12 2014/03/30 23:25:20 christos Exp $"); #include "opt_pci.h" #include "pci.h" @@ -660,6 +660,7 @@ mvpex_intr_establish(void *v, pci_intr_h struct mvpex_intrhand *pexih; uint32_t mask; int ih = pin - 1, s; + char buf[PCI_INTRSTR_LEN]; intrtab = &sc->sc_intrtab[ih]; @@ -674,7 +675,7 @@ mvpex_intr_establish(void *v, pci_intr_h pexih->ih_type = ipl; pexih->ih_intrtab = intrtab; evcnt_attach_dynamic(&pexih->ih_evcnt, EVCNT_TYPE_INTR, NULL, "mvpex", - mvpex_intr_string(v, pin)); + mvpex_intr_string(v, pin, buf, sizeof(buf))); s = splhigh();
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Sun Mar 30 23:20:14 UTC 2014 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: arm11 ARM_MMU_EXTENDED support (setting CPU_CONTROL_XP_ENABLE) To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/arch/arm/arm/cpufunc.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/arm/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.143 src/sys/arch/arm/arm/cpufunc.c:1.144 --- src/sys/arch/arm/arm/cpufunc.c:1.143 Sun Mar 30 08:36:21 2014 +++ src/sys/arch/arm/arm/cpufunc.c Sun Mar 30 23:20:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.143 2014/03/30 08:36:21 skrll Exp $ */ +/* $NetBSD: cpufunc.c,v 1.144 2014/03/30 23:20:14 matt Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.143 2014/03/30 08:36:21 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.144 2014/03/30 23:20:14 matt Exp $"); #include "opt_compat_netbsd.h" #include "opt_cpuoptions.h" @@ -2962,10 +2962,12 @@ arm11_setup(char *args) { int cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE +#ifdef ARM_MMU_EXTENDED + | CPU_CONTROL_XP_ENABLE +#endif | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE /* | CPU_CONTROL_BPRD_ENABLE */; - int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE + int cpuctrlmask = cpuctrl | CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_BPRD_ENABLE | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE | CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK; @@ -3011,10 +3013,11 @@ arm11mpcore_setup(char *args) int cpuctrl = CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE +#ifdef ARM_MMU_EXTENDED + | CPU_CONTROL_XP_ENABLE +#endif | CPU_CONTROL_BPRD_ENABLE ; - int cpuctrlmask = CPU_CONTROL_IC_ENABLE - | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_BPRD_ENABLE + int cpuctrlmask = cpuctrl | CPU_CONTROL_AFLT_ENABLE | CPU_CONTROL_VECRELOC; @@ -3153,6 +3156,9 @@ arm11x6_setup(char *args) CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_SYST_ENABLE | CPU_CONTROL_UNAL_ENABLE | +#ifdef ARM_MMU_EXTENDED + CPU_CONTROL_XP_ENABLE | +#endif CPU_CONTROL_IC_ENABLE; /*
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Sun Mar 30 23:14:15 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: std.imx31 Log Message: Include newer arm options (ARM_HAS_VBAR, etc.) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/std.imx31 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/evbarm/conf/std.imx31 diff -u src/sys/arch/evbarm/conf/std.imx31:1.8 src/sys/arch/evbarm/conf/std.imx31:1.9 --- src/sys/arch/evbarm/conf/std.imx31:1.8 Fri Nov 1 18:41:06 2013 +++ src/sys/arch/evbarm/conf/std.imx31 Sun Mar 30 23:14:15 2014 @@ -1,4 +1,4 @@ -# $NetBSD: std.imx31,v 1.8 2013/11/01 18:41:06 skrll Exp $ +# $NetBSD: std.imx31,v 1.9 2014/03/30 23:14:15 matt Exp $ # # standard NetBSD/evbarm options for FreeScale I.MX31 @@ -13,6 +13,13 @@ makeoptions CPUFLAGS="-march=armv6k -mtu options ARM11_PMC options ARM11_CACHE_WRITE_THROUGH +options ARM_HAS_VBAR +options FPU_VFP +options __HAVE_CPU_COUNTER +options __HAVE_FAST_SOFTINTS# should be in types.h +options __HAVE_CPU_UAREA_ALLOC_IDLELWP +options TPIDRPRW_IS_CURCPU + makeoptions LOADADDRESS="0x8010" makeoptions BOARDTYPE="imx31"
CVS commit: src/sys/arch/evbarm/imx31
Module Name:src Committed By: matt Date: Sun Mar 30 23:12:26 UTC 2014 Modified Files: src/sys/arch/evbarm/imx31: imx31lk_start.S Log Message: Deal with ARM_MMU_EXTENDED. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/imx31/imx31lk_start.S 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/evbarm/imx31/imx31lk_start.S diff -u src/sys/arch/evbarm/imx31/imx31lk_start.S:1.4 src/sys/arch/evbarm/imx31/imx31lk_start.S:1.5 --- src/sys/arch/evbarm/imx31/imx31lk_start.S:1.4 Mon Jan 31 06:28:03 2011 +++ src/sys/arch/evbarm/imx31/imx31lk_start.S Sun Mar 30 23:12:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: imx31lk_start.S,v 1.4 2011/01/31 06:28:03 matt Exp $ */ +/* $NetBSD: imx31lk_start.S,v 1.5 2014/03/30 23:12:26 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -32,26 +32,12 @@ #include #include "assym.h" -RCSID("$NetBSD: imx31lk_start.S,v 1.4 2011/01/31 06:28:03 matt Exp $") - -/* - */ - -#define CPWAIT_BRANCH \ - sub pc, pc, #4 - -#define CPWAIT(tmp) \ - mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ - mov tmp, tmp /* wait for it to complete */ ;\ - CPWAIT_BRANCH /* branch to next insn */ - +RCSID("$NetBSD: imx31lk_start.S,v 1.5 2014/03/30 23:12:26 matt Exp $") #ifndef SDRAM_START #define SDRAM_START 0x8000 #endif -#define IMX31_DCACHE_SIZE 0x4000 /* 16KB L1 */ - /* * L1 == "Level One" == "first-level" * L2 == "Level Two" == "second-level" @@ -61,76 +47,54 @@ RCSID("$NetBSD: imx31lk_start.S,v 1.4 20 .global _C_LABEL(imx31lk_start) _C_LABEL(imx31lk_start): - /* Figure out where we want to jump to when the time comes */ - adr r8, .Lstart - ldr r8, [r8] - - /* - * set up virtual address space mapping - * for initial bootstrap. - */ - mov r2, #(L1_S_SIZE) /* 1MB chunks */ + cpsid if, #PSR_SVC32_MODE /* * Firmware already mapped SDRAM VA == PA. at 0x800.. * now map SDRAM also at VA 0x800... */ mrc p15, 0, r0, c2, c0, 0 /* L1 table addr into r0 */ - add r0, r0, #(0x800 * 4) /* offset to 0x8000 */ - - mov r3, #SDRAM_START /* map to 0x800.. */ - orr r3, r3, #(L1_S_AP_KRW) /* the usual perms & stuff */ - orr r3, r3, #(L1_TYPE_S) - orr r3, r3, #(L1_S_DOM_KERNEL) +#ifdef ARM_MMU_EXTENDED + mcr p15, 0, r0, c2, c0, 1 /* copy it to TTBR1 */ + mov r3, #TTBCR_S_N_1 + mcr p15, 0, r3, c2, c0, 2 /* set TTBCR to enable TTBR1 */ +#endif - mov r1, #0x80 /* 128 1MB entries */ + mov r1, #(KERNEL_BASE_EXT >> L1_S_SHIFT) + add r2, r1, #0x80 /* 128 1MB entries */ + ldr r3, .Lsdram_pde 1: /* and looplooploop */ - str r3, [r0], #4 - add r3, r3, r2 - subs r1, r1, #1 - bgt 1b + str r3, [r0, r1, lsl #2] + add r3, r3, #L1_S_SIZE + add r1, r1, #1 + cmp r1, r2 + blt 1b /* * Map an L1 section for each device to make this easy. */ /* UART1 */ - mrc p15, 0, r0, c2, c0, 0 /* L1 table addr into r0 */ - add r0, r0, #(0xfd0 * 4) /* offset to 0xfd00 */ + mov r1, #0xfd0 /* offset to 0xfd00 */ - mov r3, #0x4300 - orr r3, r3, #0x00f0 - orr r3, r3, #(L1_S_AP_KRW) - orr r3, r3, #(L1_TYPE_S) - orr r3, r3, #(L1_S_DOM_KERNEL) - str r3, [r0], #4 /* note autoinc */ + ldr r3, .Lio_pde + str r3, [r0, r1, lsl #2] /* etc, TBD... */ /* * Make domain control go full art. */ - mov r0, #0x + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2))|DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 /* - * Now let's clean the cache again to make sure everything - * is in place. - * - * XXX: should this take into account the XScale cache clean bug? + * Now let's clean the cache again to make sure everything is in place. */ - mov r3, #(IMX31_DCACHE_SIZE) - subs r3, r3, #32 -1: - mcr p15, 0, r3, c7, c10, 2 - subs r3, r3, #32 - bne 1b - CPWAIT(r3) - - /* Drain write buffer */ - mcr p15, 0, r6, c7, c10, 4 + bl _C_LABEL(arm11x6_idcache_wbinv_all) /* Invalidate TLBs just to be sure */ + mov r0, #0 mcr p15, 0, r0, c8, c7, 0 /* @@ -138,19 +102,26 @@ _C_LABEL(imx31lk_start): * Unspeakable cruelty and harm lurk down there. --More-- * Are you sure you want to enter? */ - adr r8, .Lstart - ldr r8, [r8] - mov pc, r8/* So be it */ +#ifdef KERNEL_BASES_EQUAL + b start +#else + adr r0, .Lstart + ldr ip, [r0] + bx ip +#endif /* symbol to use for address calculation in the right VA */ +#ifndef KERNEL_BASES_EQUAL .Lstart: .word start +#endif +#if L1_S_DOM_KERNEL +#error kernel domain (L1_S_DOM_KERNEL) is not 0 +#endif -/* - * Calculate size of kernel to copy. Don't bother to copy bss, - * although I guess the CPU could use the warmup exercise ... - */ -.Lcopy_size: -.word _edata - _C_LABEL(imx31lk_start) - +.Lsdram_pde: + .word 0x8000|L1_S_AP_KRW|L1_S_C|L1_S_B|L1_TYPE_S +.Lio_pde: + .word 0x43f0|L1_S_AP_KRW|L1_TYPE_S +END(imx31lk_start)
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: htodd Date: Sun Mar 30 22:39:29 UTC 2014 Modified Files: src/sys/dev/marvell: mvpex.c Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/marvell/mvpex.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/marvell/mvpex.c diff -u src/sys/dev/marvell/mvpex.c:1.10 src/sys/dev/marvell/mvpex.c:1.11 --- src/sys/dev/marvell/mvpex.c:1.10 Sun Mar 30 01:17:51 2014 +++ src/sys/dev/marvell/mvpex.c Sun Mar 30 22:39:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mvpex.c,v 1.10 2014/03/30 01:17:51 christos Exp $ */ +/* $NetBSD: mvpex.c,v 1.11 2014/03/30 22:39:29 htodd Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.10 2014/03/30 01:17:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.11 2014/03/30 22:39:29 htodd Exp $"); #include "opt_pci.h" #include "pci.h" @@ -620,7 +620,7 @@ mvpex_intr_map(const struct pci_attach_a /* ARGSUSED */ const char * -mvpex_intr_string(void *v, pci_intr_handle_t pin, char *buf size_t len) +mvpex_intr_string(void *v, pci_intr_handle_t pin, char *buf, size_t len) { switch (pin) { case PCI_INTERRUPT_PIN_A:
CVS commit: src/sbin/fdisk
Module Name:src Committed By: christos Date: Sun Mar 30 22:18:13 UTC 2014 Modified Files: src/sbin/fdisk: fdisk.c Log Message: Allow -1 values in the -s // indicate use the previous values. For example: fdisk -f -i /dev/rsd0d # initialize mbr and create an msdos partition. fdisk -f -u -0 -a -s 169/-1/-1 /dev/rsd0d # converts the msdos partition to a netbsd one, and makes it active. To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sbin/fdisk/fdisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fdisk/fdisk.c diff -u src/sbin/fdisk/fdisk.c:1.146 src/sbin/fdisk/fdisk.c:1.147 --- src/sbin/fdisk/fdisk.c:1.146 Mon Mar 10 11:42:51 2014 +++ src/sbin/fdisk/fdisk.c Sun Mar 30 18:18:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdisk.c,v 1.146 2014/03/10 15:42:51 jakllsch Exp $ */ +/* $NetBSD: fdisk.c,v 1.147 2014/03/30 22:18:13 christos Exp $ */ /* * Mach Operating System @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fdisk.c,v 1.146 2014/03/10 15:42:51 jakllsch Exp $"); +__RCSID("$NetBSD: fdisk.c,v 1.147 2014/03/30 22:18:13 christos Exp $"); #endif /* not lint */ #define MBRPTYPENAMES @@ -2027,11 +2027,20 @@ change_part(int extended, int part, int tmp_bootmenu[0] = 0; #endif - if (!s_flag && partp != NULL) { - /* values not specified, default to current ones */ - sysid = partp->mbrp_type; - start = offset + le32toh(partp->mbrp_start); - size = le32toh(partp->mbrp_size); + if (partp != NULL) { + if (!s_flag) { + /* values not specified, default to current ones */ + sysid = partp->mbrp_type; + start = offset + le32toh(partp->mbrp_start); + size = le32toh(partp->mbrp_size); + } else { + if (sysid == -1) +sysid = partp->mbrp_type; + if (start == (daddr_t)0x) +start = offset + le32toh(partp->mbrp_start); + if (size == (daddr_t)0x) +size = le32toh(partp->mbrp_size); + } } /* creating a new partition, default to free space */
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: htodd Date: Sun Mar 30 21:52:09 UTC 2014 Modified Files: src/sys/arch/arm/xscale: becc_pci.c Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/xscale/becc_pci.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/arm/xscale/becc_pci.c diff -u src/sys/arch/arm/xscale/becc_pci.c:1.16 src/sys/arch/arm/xscale/becc_pci.c:1.17 --- src/sys/arch/arm/xscale/becc_pci.c:1.16 Sun Mar 30 01:19:20 2014 +++ src/sys/arch/arm/xscale/becc_pci.c Sun Mar 30 21:52:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: becc_pci.c,v 1.16 2014/03/30 01:19:20 christos Exp $ */ +/* $NetBSD: becc_pci.c,v 1.17 2014/03/30 21:52:09 htodd Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.16 2014/03/30 01:19:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.17 2014/03/30 21:52:09 htodd Exp $"); #include "opt_pci.h" #include "pci.h" @@ -377,7 +377,7 @@ const char * becc_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len) { - strlcpy(buf, becc_irqnames[ih]), len); + strlcpy(buf, becc_irqnames[ih], len); return buf; }
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: macallan Date: Sun Mar 30 20:06:50 UTC 2014 Modified Files: src/sys/arch/mips/include: isa_machdep.h Log Message: catch up with *_intr_string() changes To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/include/isa_machdep.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/mips/include/isa_machdep.h diff -u src/sys/arch/mips/include/isa_machdep.h:1.6 src/sys/arch/mips/include/isa_machdep.h:1.7 --- src/sys/arch/mips/include/isa_machdep.h:1.6 Sat Mar 29 19:28:29 2014 +++ src/sys/arch/mips/include/isa_machdep.h Sun Mar 30 20:06:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.6 2014/03/29 19:28:29 christos Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.7 2014/03/30 20:06:50 macallan Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ struct mips_isa_chipset { void (*ic_intr_disestablish)(void *, void *); int (*ic_intr_alloc)(void *, int, int, int *); - const char *(*ic_intr_string)(void *, int); + const char *(*ic_intr_string)(void *, int, char *, size_t); void(*ic_detach_hook)(isa_chipset_tag_t, device_t); };
CVS commit: xsrc/external/mit/xman/dist
Module Name:xsrc Committed By: wiz Date: Sun Mar 30 18:46:06 UTC 2014 Modified Files: xsrc/external/mit/xman/dist: handler.c Log Message: ifdef out senseless code that clang complains about with -Wtautological-pointer-compare. I've asked upstream what check was really intended here. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xman/dist/handler.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xman/dist/handler.c diff -u xsrc/external/mit/xman/dist/handler.c:1.3 xsrc/external/mit/xman/dist/handler.c:1.4 --- xsrc/external/mit/xman/dist/handler.c:1.3 Mon Mar 17 09:43:11 2014 +++ xsrc/external/mit/xman/dist/handler.c Sun Mar 30 18:46:06 2014 @@ -320,8 +320,10 @@ SaveFormattedPage(Widget w, XEvent * eve * If we are not active then take no action. */ +#if ARRAY_COMPARISON_TO_NULL_POINTER_MAKES_SENSE if (man_globals->tempfile == NULL) return; +#endif switch (params[0][0]) { case 'S':
CVS commit: xsrc/external/mit/libX11/dist/src
Module Name:xsrc Committed By: wiz Date: Sun Mar 30 16:39:42 UTC 2014 Modified Files: xsrc/external/mit/libX11/dist/src: ModMap.c Log Message: Add cast to fix -Wpointer-sign warning with clang. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libX11/dist/src/ModMap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libX11/dist/src/ModMap.c diff -u xsrc/external/mit/libX11/dist/src/ModMap.c:1.3 xsrc/external/mit/libX11/dist/src/ModMap.c:1.4 --- xsrc/external/mit/libX11/dist/src/ModMap.c:1.3 Sun Mar 16 22:48:34 2014 +++ xsrc/external/mit/libX11/dist/src/ModMap.c Sun Mar 30 16:39:42 2014 @@ -83,7 +83,7 @@ XSetModifierMapping( req->length += mapSize >> 2; req->numKeyPerModifier = modifier_map->max_keypermod; -Data(dpy, modifier_map->modifiermap, mapSize); +Data(dpy, (char *)modifier_map->modifiermap, mapSize); (void) _XReply(dpy, (xReply *) & rep, (SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue);
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Sun Mar 30 16:01:46 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: OMAP5EVM Log Message: Make this MP by default To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/OMAP5EVM 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/evbarm/conf/OMAP5EVM diff -u src/sys/arch/evbarm/conf/OMAP5EVM:1.1 src/sys/arch/evbarm/conf/OMAP5EVM:1.2 --- src/sys/arch/evbarm/conf/OMAP5EVM:1.1 Sat Mar 29 14:05:58 2014 +++ src/sys/arch/evbarm/conf/OMAP5EVM Sun Mar 30 16:01:46 2014 @@ -1,5 +1,5 @@ # -# $NetBSD: OMAP5EVM,v 1.1 2014/03/29 14:05:58 matt Exp $ +# $NetBSD: OMAP5EVM,v 1.2 2014/03/30 16:01:46 matt Exp $ # # PANDABOARD -- TI OMAP 4430 Eval Board Kernel # @@ -20,6 +20,7 @@ options RTC_OFFSET=0 # hardware clock i options CPU_CORTEXA15 options OMAP_5430 options PMAPCOUNTERS +options MULTIPROCESSOR # no options __HAVE_MM_MD_DIRECT_MAPPED_PHYS # too much memory to direct map # Architecture options
CVS commit: src/doc
Module Name:src Committed By: matt Date: Sun Mar 30 16:03:56 UTC 2014 Modified Files: src/doc: CHANGES Log Message: Note ARMv6 MMU & SMP support To generate a diff of this commit: cvs rdiff -u -r1.1907 -r1.1908 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1907 src/doc/CHANGES:1.1908 --- src/doc/CHANGES:1.1907 Mon Mar 24 06:27:56 2014 +++ src/doc/CHANGES Sun Mar 30 16:03:56 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1907 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1908 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -377,3 +377,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: Ported from OpenBSD. [nonaka 20140319] mdnsd(8), dns-sd(1), libdns_sd: import mDNSResponder 258.14 [pettai 20140324] + arm: add support for ARMv6+ MMU features ASIDS, XN, split TTBR. + add support for SMP. [matt 20140330]
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Sun Mar 30 15:55:08 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Fix debug code in fault_fixup To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/arch/arm/arm32/pmap.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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.271 src/sys/arch/arm/arm32/pmap.c:1.272 --- src/sys/arch/arm/arm32/pmap.c:1.271 Sun Mar 30 15:50:51 2014 +++ src/sys/arch/arm/arm32/pmap.c Sun Mar 30 15:55:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.271 2014/03/30 15:50:51 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.272 2014/03/30 15:55:08 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.271 2014/03/30 15:50:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.272 2014/03/30 15:55:08 matt Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -4572,13 +4572,16 @@ pmap_fault_fixup(pmap_t pm, vaddr_t va, #endif #endif #ifdef DDB - //extern int kernel_debug; + extern int kernel_debug; - //if (kernel_debug & 2) - pmap_release_pmap_lock(pm); - KERNHIST_DUMP(maphist); + if (kernel_debug & 2) { + pmap_release_pmap_lock(pm); +#ifdef UVMHIST + KERNHIST_DUMP(maphist); +#endif cpu_Debugger(); - pmap_acquire_pmap_lock(pm); + pmap_acquire_pmap_lock(pm); + } #endif } #endif
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: matt Date: Sun Mar 30 16:00:48 UTC 2014 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Update list of kernels To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.61 src/etc/etc.evbarm/Makefile.inc:1.62 --- src/etc/etc.evbarm/Makefile.inc:1.61 Fri Mar 7 12:35:14 2014 +++ src/etc/etc.evbarm/Makefile.inc Sun Mar 30 16:00:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.61 2014/03/07 12:35:14 hkenken Exp $ +# $NetBSD: Makefile.inc,v 1.62 2014/03/30 16:00:48 matt Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -19,6 +19,8 @@ EVBARM_BOARDS.xscale+= ADI_BRH KERNEL_SETS.xscale+= NSLU2 EVBARM_BOARDS.armv7+= BCM5301X EVBARM_BOARDS.armv7hf+= BCM5301X +#EVBARM_BOARDS.armv7+= BCM56340 +#EVBARM_BOARDS.armv7hf+= BCM56340 EVBARM_BOARDS.armv7+= CUBIEBOARD EVBARM_BOARDS.armv7hf+= CUBIEBOARD .else @@ -65,8 +67,11 @@ EVBARM_BOARDS.armv6+= TISDP2420 EVBARM_BOARDS.armv6hf+= TISDP2420 #EVBARM_BOARDS.armv6+= TISDP2430 EVBARM_BOARDS.armv7+= ARMADAXP +EVBARM_BOARDS.armv7hf+= ARMADAXP EVBARM_BOARDS.armv7+= BCM5301X EVBARM_BOARDS.armv7hf+= BCM5301X +#EVBARM_BOARDS.armv7+= BCM56340 +#EVBARM_BOARDS.armv7hf+= BCM56340 EVBARM_BOARDS.armv7+= BEAGLEBOARD EVBARM_BOARDS.armv7hf+= BEAGLEBOARD EVBARM_BOARDS.armv7+= BEAGLEBOARDXM @@ -76,12 +81,16 @@ EVBARM_BOARDS.armv7hf+= BEAGLEBONE EVBARM_BOARDS.armv7+= CUBIEBOARD EVBARM_BOARDS.armv7hf+= CUBIEBOARD #EVBARM_BOARDS.armv7+= IGEPV2 +EVBARM_BOARDS.armv7+= MIRABOX +EVBARM_BOARDS.armv7hf+= MIRABOX #EVBARM_BOARDS.armv7+= N900 EVBARM_BOARDS.armv7+= NETWALKER EVBARM_BOARDS.armv7hf+= NETWALKER +EVBARM_BOARDS.armv7+= OMAP5EVM +EVBARM_BOARDS.armv7hf+= OMAP5EVM #EVBARM_BOARDS.armv7+= OVERO -#EVBARM_BOARDS.armv7+= PANDABOARD -#EVBARM_BOARDS.armv7hf+= PANDABOARD +EVBARM_BOARDS.armv7+= PANDABOARD +EVBARM_BOARDS.armv7hf+= PANDABOARD .endif IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR}
CVS commit: src/sys/arch/mvme68k/conf
Module Name:src Committed By: tsutsui Date: Sun Mar 30 15:54:38 UTC 2014 Modified Files: src/sys/arch/mvme68k/conf: Makefile.mvme68k Log Message: Fix "Error: unrecognized option -mcpu68030". To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mvme68k/conf/Makefile.mvme68k 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/mvme68k/conf/Makefile.mvme68k diff -u src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.63 src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.64 --- src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.63 Sun Mar 30 15:20:54 2014 +++ src/sys/arch/mvme68k/conf/Makefile.mvme68k Sun Mar 30 15:54:37 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mvme68k,v 1.63 2014/03/30 15:20:54 christos Exp $ +# $NetBSD: Makefile.mvme68k,v 1.64 2014/03/30 15:54:37 tsutsui Exp $ # Makefile for NetBSD # @@ -40,9 +40,9 @@ CMACHFLAGS= -m68030 .endif .else .if empty(IDENT:M-DMVME147) && empty(IDENT:M-DMVME162) && empty(IDENT:M-DMVME167) -CMACHFLAGS= -m68060 -Wa,-mcpu68030 -Wa,-m68851 +CMACHFLAGS= -m68060 -Wa,-mcpu=68030 -Wa,-m68851 .else -CMACHFLAGS= -m68020-60 -Wa,-mcpu68030 -Wa,-m68851 +CMACHFLAGS= -m68020-60 -Wa,-mcpu=68030 -Wa,-m68851 .endif .endif CFLAGS+= ${CMACHFLAGS} -msoft-float
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Sun Mar 30 15:53:37 UTC 2014 Modified Files: src/sys/sys: kernhist.h Log Message: fix KERNHIST_DUMP To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/sys/kernhist.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/sys/kernhist.h diff -u src/sys/sys/kernhist.h:1.8 src/sys/sys/kernhist.h:1.9 --- src/sys/sys/kernhist.h:1.8 Wed Mar 5 05:32:41 2014 +++ src/sys/sys/kernhist.h Sun Mar 30 15:53:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kernhist.h,v 1.8 2014/03/05 05:32:41 matt Exp $ */ +/* $NetBSD: kernhist.h,v 1.9 2014/03/30 15:53:37 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,6 +32,7 @@ #define _SYS_KERNHIST_H_ #if defined(_KERNEL_OPT) +#include "opt_ddb.h" #include "opt_kernhist.h" #endif @@ -100,7 +101,7 @@ LIST_HEAD(kern_history_head, kern_histor #define KERNHIST_CALLARGS(NAME,FMT,A,B,C,D) #define KERNHIST_CALLED(NAME) #define KERNHIST_FUNC(FNAME) -#define kernhist_dump(NAME) +#define KERNHIST_DUMP(NAME) #else #include /* for "cold" variable */ #include @@ -208,6 +209,13 @@ do { \ static const char *const _kernhist_name = FNAME; \ unsigned int _kernhist_call = 0; +#ifdef DDB +#define KERNHIST_DUMP(NAME) kernhist_dump(&NAME) +#else +#define KERNHIST_DUMP(NAME) +#endif + + static inline void kernhist_entry_print(const struct kern_history_ent *); static inline void @@ -220,6 +228,7 @@ kernhist_entry_print(const struct kern_h } #if defined(DDB) +void kernhist_dump(struct kern_history *); void kernhist_print(void (*)(const char *, ...) __printflike(1, 2)); #endif /* DDB */
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: matt Date: Sun Mar 30 15:26:16 UTC 2014 Modified Files: src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h Log Message: Allow this to handle H/W tlbs. Some ARM allow for a cheap way to flush all entries using an ASID from the TLB. Add support for taking advantage of it. Most ARMs don't have an easy way to find out what's in the TLB so make record_asids can just say all ASIDs are in use. Fix some off by 1 errors. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/uvm/pmap/pmap_tlb.c \ src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.4 src/sys/uvm/pmap/pmap_tlb.c:1.5 --- src/sys/uvm/pmap/pmap_tlb.c:1.4 Tue Mar 18 18:20:44 2014 +++ src/sys/uvm/pmap/pmap_tlb.c Sun Mar 30 15:26:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.4 2014/03/18 18:20:44 riastradh Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.5 2014/03/30 15:26:15 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.4 2014/03/18 18:20:44 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.5 2014/03/30 15:26:15 matt Exp $"); /* * Manages address spaces in a TLB. @@ -136,7 +136,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v #include -static kmutex_t pmap_tlb0_mutex __cacheline_aligned; +static kmutex_t pmap_tlb0_lock __cacheline_aligned; #define IFCONSTANT(x) (__builtin_constant_p((x)) ? (x) : 0) @@ -145,13 +145,13 @@ struct pmap_tlb_info pmap_tlb0_info = { .ti_asid_hint = KERNEL_PID + 1, #ifdef PMAP_TLB_NUM_PIDS .ti_asid_max = IFCONSTANT(PMAP_TLB_NUM_PIDS - 1), - .ti_asids_free = IFCONSTANT(PMAP_TLB_NUM_PIDS - (KERNEL_PID + 1)), + .ti_asids_free = IFCONSTANT(PMAP_TLB_NUM_PIDS - (1 + KERNEL_PID)), #endif .ti_asid_bitmap[0] = (2 << KERNEL_PID) - 1, #ifdef PMAP_TLB_WIRED_UPAGES .ti_wired = PMAP_TLB_WIRED_UPAGES, #endif - .ti_lock = &pmap_tlb0_mutex, + .ti_lock = &pmap_tlb0_lock, .ti_pais = LIST_HEAD_INITIALIZER(pmap_tlb0_info.ti_pais), #if defined(MULTIPROCESSOR) && PMAP_TLB_MAX > 1 .ti_tlbinvop = TLBINV_NOBODY, @@ -174,6 +174,8 @@ u_int pmap_ntlbs = 1; #define __BITMAP_ISSET_P(bm, n) \ (((bm)[(n) / (8*sizeof(bm[0]))] & (1LU << ((n) % (8*sizeof(bm[0]) != 0) +#define TLBINFO_ASID_MARK_UNUSED(ti, asid) \ + __BITMAP_CLR((ti)->ti_asid_bitmap, (asid)) #define TLBINFO_ASID_MARK_USED(ti, asid) \ __BITMAP_SET((ti)->ti_asid_bitmap, (asid)) #define TLBINFO_ASID_INUSE_P(ti, asid) \ @@ -231,6 +233,25 @@ pmap_pai_reset(struct pmap_tlb_info *ti, pai->pai_link.le_prev = NULL; /* tagged as unlinked */ #endif /* + * If the platform has a cheap way to flush ASIDs then free the ASID + * back into the pool. On multiprocessor systems, we will flush the + * ASID from the TLB when it's allocated. That way we know the flush + * was always done in the correct TLB space. On uniprocessor systems, + * just do the flush now since we know that it has been used. This has + * a bit less overhead. Either way, this will mean that we will only + * need to flush all ASIDs if all ASIDs are in use and we need to + * allocate a new one. + */ + if (PMAP_TLB_FLUSH_ASID_ON_RESET) { +#ifndef MULTIPROCESSOR + tlb_invalidate_asids(pai->pai_asid, pai->pai_asid); +#endif + if (TLBINFO_ASID_INUSE_P(ti, pai->pai_asid)) { + TLBINFO_ASID_MARK_UNUSED(ti, pai->pai_asid); + ti->ti_asids_free++; + } + } + /* * Note that we don't mark the ASID as not in use in the TLB's ASID * bitmap (thus it can't be allocated until the ASID space is exhausted * and therefore reinitialized). We don't want to flush the TLB for @@ -312,14 +333,17 @@ pmap_tlb_info_init(struct pmap_tlb_info #endif #endif /* MULTIPROCESSOR */ KASSERT(ti == &pmap_tlb0_info); + KASSERT(ti->ti_lock == &pmap_tlb0_lock); + //printf("ti_lock %p ", ti->ti_lock); mutex_init(ti->ti_lock, MUTEX_DEFAULT, IPL_SCHED); #if defined(MULTIPROCESSOR) && PMAP_TLB_MAX > 1 kcpuset_create(&ti->ti_kcpuset, true); - kcpuset_set(&ti->ti_kcpuset, cpu_index(curcpu())); + kcpuset_set(ti->ti_kcpuset, cpu_index(curcpu())); #endif + //printf("asid "); if (ti->ti_asid_max == 0) { ti->ti_asid_max = pmap_md_tlb_asid_max(); - ti->ti_asids_free = ti->ti_asid_max - (KERNEL_PID + 1); + ti->ti_asids_free = ti->ti_asid_max - KERNEL_PID; } KASSERT(ti->ti_asid_max < sizeof(ti->ti_asid_bitmap)*8); @@ -336,8 +360,8 @@ pmap_tlb_info_attach(struct pmap_tlb_inf TLBINFO_LOCK(ti); #if PMAP_TLB_MAX > 1 kcpuset_set(ti->ti_kcpuset, cpu_index(ci)); -#endif cpu_set_tlb_info(ci, ti); +#endif /* * Do any MD tlb info init. @@ -372,6 +396,8 @@ pmap_tlb_asid_reinitialize(struct pmap_t pmap_pai_check(ti); + ti->ti_evcnt_asid_reinits.ev_count++; + /* * First, clear the ASID bitmap (except for ASID 0 which belongs * to the kernel)
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Sun Mar 30 15:20:54 UTC 2014 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: Improve MP startup code. We now use a two stage startup, after creating the initial L1PT and turning on the MMU/caches, we spinup the secondary CPUs waiting for them to get the same state as the boot processor. Once the real L1PT is initialized and used, the secondary CPUs are kicked so they can use it (and the initial L1PT is discarded). Finally, wait until NetBSD kicks the secondary CPUs then load the stack from the idlelwp and then hatch the cpu and then jump to idle_loop. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/cortex/a9_mpsubr.S 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/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.13 src/sys/arch/arm/cortex/a9_mpsubr.S:1.14 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.13 Fri Feb 21 22:22:48 2014 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Sun Mar 30 15:20:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.13 2014/02/21 22:22:48 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.14 2014/03/30 15:20:54 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -37,40 +37,48 @@ #include #include "assym.h" +//#define MPDEBUG -/* We'll modify va and pa at run time so we can use relocatable addresses. */ +// We'll modify va and pa at run time so we can use relocatable addresses. #define MMU_INIT(va,pa,n_sec,attr) \ - .word va ; \ - .word pa ; \ - .word n_sec ; \ - .word attr ; - -/* - * Set up a preliminary mapping in the MMU to allow us to run - * at KERNEL_BASE with caches on. - */ + .word (va)|(n_sec); \ + .word (pa)|(attr); \ + +// Set up a preliminary mapping in the MMU to allow us to run at KERNEL_BASE +// with caches on. If we are MULTIPROCESSOR, save the TTB address. +// arm_boot_l1pt_init: - mov ip, r1 @ save mmu table addr - /* Build page table from scratch */ - mov r1, r0 /* Start address to clear memory. */ - /* Zero the entire table so all virtual addresses are invalid. */ - mov r2, #L1_TABLE_SIZE /* in bytes */ - mov r3, #0 - mov r4, r3 - mov r5, r3 - mov r6, r3 - mov r7, r3 - mov r8, r3 - mov r10, r3 - mov r11, r3 -1: stmia r1!, {r3-r8,r10-r11} - stmia r1!, {r3-r8,r10-r11} - stmia r1!, {r3-r8,r10-r11} - stmia r1!, {r3-r8,r10-r11} - subs r2, r2, #(4 * 4 * 8) /* bytes per loop */ - bne 1b +#if defined(MULTIPROCESSOR) +#if defined(KERNEL_BASES_EQUAL) + movw r3, #:lower16:cortex_mmuinfo + movt r3, #:upper16:cortex_mmuinfo +#else + adr r3, arm_boot_l1pt_init + movw r2, #:lower16:cortex_mmuinfo + movt r2, #:upper16:cortex_mmuinfo + bfi r3, r2, #0, #28 +#endif + str r0, [r3] + + // Make sure the info makes into memory + mcr p15, 0, r3, c7, c10, 1 // writeback the cache line + dsb +#endif - /* Now create our entries per the mmu_init_table. */ + mov ip, r1 // save mmu table addr + // Build page table from scratch + mov r1, r0 // Start address to clear memory. + // Zero the entire table so all virtual addresses are invalid. + add r2, r1, #L1_TABLE_SIZE // Ending address + mov r4, #0 + mov r5, #0 + mov r6, #0 + mov r7, #0 +1: stmia r1!, {r4-r7} // 16 bytes at a time + cmp r1, r2 + blt 1b + + // Now create our entries per the mmu_init_table. l1table .req r0 va .req r1 pa .req r2 @@ -78,7 +86,11 @@ arm_boot_l1pt_init: attr .req r4 itable .req r5 - mov itable, ip @ reclaim table address + mov attr, #0 + mrc p15, 0, r3, c0, c0, 5 // MPIDR read + cmp r3, #0 // not zero? + movne attr, #L1_S_V6_S //yes, shareable attribute + mov itable, ip // reclaim table address b 3f 2: str pa, [l1table, va, lsl #2] @@ -87,20 +99,18 @@ arm_boot_l1pt_init: subs n_sec, n_sec, #1 bhi 2b -3: ldmia itable!, {va,pa,n_sec,attr} - /* Convert va to l1 offset: va = 4 * (va >> L1_S_SHIFT) */ +3: ldmia itable!, {va, pa} + // Convert va to l1 offset: va = 4 * (va >> L1_S_SHIFT) + ubfx n_sec, va, #0, #L1_S_SHIFT lsr va, va, #L1_S_SHIFT - /* Convert pa to l1 entry: pa = (pa & L1_S_FRAME) | attr */ -#ifdef _ARM_ARCH_7 - bfc pa, #0, #L1_S_SHIFT -#else - lsr pa, pa, #L1_S_SHIFT - lsl pa, pa, #L1_S_SHIFT -#endif - orr pa, pa, attr - cmp n_sec, #0 + + // Do we need add sharing for this? + tst pa, #(L1_S_C|L1_S_B) // is this entry cacheable? + orrne pa, pa, attr // add sharing + +4: cmp n_sec, #0 bne 2b - bx lr @ return + bx lr // return .unreq va .unreq pa @@ -109,6 +119,9 @@ arm_boot_l1pt_init: .unreq itable .unreq l1table +// +// Coprocessor register initialization values +// #if defined(CPU_CORTEXA8) #undef CPU_CONTROL_SWP_ENABLE // not present on A8 #define CPU_CONTROL_SWP_ENABLE 0 @@ -126,6 +139,8 @@ arm_boot_l1pt_init: #define CPU_CONTROL_AFLT_ENABLE_SET CPU_CONTROL_AFLT_ENABLE #endif +// bits to set in the Control Reg
CVS commit: src/sys/arch/mvme68k
Module Name:src Committed By: christos Date: Sun Mar 30 15:20:54 UTC 2014 Modified Files: src/sys/arch/mvme68k/conf: Makefile.mvme68k src/sys/arch/mvme68k/include: loadfile_machdep.h src/sys/arch/mvme68k/stand/bootst: dev_tape.c Log Message: fixes for gcc-4.8 (John D. Baker) To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/mvme68k/conf/Makefile.mvme68k cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mvme68k/include/loadfile_machdep.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mvme68k/stand/bootst/dev_tape.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/mvme68k/conf/Makefile.mvme68k diff -u src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.62 src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.63 --- src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.62 Fri Jan 21 10:59:07 2011 +++ src/sys/arch/mvme68k/conf/Makefile.mvme68k Sun Mar 30 11:20:54 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mvme68k,v 1.62 2011/01/21 15:59:07 joerg Exp $ +# $NetBSD: Makefile.mvme68k,v 1.63 2014/03/30 15:20:54 christos Exp $ # Makefile for NetBSD # @@ -40,9 +40,9 @@ CMACHFLAGS= -m68030 .endif .else .if empty(IDENT:M-DMVME147) && empty(IDENT:M-DMVME162) && empty(IDENT:M-DMVME167) -CMACHFLAGS= -m68060 -Wa,-m68030 -Wa,-m68851 +CMACHFLAGS= -m68060 -Wa,-mcpu68030 -Wa,-m68851 .else -CMACHFLAGS= -m68020-60 -Wa,-m68030 -Wa,-m68851 +CMACHFLAGS= -m68020-60 -Wa,-mcpu68030 -Wa,-m68851 .endif .endif CFLAGS+= ${CMACHFLAGS} -msoft-float Index: src/sys/arch/mvme68k/include/loadfile_machdep.h diff -u src/sys/arch/mvme68k/include/loadfile_machdep.h:1.5 src/sys/arch/mvme68k/include/loadfile_machdep.h:1.6 --- src/sys/arch/mvme68k/include/loadfile_machdep.h:1.5 Mon Apr 28 16:23:29 2008 +++ src/sys/arch/mvme68k/include/loadfile_machdep.h Sun Mar 30 11:20:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_machdep.h,v 1.5 2008/04/28 20:23:29 martin Exp $ */ +/* $NetBSD: loadfile_machdep.h,v 1.6 2014/03/30 15:20:54 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #define WARN(a) warn a #define PROGRESS(a) /* nothing */ #define ALLOC(a) malloc(a) -#define DEALLOC(a, b) free(a) +#define DEALLOC(a, b) free(a), __USE(b) #define OKMAGIC(a) ((a) == OMAGIC) #endif Index: src/sys/arch/mvme68k/stand/bootst/dev_tape.c diff -u src/sys/arch/mvme68k/stand/bootst/dev_tape.c:1.12 src/sys/arch/mvme68k/stand/bootst/dev_tape.c:1.13 --- src/sys/arch/mvme68k/stand/bootst/dev_tape.c:1.12 Sun Jul 17 16:54:44 2011 +++ src/sys/arch/mvme68k/stand/bootst/dev_tape.c Sun Mar 30 11:20:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dev_tape.c,v 1.12 2011/07/17 20:54:44 joerg Exp $ */ +/* $NetBSD: dev_tape.c,v 1.13 2014/03/30 15:20:54 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -114,9 +114,6 @@ tape_open(struct open_file *f, ...) int tape_close(struct open_file *f) { - struct mvmeprom_dskio *ti; - - ti = f->f_devdata; f->f_devdata = NULL; return 0; }
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: skrll Date: Sun Mar 30 13:14:40 UTC 2014 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Make this compile - Fix pci_intr_string usage - Remove ununsed - define variables with their usage kern/48690: ixg* driver doesn't compile Untested. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.8 src/sys/dev/pci/ixgbe/ixgbe.c:1.9 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.8 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/ixgbe/ixgbe.c Sun Mar 30 13:14:40 2014 @@ -59,7 +59,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/ -/*$NetBSD: ixgbe.c,v 1.8 2014/03/29 19:28:25 christos Exp $*/ +/*$NetBSD: ixgbe.c,v 1.9 2014/03/30 13:14:40 skrll Exp $*/ #include "opt_inet.h" @@ -1764,7 +1764,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m int i, j, error; int first, last = 0; bus_dmamap_t map; - struct ixgbe_tx_buf *txbuf, *txbuf_mapped; + struct ixgbe_tx_buf *txbuf; union ixgbe_adv_tx_desc *txd = NULL; /* Basic descriptor defines */ @@ -1781,7 +1781,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m */ first = txr->next_avail_desc; txbuf = &txr->tx_buffers[first]; - txbuf_mapped = txbuf; map = txbuf->map; /* @@ -2261,12 +2260,14 @@ ixgbe_allocate_legacy(struct adapter *ad { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; - int rid = 0; char intrbuf[PCI_INTRSTR_LEN]; +#if 0 + int rid = 0; /* MSI RID at 1 */ if (adapter->msix == 1) rid = 1; +#endif /* We allocate a single interrupt resource */ if (pci_intr_map(pa, &adapter->osdep.ih) != 0) { @@ -2274,7 +2275,7 @@ ixgbe_allocate_legacy(struct adapter *ad return ENXIO; } else { aprint_normal_dev(dev, "interrupting at %s\n", - pci_intr_string(adapter->osdep.pc, adapter->osdep.ih), intrbuf, sizeof(intrbuf)); + pci_intr_string(adapter->osdep.pc, adapter->osdep.ih, intrbuf, sizeof(intrbuf))); } /* @@ -2550,14 +2551,15 @@ ixgbe_free_pci_resources(struct adapter struct ix_queue *que = adapter->queues; #endif device_t dev = adapter->dev; - int rid, memrid; + int rid; +#if defined(NETBSD_MSI_OR_MSIX) + int memrid; if (adapter->hw.mac.type == ixgbe_mac_82598EB) memrid = PCI_BAR(MSIX_82598_BAR); else memrid = PCI_BAR(MSIX_82599_BAR); -#if defined(NETBSD_MSI_OR_MSIX) /* ** There is a slight possibility of a failure mode ** in attach that will result in entering this function @@ -3910,7 +3912,6 @@ ixgbe_setup_receive_ring(struct rx_ring { struct adapter *adapter; struct ifnet *ifp; - device_t dev; struct ixgbe_rx_buf *rxbuf; #ifdef LRO struct lro_ctrl *lro = &rxr->lro; @@ -3919,7 +3920,6 @@ ixgbe_setup_receive_ring(struct rx_ring adapter = rxr->adapter; ifp = adapter->ifp; - dev = adapter->dev; /* Clear the ring contents */ IXGBE_RX_LOCK(rxr); @@ -4018,6 +4018,7 @@ skip_head: ixgbe_setup_hw_rsc(rxr); #ifdef LRO else if (ifp->if_capenable & IFCAP_LRO) { + device_t dev = adapter->dev; int err = tcp_lro_init(lro); if (err) { device_printf(dev, "LRO Initialization failed!\n"); @@ -4290,13 +4291,12 @@ ixgbe_free_receive_buffers(struct rx_rin static __inline void ixgbe_rx_input(struct rx_ring *rxr, struct ifnet *ifp, struct mbuf *m, u32 ptype) { - struct ethercom *ec; - struct adapter *adapter = ifp->if_softc; int s; - ec = &adapter->osdep.ec; - #ifdef LRO + struct adapter *adapter = ifp->if_softc; + struct ethercom *ec = &adapter->osdep.ec; + /* * ATM LRO is only for IPv4/TCP packets and TCP checksum of the packet * should be computed by hardware. Also it should not have VLAN tag in @@ -4669,11 +4669,13 @@ ixgbe_rx_checksum(u32 staterr, struct mb { u16 status = (u16) staterr; u8 errors = (u8) (staterr >> 24); +#if 0 bool sctp = FALSE; if ((ptype & IXGBE_RXDADV_PKTTYPE_ETQF) == 0 && (ptype & IXGBE_RXDADV_PKTTYPE_SCTP) != 0) sctp = TRUE; +#endif if (status & IXGBE_RXD_STAT_IPCS) { stats->ipcs.ev_count++;
CVS commit: xsrc/external/mit/libdrm/dist/radeon
Module Name:xsrc Committed By: wiz Date: Sun Mar 30 12:28:05 UTC 2014 Modified Files: xsrc/external/mit/libdrm/dist/radeon: radeon_surface.c Log Message: Remove superfluous parentheses. (already sent upstream) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c diff -u xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c:1.1.1.1 xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c:1.2 --- xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c:1.1.1.1 Mon Mar 17 07:51:43 2014 +++ xsrc/external/mit/libdrm/dist/radeon/radeon_surface.c Sun Mar 30 12:28:05 2014 @@ -281,7 +281,7 @@ static int r6_surface_init_linear(struct surf_minify(surf, surf->level+i, surf->bpe, i, xalign, yalign, zalign, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -309,7 +309,7 @@ static int r6_surface_init_linear_aligne surf_minify(surf, surf->level+i, surf->bpe, i, xalign, yalign, zalign, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -342,7 +342,7 @@ static int r6_surface_init_1d(struct rad surf_minify(surf, surf->level+i, surf->bpe, i, xalign, yalign, zalign, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -383,7 +383,7 @@ static int r6_surface_init_2d(struct rad } /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -631,7 +631,7 @@ static int eg_surface_init_1d(struct rad surf_minify(surf, level+i, bpe, i, xalign, yalign, zalign, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -684,7 +684,7 @@ static int eg_surface_init_2d(struct rad } /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } } @@ -1523,7 +1523,7 @@ static int si_surface_init_linear_aligne si_surf_minify(surf, surf->level+i, surf->bpe, i, xalign, yalign, zalign, slice_align, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, surf->bo_alignment); } if (surf->flags & RADEON_SURF_HAS_TILE_MODE_INDEX) { @@ -1566,7 +1566,7 @@ static int si_surface_init_1d(struct rad si_surf_minify(surf, level+i, bpe, i, xalign, yalign, zalign, slice_align, offset); /* level0 and first mipmap need to have alignment */ offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { offset = ALIGN(offset, alignment); } if (surf->flags & RADEON_SURF_HAS_TILE_MODE_INDEX) { @@ -1668,7 +1668,7 @@ static int si_surface_init_2d(struct rad } /* level0 and first mipmap need to have alignment */ aligned_offset = offset = surf->bo_size; -if ((i == 0)) { +if (i == 0) { aligned_offset = ALIGN(aligned_offset, surf->bo_alignment); } if (surf->flags & RADEON_SURF_HAS_TILE_MODE_INDEX) {
CVS commit: src/games/hunt/hunt
Module Name:src Committed By: skrll Date: Sun Mar 30 09:11:50 UTC 2014 Modified Files: src/games/hunt/hunt: hunt.c Log Message: Remove unused. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/games/hunt/hunt/hunt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/hunt/hunt/hunt.c diff -u src/games/hunt/hunt/hunt.c:1.57 src/games/hunt/hunt/hunt.c:1.58 --- src/games/hunt/hunt/hunt.c:1.57 Sun Mar 30 05:46:54 2014 +++ src/games/hunt/hunt/hunt.c Sun Mar 30 09:11:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.57 2014/03/30 05:46:54 dholland Exp $ */ +/* $NetBSD: hunt.c,v 1.58 2014/03/30 09:11:50 skrll Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.57 2014/03/30 05:46:54 dholland Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.58 2014/03/30 09:11:50 skrll Exp $"); #endif /* not lint */ #include @@ -114,9 +114,7 @@ static const char * lookuphost(const struct sockaddr_storage *host, socklen_t hostlen) { static char buf[NI_MAXHOST]; - int flags, result; - - flags = NI_NOFQDN; + int result; result = getnameinfo((const struct sockaddr *)host, hostlen, buf, sizeof(buf), NULL, 0, NI_NOFQDN);
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sun Mar 30 08:36:21 UTC 2014 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Use arm11_setttb for arm1176 as well. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/arch/arm/arm/cpufunc.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/arm/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.142 src/sys/arch/arm/arm/cpufunc.c:1.143 --- src/sys/arch/arm/arm/cpufunc.c:1.142 Sat Mar 29 23:44:37 2014 +++ src/sys/arch/arm/arm/cpufunc.c Sun Mar 30 08:36:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.142 2014/03/29 23:44:37 matt Exp $ */ +/* $NetBSD: cpufunc.c,v 1.143 2014/03/30 08:36:21 skrll Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.142 2014/03/29 23:44:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.143 2014/03/30 08:36:21 skrll Exp $"); #include "opt_compat_netbsd.h" #include "opt_cpuoptions.h" @@ -854,7 +854,7 @@ struct cpu_functions arm1176_cpufuncs = .cf_control = cpufunc_control, .cf_domains = cpufunc_domains, - .cf_setttb = arm11x6_setttb, + .cf_setttb = arm11_setttb, .cf_faultstatus = cpufunc_faultstatus, .cf_faultaddress = cpufunc_faultaddress,
CVS commit: src/sys/arch/arm
Module Name:src Committed By: skrll Date: Sun Mar 30 08:00:34 UTC 2014 Modified Files: src/sys/arch/arm/arm32: db_interface.c db_machdep.c src/sys/arch/arm/include: db_machdep.h Log Message: Provide a DDB_REGS in the same way to others. Makes crash buildable. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/arm32/db_interface.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/arm32/db_machdep.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/db_machdep.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/arm32/db_interface.c diff -u src/sys/arch/arm/arm32/db_interface.c:1.51 src/sys/arch/arm/arm32/db_interface.c:1.52 --- src/sys/arch/arm/arm32/db_interface.c:1.51 Fri Mar 28 21:54:12 2014 +++ src/sys/arch/arm/arm32/db_interface.c Sun Mar 30 08:00:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.51 2014/03/28 21:54:12 matt Exp $ */ +/* $NetBSD: db_interface.c,v 1.52 2014/03/30 08:00:34 skrll Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.51 2014/03/28 21:54:12 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.52 2014/03/30 08:00:34 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -71,6 +71,9 @@ u_int db_fetch_reg(int, db_regs_t *); int db_trapper(u_int, u_int, trapframe_t *, int); int db_active = 0; +db_regs_t ddb_regs; /* register state */ +db_regs_t *ddb_regp; + #ifdef MULTIPROCESSOR volatile struct cpu_info *db_onproc; volatile struct cpu_info *db_newcpu; @@ -87,6 +90,7 @@ int kdb_trap(int type, db_regs_t *regs) { struct cpu_info * const ci = curcpu(); + db_regs_t dbreg; int s; switch (type) { @@ -148,13 +152,19 @@ kdb_trap(int type, db_regs_t *regs) #endif s = splhigh(); - ci->ci_ddb_regs = regs; + ci->ci_ddb_regs = &dbreg; + ddb_regp = &dbreg; + ddb_regs = *regs; + atomic_inc_32(&db_active); cnpollc(true); db_trap(type, 0/*code*/); cnpollc(false); atomic_dec_32(&db_active); + ci->ci_ddb_regs = NULL; + ddb_regp = &dbreg; + *regs = ddb_regs; splx(s); #ifdef MULTIPROCESSOR Index: src/sys/arch/arm/arm32/db_machdep.c diff -u src/sys/arch/arm/arm32/db_machdep.c:1.20 src/sys/arch/arm/arm32/db_machdep.c:1.21 --- src/sys/arch/arm/arm32/db_machdep.c:1.20 Sat Mar 29 09:27:57 2014 +++ src/sys/arch/arm/arm32/db_machdep.c Sun Mar 30 08:00:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.20 2014/03/29 09:27:57 skrll Exp $ */ +/* $NetBSD: db_machdep.c,v 1.21 2014/03/30 08:00:34 skrll Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -33,7 +33,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.20 2014/03/29 09:27:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.21 2014/03/30 08:00:34 skrll Exp $"); #include #include @@ -66,8 +66,7 @@ int db_access_irq_sp(const struct db_var static int ddb_reg_var(const struct db_variable *v, db_expr_t *ep, int op) { - KASSERT(curcpu()->ci_ddb_regs != NULL); - register_t * const rp = (register_t *)(curcpu()->ci_ddb_regs); + register_t * const rp = (register_t *)DDB_REGS; if (op == DB_VAR_SET) { rp[(uintptr_t)v->valuep] = *ep; } else { Index: src/sys/arch/arm/include/db_machdep.h diff -u src/sys/arch/arm/include/db_machdep.h:1.20 src/sys/arch/arm/include/db_machdep.h:1.21 --- src/sys/arch/arm/include/db_machdep.h:1.20 Fri Mar 28 21:54:12 2014 +++ src/sys/arch/arm/include/db_machdep.h Sun Mar 30 08:00:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.20 2014/03/28 21:54:12 matt Exp $ */ +/* $NetBSD: db_machdep.h,v 1.21 2014/03/30 08:00:34 skrll Exp $ */ /* * Copyright (c) 1996 Scott K Stevens @@ -48,7 +48,14 @@ typedef long db_expr_t; /* expression - typedef trapframe_t db_regs_t; -#define DDB_REGS (curcpu()->ci_ddb_regs) +#ifndef MULTIPROCESSOR +extern db_regs_t ddb_regs; /* register state */ +#define DDB_REGS (&ddb_regs) +#else +extern db_regs_t *ddb_regp; +#define DDB_REGS (ddb_regp) +#define ddb_regs (*ddb_regp) +#endif #ifdef __PROG26 #define PC_REGS(regs) ((regs)->tf_r15 & R15_PC)
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: skrll Date: Sun Mar 30 07:29:22 UTC 2014 Modified Files: src/usr.sbin/crash: Makefile Log Message: Build everything on all arm variants To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/crash/Makefile 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/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.26 src/usr.sbin/crash/Makefile:1.27 --- src/usr.sbin/crash/Makefile:1.26 Sat Mar 29 09:36:18 2014 +++ src/usr.sbin/crash/Makefile Sun Mar 30 07:29:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2014/03/29 09:36:18 skrll Exp $ +# $NetBSD: Makefile,v 1.27 2014/03/30 07:29:22 skrll Exp $ PROG= crash MAN= crash.8 @@ -9,13 +9,15 @@ CWARNFLAGS.clang+= -Wno-format LDADD+= -lutil -lkvm -ledit -lterminfo DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} +.include + # some ddb kernel components need limited modifications. for now, # punt if not noted as implemented here. .if${MACHINE} == "amd64" \ || ${MACHINE} == "hppa" \ || ${MACHINE} == "i386" \ || ${MACHINE} == "sparc64" \ -|| (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \ +|| (${MACHINE_CPU} == "arm" && ${MACHINE} != "acorn26") \ || ${MACHINE_ARCH} == "m68k" SRCS+= db_trace.c .if ${MACHINE_ARCH} != "m68k" @@ -54,10 +56,10 @@ MACHINE_FAMILY = x86 || ${MACHINE} == "sparc64" MACHINE_FAMILY = sparc . else -MACHINE_FAMILY = ${MACHINE} +MACHINE_FAMILY = ${MACHINE_CPU} . endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPU} == "arm" .PATH: ${S}/arch/arm/arm32 SRCS+=disassem.c cpufunc_asm.S .endif