CVS commit: src/external/bsd/ppp/usr.sbin/pppd
Module Name:src Committed By: christos Date: Sat Aug 6 05:58:20 UTC 2016 Modified Files: src/external/bsd/ppp/usr.sbin/pppd: sys-bsd.c Log Message: Instead of listing cloners, try to create one so that the module autoloads. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.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/bsd/ppp/usr.sbin/pppd/sys-bsd.c diff -u src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.3 src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.4 --- src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c:1.3 Sat Dec 20 08:15:48 2014 +++ src/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c Sat Aug 6 01:58:20 2016 @@ -339,58 +339,37 @@ sys_check_options(void) /* * ppp_available - check whether the system has any ppp interfaces - * (in fact we check whether we can do an ioctl on ppp0). + * (in fact we check whether we can create one) */ int ppp_available(void) { -struct if_clonereq ifcr; -char *cp, *buf; -int idx, s; +int s; extern char *no_ppp_msg; +struct ifreq ifr; -(void)memset(, 0, sizeof(ifcr)); if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) fatal("%s: socket: %m", __func__); -if (ioctl(s, SIOCIFGCLONERS, ) == -1) - fatal("%s: ioctl(get cloners): %m", __func__); - -buf = malloc(ifcr.ifcr_total * IFNAMSIZ); -if (buf == NULL) - fatal("%s: Unable to allocate cloner name buffer: %m", __func__); - -ifcr.ifcr_count = ifcr.ifcr_total; -ifcr.ifcr_buffer = buf; - -if (ioctl(s, SIOCIFGCLONERS, ) == -1) - fatal("%s: ioctl(get cloners): %m", __func__); -(void)close(s); - -/* - * In case some disappeared in the mean time, clamp it down. - */ -if (ifcr.ifcr_count > ifcr.ifcr_total) - ifcr.ifcr_count = ifcr.ifcr_total; - -for (cp = buf, idx = 0; idx < ifcr.ifcr_count; idx++, cp += IFNAMSIZ) { - if (strcmp(cp, "ppp") == 0) - break; +(void)memset(, 0, sizeof(ifr)); +strlcpy(ifr.ifr_name, "ppp0", sizeof(ifr.ifr_name)); +if (ioctl(s, SIOCIFCREATE, ) == -1) { + int notmine = errno == EEXIST; + (void)close(s); + if (notmine) + return 1; + goto out; } -free(buf); +(void)ioctl(s, SIOCIFDESTROY, ); +(void)close(s); +return 1; -#ifdef __NetBSD__ +out: no_ppp_msg = "\ This system lacks kernel support for PPP. To include PPP support\n\ in the kernel, please read the ppp(4) manual page.\n"; -#else -no_ppp_msg = "\ -This system lacks kernel support for PPP. To include PPP support\n\ -in the kernel, please follow the steps detailed in the README.bsd\n\ -file in the ppp-2.2 distribution.\n"; -#endif -return idx != ifcr.ifcr_count; +return 0; } /*
CVS commit: src
Module Name:src Committed By: pgoyette Date: Sat Aug 6 02:35:06 UTC 2016 Modified Files: src/distrib/sets/lists/modules: mi src/sys/modules: Makefile src/sys/net: bsd-comp.c if_ppp.c ppp-deflate.c ppp_tty.c Added Files: src/sys/modules/ppp: Makefile ppp.ioconf Log Message: Modularize the ppp driver, and adjust dependencies of the compressor modules. For now, this is still included as a built-in module in GENERIC kernels. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.169 -r1.170 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/ppp/Makefile \ src/sys/modules/ppp/ppp.ioconf cvs rdiff -u -r1.20 -r1.21 src/sys/net/bsd-comp.c cvs rdiff -u -r1.152 -r1.153 src/sys/net/if_ppp.c cvs rdiff -u -r1.21 -r1.22 src/sys/net/ppp-deflate.c cvs rdiff -u -r1.61 -r1.62 src/sys/net/ppp_tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.87 src/distrib/sets/lists/modules/mi:1.88 --- src/distrib/sets/lists/modules/mi:1.87 Thu Aug 4 23:54:45 2016 +++ src/distrib/sets/lists/modules/mi Sat Aug 6 02:35:05 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.87 2016/08/04 23:54:45 pgoyette Exp $ +# $NetBSD: mi,v 1.88 2016/08/06 02:35:05 pgoyette Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -198,6 +198,8 @@ ./@MODULEDIR@/pf/pf.kmod base-kernel-modules kmod ./@MODULEDIR@/portalbase-obsolete obsolete ./@MODULEDIR@/portal/portal.kmod base-obsolete obsolete +./@MODULEDIR@/pppbase-kernel-modules kmod +./@MODULEDIR@/ppp/ppp.kmod base-kernel-modules kmod ./@MODULEDIR@/ppp_bsdcomp base-kernel-modules kmod ./@MODULEDIR@/ppp_bsdcomp/ppp_bsdcomp.kmod base-kernel-modules kmod ./@MODULEDIR@/ppp_deflate base-kernel-modules kmod Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.169 src/sys/modules/Makefile:1.170 --- src/sys/modules/Makefile:1.169 Fri Aug 5 17:12:13 2016 +++ src/sys/modules/Makefile Sat Aug 6 02:35:05 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.169 2016/08/05 17:12:13 scole Exp $ +# $NetBSD: Makefile,v 1.170 2016/08/06 02:35:05 pgoyette Exp $ .include @@ -79,6 +79,7 @@ SUBDIR+= opencrypto SUBDIR+= overlay SUBDIR+= pciverbose SUBDIR+= pf +SUBDIR+= ppp SUBDIR+= ppp_bsdcomp SUBDIR+= ppp_deflate SUBDIR+= procfs Index: src/sys/net/bsd-comp.c diff -u src/sys/net/bsd-comp.c:1.20 src/sys/net/bsd-comp.c:1.21 --- src/sys/net/bsd-comp.c:1.20 Sat Nov 29 23:15:20 2008 +++ src/sys/net/bsd-comp.c Sat Aug 6 02:35:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bsd-comp.c,v 1.20 2008/11/29 23:15:20 cube Exp $ */ +/* $NetBSD: bsd-comp.c,v 1.21 2016/08/06 02:35:06 pgoyette Exp $ */ /* Id: bsd-comp.c,v 1.6 1996/08/28 06:31:58 paulus Exp */ /* Because this code is derived from the 4.3BSD compress source: @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bsd-comp.c,v 1.20 2008/11/29 23:15:20 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bsd-comp.c,v 1.21 2016/08/06 02:35:06 pgoyette Exp $"); #include #include @@ -1090,7 +1090,7 @@ bsd_decompress(void *state, struct mbuf #endif /* DEBUG */ } -MODULE(MODULE_CLASS_MISC, ppp_bsdcomp, NULL); +MODULE(MODULE_CLASS_MISC, ppp_bsdcomp, "ppp"); static int ppp_bsdcomp_modcmd(modcmd_t cmd, void *arg) Index: src/sys/net/if_ppp.c diff -u src/sys/net/if_ppp.c:1.152 src/sys/net/if_ppp.c:1.153 --- src/sys/net/if_ppp.c:1.152 Fri Jun 10 13:27:16 2016 +++ src/sys/net/if_ppp.c Sat Aug 6 02:35:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ppp.c,v 1.152 2016/06/10 13:27:16 ozaki-r Exp $ */ +/* $NetBSD: if_ppp.c,v 1.153 2016/08/06 02:35:06 pgoyette Exp $ */ /* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */ /* @@ -102,11 +102,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.152 2016/06/10 13:27:16 ozaki-r Exp $"); - -#include "ppp.h" +__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.153 2016/08/06 02:35:06 pgoyette Exp $"); #ifdef _KERNEL_OPT +#include "ppp.h" #include "opt_inet.h" #include "opt_gateway.h" #include "opt_ppp.h" @@ -133,6 +132,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1 #include #include #include +#include +#include #include #include @@ -181,6 +182,8 @@ static void ppp_ifstart(struct ifnet *if static void pppintr(void *); +extern struct linesw ppp_disc; + /* * Some useful mbuf macros not in mbuf.h. */ @@ -214,11 +217,11 @@ struct if_clone ppp_cloner = IF_CLONE_INITIALIZER("ppp", ppp_clone_create, ppp_clone_destroy); #ifdef PPP_COMPRESS -ONCE_DECL(ppp_compressor_mtx_init); static LIST_HEAD(, compressor) ppp_compressors = { NULL }; static kmutex_t ppp_compressors_mtx; static int ppp_compressor_init(void); +static int ppp_compressor_destroy(void); static struct compressor *ppp_get_compressor(uint8_t); static void ppp_compressor_rele(struct
CVS commit: src/sys/arch/m68k/fpe
Module Name:src Committed By: isaki Date: Sat Aug 6 00:58:55 UTC 2016 Modified Files: src/sys/arch/m68k/fpe: fpu_trig.c Log Message: Modify fpu_sin()'s logic to avoid GCC's warning that has been pointed out in the previous commit. For fpu_cos() there is no such problem, but sync with fpu_sin(). To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/fpe/fpu_trig.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/m68k/fpe/fpu_trig.c diff -u src/sys/arch/m68k/fpe/fpu_trig.c:1.16 src/sys/arch/m68k/fpe/fpu_trig.c:1.17 --- src/sys/arch/m68k/fpe/fpu_trig.c:1.16 Wed Mar 23 05:25:51 2016 +++ src/sys/arch/m68k/fpe/fpu_trig.c Sat Aug 6 00:58:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_trig.c,v 1.16 2016/03/23 05:25:51 mrg Exp $ */ +/* $NetBSD: fpu_trig.c,v 1.17 2016/08/06 00:58:55 isaki Exp $ */ /* * Copyright (c) 1995 Ken Nakata @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.16 2016/03/23 05:25:51 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.17 2016/08/06 00:58:55 isaki Exp $"); #include "fpu_emulate.h" @@ -229,11 +229,10 @@ fpu_cos(struct fpemu *fe) if (ISINF(>fe_f2)) return fpu_newnan(fe); - CPYFPN(, >fe_f2); - /* x = abs(input) */ - x.fp_sign = 0; sign = 0; + CPYFPN(, >fe_f2); + x.fp_sign = 0; /* p <- 2*pi */ fpu_const(, FPU_CONST_PI); @@ -334,13 +333,9 @@ fpu_sin(struct fpemu *fe) if (ISZERO(>fe_f2)) return >fe_f2; -#if defined(__GNUC__) && (__GNUC__ >= 5) && defined(__OPTIMIZE__) - x.fp_sign = 0; -#endif - CPYFPN(, >fe_f2); - /* x = abs(input) */ - sign = x.fp_sign; + sign = fe->fe_f2.fp_sign; + CPYFPN(, >fe_f2); x.fp_sign = 0; /* p <- 2*pi */
CVS commit: src/doc
Module Name:src Committed By: pgoyette Date: Sat Aug 6 00:30:57 UTC 2016 Modified Files: src/doc: TODO.modules Log Message: Expand discussion a bit, and provide ppp as an example way to do things. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/doc/TODO.modules Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.modules diff -u src/doc/TODO.modules:1.4 src/doc/TODO.modules:1.5 --- src/doc/TODO.modules:1.4 Fri Aug 5 04:21:01 2016 +++ src/doc/TODO.modules Sat Aug 6 00:30:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO.modules,v 1.4 2016/08/05 04:21:01 pgoyette Exp $ */ +/* $NetBSD: TODO.modules,v 1.5 2016/08/06 00:30:57 pgoyette Exp $ */ Some notes on the limitations of our current (as of 7.99.35) module subsystem. This list was triggered by an Email exchange between @@ -16,7 +16,14 @@ christos and pgoyette. There are ways around this (such as, having the parent module's initialization command recursively call the module - load code), but they're gross hacks. + load code), but they're often gross hacks. + + Another alternative (which is used by ppp) is to provide a + "registration" mechanism for the "child" modules, and then when + the need for a specific child module is encountered, use + module_autoload() to load the child module. Of course, this + requires that the parent module know about all potentially + loadable children. 2. Currently, config(1) has no way to "no define" drivers
CVS commit: [pgoyette-localcount] src
Module Name:src Committed By: pgoyette Date: Sat Aug 6 00:19:12 UTC 2016 Modified Files: src/crypto/external/bsd/openssh/bin/ssh [pgoyette-localcount]: Makefile src/crypto/external/bsd/openssh/dist [pgoyette-localcount]: PROTOCOL PROTOCOL.agent PROTOCOL.certkeys PROTOCOL.chacha20poly1305 auth-krb5.c auth-options.c auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth.c auth.h auth2-chall.c auth2-hostbased.c auth2.c authfile.c bufbn.c canohost.c canohost.h channels.c clientloop.c compat.c dh.c dh.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c kexgexs.c key.c log.c log.h mac.c mac.h misc.c misc.h monitor.c monitor_fdpass.c monitor_wrap.c monitor_wrap.h mux.c myproposal.h opacket.h packet.c packet.h pathnames.h progressmeter.c readconf.c readconf.h scp.1 scp.c servconf.c serverloop.c session.c session.h sftp-client.c sftp.1 sftp.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c ssh-keygen.1 ssh-keygen.c ssh-keyscan.c ssh-rsa.c ssh.1 ssh.c ssh1.h ssh2.h ssh_api.c ssh_config.5 sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.h sshconnect1.c sshconnect2.c sshd.c sshd_config sshd_config.5 sshkey.c sshkey.h ttymodes.c ttymodes.h version.h src/crypto/external/bsd/openssh/dist/moduli-gen [pgoyette-localcount]: moduli.2048 moduli.3072 moduli.4096 moduli.6144 moduli.7680 moduli.8192 src/crypto/external/bsd/openssh/lib [pgoyette-localcount]: Makefile shlib_version src/distrib/notes/common [pgoyette-localcount]: main src/distrib/sets/lists/base [pgoyette-localcount]: mi rescue.mi shl.mi src/distrib/sets/lists/comp [pgoyette-localcount]: mi src/distrib/sets/lists/debug [pgoyette-localcount]: mi shl.mi src/distrib/sets/lists/modules [pgoyette-localcount]: md.ia64 mi src/distrib/sets/lists/tests [pgoyette-localcount]: mi src/doc [pgoyette-localcount]: 3RDPARTY CHANGES src/etc/mtree [pgoyette-localcount]: NetBSD.dist.tests src/external/bsd/blacklist/bin [pgoyette-localcount]: blacklistd.8 src/external/bsd/blacklist/lib [pgoyette-localcount]: bl.c src/external/bsd/dhcpcd/dist [pgoyette-localcount]: arp.c defs.h dhcp-common.c dhcp.c dhcp6.c dhcp6.h dhcpcd-run-hooks.8.in dhcpcd.8.in dhcpcd.c dhcpcd.conf.5.in dhcpcd.h duid.c if-bsd.c if-options.c if-options.h if.c if.h ipv4.c ipv4.h ipv4ll.c ipv6.c ipv6.h ipv6nd.c ipv6nd.h src/external/bsd/dhcpcd/dist/dhcpcd-hooks [pgoyette-localcount]: 20-resolv.conf src/external/cddl/osnet/dist/lib/libdtrace/common [pgoyette-localcount]: dt_module.c src/external/cddl/osnet/lib [pgoyette-localcount]: Makefile.inc src/external/cddl/osnet/lib/drti [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libavl [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libctf [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libdtrace [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libnvpair [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libumem [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libuutil [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libzfs [pgoyette-localcount]: Makefile src/external/cddl/osnet/lib/libzpool [pgoyette-localcount]: Makefile src/external/gpl3/binutils/dist [pgoyette-localcount]: md5.sum src/external/gpl3/binutils/dist/bfd [pgoyette-localcount]: ChangeLog archive.c coff-alpha.c coff-i386.c coff-x86_64.c coffcode.h cofflink.c configure development.sh dwarf2.c elf-bfd.h elf-strtab.c elf32-arm.c elf32-avr.c elf32-hppa.c elf32-i386.c elf32-ppc.c elf64-hppa.c elf64-ppc.c elf64-x86-64.c elflink.c elfnn-aarch64.c version.h version.m4 src/external/gpl3/binutils/dist/binutils [pgoyette-localcount]: ChangeLog Makefile.am Makefile.in configure objcopy.c objdump.c src/external/gpl3/binutils/dist/binutils/doc [pgoyette-localcount]: addr2line.1 ar.1 binutils.info binutils.texi cxxfilt.man dlltool.1 elfedit.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 windmc.1 windres.1 src/external/gpl3/binutils/dist/binutils/po [pgoyette-localcount]: sv.po src/external/gpl3/binutils/dist/binutils/testsuite [pgoyette-localcount]: ChangeLog src/external/gpl3/binutils/dist/binutils/testsuite/binutils-all [pgoyette-localcount]: ar.exp compress.exp src/external/gpl3/binutils/dist/elfcpp [pgoyette-localcount]: ChangeLog
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: jakllsch Date: Sat Aug 6 00:02:33 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi Log Message: fix previous To generate a diff of this commit: cvs rdiff -u -r1.2054 -r1.2055 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2054 src/distrib/sets/lists/comp/mi:1.2055 --- src/distrib/sets/lists/comp/mi:1.2054 Fri Aug 5 13:14:16 2016 +++ src/distrib/sets/lists/comp/mi Sat Aug 6 00:02:33 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2054 2016/08/05 13:14:16 christos Exp $ +# $NetBSD: mi,v 1.2055 2016/08/06 00:02:33 jakllsch Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -15920,7 +15920,7 @@ ./usr/share/man/html3/sched_getscheduler.html comp-c-htmlman html ./usr/share/man/html3/sched_protect.html comp-c-htmlman html ./usr/share/man/html3/sched_rr_get_interval.html comp-c-htmlman html -./usr/share/man/html3/sched_affinity_np.html comp-c-htmlman html +./usr/share/man/html3/sched_setaffinity_np.html comp-c-htmlman html ./usr/share/man/html3/sched_setparam.html comp-c-htmlman html ./usr/share/man/html3/sched_setscheduler.html comp-c-htmlman html ./usr/share/man/html3/sched_yield.html comp-c-htmlman html
CVS commit: src/sys/ufs/ext2fs
Module Name:src Committed By: jdolecek Date: Fri Aug 5 21:22:06 UTC 2016 Modified Files: src/sys/ufs/ext2fs: ext2fs.h Log Message: add defines for the missing ext4 feature flags To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/ufs/ext2fs/ext2fs.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/ufs/ext2fs/ext2fs.h diff -u src/sys/ufs/ext2fs/ext2fs.h:1.40 src/sys/ufs/ext2fs/ext2fs.h:1.41 --- src/sys/ufs/ext2fs/ext2fs.h:1.40 Thu Aug 4 17:43:48 2016 +++ src/sys/ufs/ext2fs/ext2fs.h Fri Aug 5 21:22:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs.h,v 1.40 2016/08/04 17:43:48 jdolecek Exp $ */ +/* $NetBSD: ext2fs.h,v 1.41 2016/08/05 21:22:06 jdolecek Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -264,8 +264,13 @@ struct m_ext2fs { #define EXT2F_COMPAT_EXTATTR 0x0008 #define EXT2F_COMPAT_RESIZE 0x0010 #define EXT2F_COMPAT_DIRHASHINDEX 0x0020 +#define EXT2F_COMPAT_SPARSESUPER2 0x0200 #define EXT2F_COMPAT_BITS \ "\20" \ + "\12COMPAT_SPARSESUPER2" \ + "\11" \ + "\10" \ + "\07" \ "\06COMPAT_DIRHASHINDEX" \ "\05COMPAT_RESIZE" \ "\04COMPAT_EXTATTR" \ @@ -280,8 +285,20 @@ struct m_ext2fs { #define EXT2F_ROCOMPAT_GDT_CSUM 0x0010 #define EXT2F_ROCOMPAT_DIR_NLINK 0x0020 #define EXT2F_ROCOMPAT_EXTRA_ISIZE 0x0040 +#define EXT2F_ROCOMPAT_QUOTA 0x0100 +#define EXT2F_ROCOMPAT_BIGALLOC 0x0200 +#define EXT2F_ROCOMPAT_METADATA_CKSUM 0x0400 +#define EXT2F_ROCOMPAT_READONLY 0x1000 +#define EXT2F_ROCOMPAT_PROJECT 0x2000 #define EXT2F_ROCOMPAT_BITS \ "\20" \ + "\16ROCOMPAT_PROJECT" \ + "\15ROCOMPAT_READONLY" \ + "\14" \ + "\13ROCOMPAT_METADATA_CKSUM" \ + "\12ROCOMPAT_BIGALLOC" \ + "\11ROCOMPAT_QUOTA" \ + "\10" \ "\07ROCOMPAT_EXTRA_ISIZE" \ "\06ROCOMPAT_DIR_NLINK" \ "\05ROCOMPAT_GDT_CSUM" \ @@ -299,8 +316,21 @@ struct m_ext2fs { #define EXT2F_INCOMPAT_64BIT 0x0080 #define EXT2F_INCOMPAT_MMP 0x0100 #define EXT2F_INCOMPAT_FLEX_BG 0x0200 +#define EXT2F_INCOMPAT_EA_INODE 0x0400 +#define EXT2F_INCOMPAT_DIRDATA 0x1000 +#define EXT2F_INCOMPAT_CSUM_SEED 0x2000 +#define EXT2F_INCOMPAT_LARGEDIR 0x4000 +#define EXT2F_INCOMPAT_INLINE_DATA 0x8000 +#define EXT2F_INCOMPAT_ENCRYPT 0x1 #define EXT2F_INCOMPAT_BITS \ "\20" \ + "\021INCOMPAT_ENCRYPT" \ + "\020INCOMPAT_INLINE_DATA" \ + "\017INCOMPAT_LARGEDIR" \ + "\016INCOMPAT_CSUM_SEED" \ + "\015INCOMPAT_DIRDATA" \ + "\014" \ + "\013INCOMPAT_EA_INODE" \ "\012INCOMPAT_FLEX_BG" \ "\011INCOMPAT_MMP" \ "\010INCOMPAT_64BIT" \
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: jakllsch Date: Fri Aug 5 20:54:28 UTC 2016 Modified Files: src/sys/uvm/pmap: pmap.c Log Message: Only include `static inline pmap_asid_check()` if it might be used. Should fix HEAD-llvm evbppc autobuild. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/uvm/pmap/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/uvm/pmap/pmap.c diff -u src/sys/uvm/pmap/pmap.c:1.18 src/sys/uvm/pmap/pmap.c:1.19 --- src/sys/uvm/pmap/pmap.c:1.18 Thu Jul 14 05:00:51 2016 +++ src/sys/uvm/pmap/pmap.c Fri Aug 5 20:54:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.18 2016/07/14 05:00:51 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.19 2016/08/05 20:54:28 jakllsch Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.18 2016/07/14 05:00:51 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.19 2016/08/05 20:54:28 jakllsch Exp $"); /* * Manages physical address maps. @@ -276,10 +276,10 @@ kmutex_t pmap_pvlist_mutex __cacheline_a * Debug functions. */ +#ifdef DEBUG static inline void pmap_asid_check(pmap_t pm, const char *func) { -#ifdef DEBUG if (!PMAP_IS_ACTIVE(pm)) return; @@ -288,8 +288,8 @@ pmap_asid_check(pmap_t pm, const char *f if (asid != pai->pai_asid) panic("%s: inconsistency for active TLB update: %u <-> %u", func, asid, pai->pai_asid); -#endif } +#endif static void pmap_addr_range_check(pmap_t pmap, vaddr_t sva, vaddr_t eva, const char *func)
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Fri Aug 5 20:21:58 UTC 2016 Modified Files: src/sys/arch/sgimips/mace: pci_mace.c Log Message: simplify macepci_intr(): - use uint32_t - always clear all error bits - avoid a compiler bug(?) which caused the test for MACE_PERR_MASTER_ABORT to fail on n32 now my O2 no longer hangs when leaving cold To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/mace/pci_mace.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/sgimips/mace/pci_mace.c diff -u src/sys/arch/sgimips/mace/pci_mace.c:1.20 src/sys/arch/sgimips/mace/pci_mace.c:1.21 --- src/sys/arch/sgimips/mace/pci_mace.c:1.20 Fri Oct 2 05:22:52 2015 +++ src/sys/arch/sgimips/mace/pci_mace.c Fri Aug 5 20:21:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_mace.c,v 1.20 2015/10/02 05:22:52 msaitoh Exp $ */ +/* $NetBSD: pci_mace.c,v 1.21 2016/08/05 20:21:58 macallan Exp $ */ /* * Copyright (c) 2001,2003 Christopher Sekiya @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.20 2015/10/02 05:22:52 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.21 2016/08/05 20:21:58 macallan Exp $"); #include "opt_pci.h" #include "pci.h" @@ -293,11 +293,11 @@ macepci_intr(void *arg) { struct macepci_softc *sc = (struct macepci_softc *)arg; pci_chipset_tag_t pc = >sc_pc; - u_int32_t error, address; + uint32_t error, address; error = bus_space_read_4(pc->iot, pc->ioh, MACE_PCI_ERROR_FLAGS); address = bus_space_read_4(pc->iot, pc->ioh, MACE_PCI_ERROR_ADDR); - while (error & 0xffc0) { + if (error & 0xffc0) { if (error & MACE_PERR_MASTER_ABORT) { /* * this seems to be a more-or-less normal error @@ -305,73 +305,47 @@ macepci_intr(void *arg) * a _lot_ of these errors, so no message for now * while I figure out if I missed a trick somewhere. */ - error &= ~MACE_PERR_MASTER_ABORT; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_TARGET_ABORT) { printf("mace: target abort at %x\n", address); - error &= ~MACE_PERR_TARGET_ABORT; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_DATA_PARITY_ERR) { printf("mace: parity error at %x\n", address); - error &= ~MACE_PERR_DATA_PARITY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_RETRY_ERR) { printf("mace: retry error at %x\n", address); - error &= ~MACE_PERR_RETRY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_ILLEGAL_CMD) { printf("mace: illegal command at %x\n", address); - error &= ~MACE_PERR_ILLEGAL_CMD; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_SYSTEM_ERR) { printf("mace: system error at %x\n", address); - error &= ~MACE_PERR_SYSTEM_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_INTERRUPT_TEST) { printf("mace: interrupt test at %x\n", address); - error &= ~MACE_PERR_INTERRUPT_TEST; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_PARITY_ERR) { printf("mace: parity error at %x\n", address); - error &= ~MACE_PERR_PARITY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_RSVD) { printf("mace: reserved condition at %x\n", address); - error &= ~MACE_PERR_RSVD; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_OVERRUN) { printf("mace: overrun at %x\n", address); - error &= ~MACE_PERR_OVERRUN; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } + + /* clear all */ + bus_space_write_4(pc->iot, pc->ioh, + MACE_PCI_ERROR_FLAGS, error & ~0xffc0); } return 0; }
CVS commit: src/sys/ufs/ext2fs
Module Name:src Committed By: jdolecek Date: Fri Aug 5 20:15:41 UTC 2016 Modified Files: src/sys/ufs/ext2fs: ext2fs_vnops.c Log Message: PR kern/7867 add support for UF_NODUMP flag to ext2fs To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/ufs/ext2fs/ext2fs_vnops.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/ufs/ext2fs/ext2fs_vnops.c diff -u src/sys/ufs/ext2fs/ext2fs_vnops.c:1.119 src/sys/ufs/ext2fs/ext2fs_vnops.c:1.120 --- src/sys/ufs/ext2fs/ext2fs_vnops.c:1.119 Wed Aug 3 23:29:05 2016 +++ src/sys/ufs/ext2fs/ext2fs_vnops.c Fri Aug 5 20:15:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vnops.c,v 1.119 2016/08/03 23:29:05 jdolecek Exp $ */ +/* $NetBSD: ext2fs_vnops.c,v 1.120 2016/08/05 20:15:41 jdolecek Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.119 2016/08/03 23:29:05 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.120 2016/08/05 20:15:41 jdolecek Exp $"); #include #include @@ -311,13 +311,17 @@ ext2fs_getattr(void *v) if (EXT2_DINODE_FITS(ip->i_din.e2fs_din, e2di_crtime, EXT2_DINODE_SIZE(ip->i_e2fs))) { EXT2_DINODE_TIME_GET(>va_birthtime, ip->i_din.e2fs_din, e2di_crtime, EXT2_DINODE_SIZE(ip->i_e2fs)); } + + vap->va_flags = 0; + vap->va_flags |= (ip->i_e2fs_flags & EXT2_NODUMP) ? UF_NODUMP : 0; #ifdef EXT2FS_SYSTEM_FLAGS - vap->va_flags = (ip->i_e2fs_flags & EXT2_APPEND) ? SF_APPEND : 0; vap->va_flags |= (ip->i_e2fs_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; + vap->va_flags |= (ip->i_e2fs_flags & EXT2_APPEND) ? SF_APPEND : 0; #else - vap->va_flags = (ip->i_e2fs_flags & EXT2_APPEND) ? UF_APPEND : 0; vap->va_flags |= (ip->i_e2fs_flags & EXT2_IMMUTABLE) ? UF_IMMUTABLE : 0; + vap->va_flags |= (ip->i_e2fs_flags & EXT2_APPEND) ? UF_APPEND : 0; #endif + vap->va_gen = ip->i_e2fs_gen; /* this doesn't belong here */ if (vp->v_type == VBLK) @@ -391,17 +395,18 @@ ext2fs_setattr(void *v) if (error) return (error); + ip->i_e2fs_flags &= ~(EXT2_APPEND | EXT2_IMMUTABLE | EXT2_NODUMP); #ifdef EXT2FS_SYSTEM_FLAGS - ip->i_e2fs_flags &= ~(EXT2_APPEND | EXT2_IMMUTABLE); ip->i_e2fs_flags |= (vap->va_flags & SF_APPEND) ? EXT2_APPEND : 0 | (vap->va_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE : 0; #else - ip->i_e2fs_flags &= ~(EXT2_APPEND | EXT2_IMMUTABLE); ip->i_e2fs_flags |= (vap->va_flags & UF_APPEND) ? EXT2_APPEND : 0 | (vap->va_flags & UF_IMMUTABLE) ? EXT2_IMMUTABLE : 0; #endif + ip->i_e2fs_flags |= + (vap->va_flags & UF_NODUMP) ? EXT2_NODUMP : 0; ip->i_flag |= IN_CHANGE; if (vap->va_flags & (IMMUTABLE | APPEND)) return (0);
CVS commit: src/sys/ufs/ext2fs
Module Name:src Committed By: jdolecek Date: Fri Aug 5 20:06:55 UTC 2016 Modified Files: src/sys/ufs/ext2fs: ext2fs_vfsops.c Log Message: add devel ifndefs for incompat/rocompat features so that it's possible to ignore them and mount the filesystem; default is for the mount to fail To generate a diff of this commit: cvs rdiff -u -r1.196 -r1.197 src/sys/ufs/ext2fs/ext2fs_vfsops.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/ufs/ext2fs/ext2fs_vfsops.c diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.196 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.197 --- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.196 Wed Aug 3 23:33:59 2016 +++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Aug 5 20:06:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vfsops.c,v 1.196 2016/08/03 23:33:59 pgoyette Exp $ */ +/* $NetBSD: ext2fs_vfsops.c,v 1.197 2016/08/05 20:06:55 jdolecek Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1994 @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.196 2016/08/03 23:33:59 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.197 2016/08/05 20:06:55 jdolecek Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -1238,14 +1238,18 @@ ext2fs_sbfill(struct m_ext2fs *m_fs, int if (u32) { snprintb(buf, sizeof(buf), EXT2F_INCOMPAT_BITS, u32); printf("ext2fs: unsupported incompat features: %s\n", buf); +#ifndef EXT2_IGNORE_INCOMPAT_FEATURES return EINVAL; +#endif } u32 = fs->e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP; if (!ronly && u32) { snprintb(buf, sizeof(buf), EXT2F_ROCOMPAT_BITS, u32); printf("ext2fs: unsupported ro-incompat features: %s\n", buf); +#ifndef EXT2_IGNORE_ROCOMPAT_FEATURES return EROFS; +#endif } if (fs->e2fs_inode_size == 0 || !powerof2(fs->e2fs_inode_size) || fs->e2fs_inode_size > m_fs->e2fs_bsize) { printf("ext2fs: bad inode size\n");
CVS commit: src/sys/modules
Module Name:src Committed By: scole Date: Fri Aug 5 17:12:13 UTC 2016 Modified Files: src/sys/modules: Makefile Log Message: PR port-ia64/51261 Use exec_elf64 modules for ia64 To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.168 src/sys/modules/Makefile:1.169 --- src/sys/modules/Makefile:1.168 Thu Aug 4 23:53:47 2016 +++ src/sys/modules/Makefile Fri Aug 5 17:12:13 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.168 2016/08/04 23:53:47 pgoyette Exp $ +# $NetBSD: Makefile,v 1.169 2016/08/05 17:12:13 scole Exp $ .include @@ -133,12 +133,15 @@ SUBDIR+= xldscripts SUBDIR+= exec_aout .endif -.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_CPU} != "aarch64" +.if ${MACHINE_ARCH} != "alpha" && \ +${MACHINE_CPU} != "aarch64" && \ +${MACHINE_ARCH} != "ia64" SUBDIR+= exec_elf32 .endif .if ${MACHINE_CPU} == "aarch64" || \ ${MACHINE_ARCH} == "alpha" || \ +${MACHINE_ARCH} == "ia64" || \ ${MACHINE_ARCH} == "sparc64" || \ ${MACHINE_ARCH} == "x86_64" SUBDIR+= exec_elf64
CVS commit: src/sys/lib/libkern/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 17:10:48 UTC 2016 Modified Files: src/sys/lib/libkern/arch/ia64: Makefile.inc Removed Files: src/sys/lib/libkern/arch/ia64: memcpy.S Log Message: PR port-ia64/51261 Use common/lib/libc/arch/ia64/string functions To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r1.1 -r0 src/sys/lib/libkern/arch/ia64/memcpy.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/lib/libkern/arch/ia64/Makefile.inc diff -u src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 src/sys/lib/libkern/arch/ia64/Makefile.inc:1.5 --- src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/ia64/Makefile.inc Fri Aug 5 17:10:48 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.4 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.5 2016/08/05 17:10:48 scole Exp $ # SRCS+= ffs.c SRCS+= divdi3.S divsi3.S modsi3.S moddi3.S udivdi3.S udivsi3.S SRCS+= umoddi3.S umodsi3.S bswap64.S bswap32.S bswap16.S ntohl.S htonl.S -SRCS+= memcpy.S +SRCS+= bcopy.S bzero.S ffs.S memcpy.S memmove.S
CVS commit: src/sys/arch/ia64/stand/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 17:08:10 UTC 2016 Modified Files: src/sys/arch/ia64/stand/ia64/efi: Makefile src/sys/arch/ia64/stand/ia64/ski: Makefile Log Message: PR port-ia64/51261 Put skiload loader.efi loader.sym in /usr/mdec To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/ia64/ski/Makefile 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/ia64/stand/ia64/efi/Makefile diff -u src/sys/arch/ia64/stand/ia64/efi/Makefile:1.3 src/sys/arch/ia64/stand/ia64/efi/Makefile:1.4 --- src/sys/arch/ia64/stand/ia64/efi/Makefile:1.3 Sat Jan 22 19:19:19 2011 +++ src/sys/arch/ia64/stand/ia64/efi/Makefile Fri Aug 5 17:08:10 2016 @@ -1,48 +1,37 @@ +# $NetBSD: Makefile,v 1.4 2016/08/05 17:08:10 scole Exp $ + S= ${.CURDIR}/../../../../.. VERSIONFILE= ${.CURDIR}/version .include "../Makefile.booters" -PROG= loader.sym - -MAN=# Tell bsd.prog.mk that loader.sym is not a man page. - -INTERNALPROG= +PROGS= loader.sym loader.efi +MAN.loader.sym= # no man +MAN.loader.efi= # no man -SRCS= start.S conf.c efimd.c vers.c main.c - -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include/${MACHINE_ARCH} CPPFLAGS+= -I${IA64_STAND_DIR}/efi/libefi/ -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/libshell/ CPPFLAGS+= -I${IA64_STAND_DIR}/common/ CPPFLAGS+= -I${S} - -CPPFLAGS+= -DLOADER - -CPPFLAGS+= -DLIBKERN_OPTIMISE_SPACE \ - -DHEAP_VARIABLE - - -# Pick up FreeBSD glue -#CPPFLAGS+= -I${.CURDIR}/../../ +CPPFLAGS+= -DLOADER -DLIBKERN_OPTIMISE_SPACE -DHEAP_VARIABLE # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" +# need to do this after common stuff pulled in +SRCS.loader.sym:= start.S conf.c efimd.c vers.c main.c ${SRCS} -FILES= loader.efi - +# XXX verify +BINDIR?= /usr/mdec LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic -nostdlib -${PROG}: ${LDSCRIPT} +loader.sym: ${LDSCRIPT} -CLEANFILES+= vers.c loader.efi ${OBJS} +CLEANFILES+= vers.c ${OBJS} NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH} @@ -50,14 +39,14 @@ vers.c: ${VERSIONFILE} ${SOURCES} ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT} -loader.efi: ${PROG} - if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ - ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ +loader.efi: loader.sym + if [ `${OBJDUMP} -t loader.sym | fgrep '*UND*' | wc -l` != 0 ]; then \ + ${OBJDUMP} -t loader.sym | fgrep '*UND*'; \ exit 1; \ fi ${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \ -j .rela.dyn -j .reloc -j .sdata -j .text \ - --target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET} + --target=efi-app-${MACHINE_ARCH} loader.sym ${.TARGET} @echo link finished. all: loader.efi Index: src/sys/arch/ia64/stand/ia64/ski/Makefile diff -u src/sys/arch/ia64/stand/ia64/ski/Makefile:1.4 src/sys/arch/ia64/stand/ia64/ski/Makefile:1.5 --- src/sys/arch/ia64/stand/ia64/ski/Makefile:1.4 Sat Jan 22 19:19:19 2011 +++ src/sys/arch/ia64/stand/ia64/ski/Makefile Fri Aug 5 17:08:10 2016 @@ -6,6 +6,7 @@ VERSIONFILE= ${.CURDIR}/version PROG= skiload MAN=# +BINDIR?= /usr/mdec STRIP= # We must not strip skiload at install time. @@ -16,8 +17,6 @@ SRCS= conf.c copy.c delay.c devicename. CPPFLAGS+= -DLOADER -DSKIFS CPPFLAGS+= -I${S} CPPFLAGS+= -I${IA64_STAND_DIR}/common -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include -CPPFLAGS+= -I${IA64_STAND_DIR}/efi/include/${MACHINE_ARCH} CPPFLAGS+= -DLIBKERN_OPTIMISE_SPACE \ -DHEAP_VARIABLE
CVS commit: src/sys/arch/ia64/pci
Module Name:src Committed By: scole Date: Fri Aug 5 17:04:52 UTC 2016 Modified Files: src/sys/arch/ia64/pci: pci_machdep.c Log Message: PR port-ia64/51261 Add pci_enumerate_bus stub so kernels will compile To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/pci/pci_machdep.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/ia64/pci/pci_machdep.c diff -u src/sys/arch/ia64/pci/pci_machdep.c:1.4 src/sys/arch/ia64/pci/pci_machdep.c:1.5 --- src/sys/arch/ia64/pci/pci_machdep.c:1.4 Fri Oct 2 05:22:51 2015 +++ src/sys/arch/ia64/pci/pci_machdep.c Fri Aug 5 17:04:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.4 2015/10/02 05:22:51 msaitoh Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.5 2016/08/05 17:04:52 scole Exp $ */ /* * Copyright (c) 2009, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.4 2015/10/02 05:22:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.5 2016/08/05 17:04:52 scole Exp $"); #include #include @@ -102,3 +102,13 @@ pci_conf_write(pci_chipset_tag_t pc, pci if (res.sal_status < 0) printf("pci configuration write failed\n"); } + +int +pci_enumerate_bus(struct pci_softc *sc, const int *locators, + int (*match)(const struct pci_attach_args *), struct pci_attach_args *pap) +{ + /* XXX implement */ + panic("ia64 pci_enumerate_bus not implemented"); + + return -1; +}
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: maya Date: Fri Aug 5 17:04:58 UTC 2016 Modified Files: src/sys/dev/scsipi: uk.c Log Message: uk(4) is safe to suspend, register it as such To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/dev/scsipi/uk.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/scsipi/uk.c diff -u src/sys/dev/scsipi/uk.c:1.63 src/sys/dev/scsipi/uk.c:1.64 --- src/sys/dev/scsipi/uk.c:1.63 Thu Jul 14 04:00:46 2016 +++ src/sys/dev/scsipi/uk.c Fri Aug 5 17:04:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uk.c,v 1.63 2016/07/14 04:00:46 msaitoh Exp $ */ +/* $NetBSD: uk.c,v 1.64 2016/08/05 17:04:58 maya Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.63 2016/07/14 04:00:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.64 2016/08/05 17:04:58 maya Exp $"); #include #include @@ -116,6 +116,9 @@ ukattach(device_t parent, device_t self, aprint_naive("\n"); aprint_normal("\n"); + + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, "couldn't establish power handler\n"); } static int
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:04:16 UTC 2016 Modified Files: src/sys/arch/ia64/include: vmparam.h Log Message: PR port-ia64/51261 Import more variables from FreeBSD that will be needed later To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/include/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/ia64/include/vmparam.h diff -u src/sys/arch/ia64/include/vmparam.h:1.7 src/sys/arch/ia64/include/vmparam.h:1.8 --- src/sys/arch/ia64/include/vmparam.h:1.7 Sun Nov 14 13:33:22 2010 +++ src/sys/arch/ia64/include/vmparam.h Fri Aug 5 17:04:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.7 2010/11/14 13:33:22 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.8 2016/08/05 17:04:16 scole Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -63,7 +63,7 @@ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif - +#define IA64_VM_MINKERN_REGION 4 /* * PTEs for mapping user space into the kernel for phyio operations. @@ -82,6 +82,53 @@ #define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) #define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) +/* + * The Itanium architecture defines that all implementations support at + * least 51 virtual address bits (i.e. IMPL_VA_MSB=50). The unimplemented + * bits are sign-extended from VA{IMPL_VA_MSB}. As such, there's a gap in + * the virtual address range, which extends at most from 0x0004 + * to 0x1ffb. We define the top half of a region in terms of + * this worst-case gap. + */ +#define IA64_REGION_GAP_START 0x0004 +#define IA64_REGION_GAP_EXTEND 0x1ffc + +/* + * Parameters for Pre-Boot Virtual Memory (PBVM). + * The kernel, its modules and metadata are loaded in the PBVM by the loader. + * The PBVM consists of pages for which the mapping is maintained in a page + * table. The page table is at least 1 EFI page large (i.e. 4KB), but can be + * larger to accommodate more PBVM. The maximum page table size is 1MB. With + * 8 bytes per page table entry, this means that the PBVM has at least 512 + * pages and at most 128K pages. + * The GNU toolchain (in particular GNU ld) does not support an alignment + * larger than 64K. This means that we cannot guarantee page alignment for + * a page size that's larger than 64K. We do want to have text and data in + * different pages, which means that the maximum usable page size is 64KB. + * Consequently: + * The maximum total PBVM size is 8GB -- enough for a DVD image. A page table + * of a single EFI page (4KB) allows for 32MB of PBVM. + * + * The kernel is given the PA and size of the page table that provides the + * mapping of the PBVM. The page table itself is assumed to be mapped at a + * known virtual address and using a single translation wired into the CPU. + * As such, the page table is assumed to be a power of 2 and naturally aligned. + * The kernel also assumes that a good portion of the kernel text is mapped + * and wired into the CPU, but does not assume that the mapping covers the + * whole of PBVM. + */ +#define IA64_PBVM_RRIA64_VM_MINKERN_REGION +#define IA64_PBVM_BASE \ +(IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_GAP_EXTEND) + +#define IA64_PBVM_PGTBL_MAXSZ 1048576 +#define IA64_PBVM_PGTBL \ +(IA64_RR_BASE(IA64_PBVM_RR + 1) - IA64_PBVM_PGTBL_MAXSZ) + +#define IA64_PBVM_PAGE_SHIFT16 /* 64KB */ +#define IA64_PBVM_PAGE_SIZE (1 << IA64_PBVM_PAGE_SHIFT) +#define IA64_PBVM_PAGE_MASK (IA64_PBVM_PAGE_SIZE - 1) + #define IA64_ID_PAGE_SHIFT 28 /* 256M */ #define IA64_ID_PAGE_SIZE (1 << IA64_ID_PAGE_SHIFT) #define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1)
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:02:59 UTC 2016 Modified Files: src/sys/arch/ia64/include: pte.h Log Message: PR port-ia64/51261 Sync with FreeBSD, no functional changes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/pte.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/ia64/include/pte.h diff -u src/sys/arch/ia64/include/pte.h:1.2 src/sys/arch/ia64/include/pte.h:1.3 --- src/sys/arch/ia64/include/pte.h:1.2 Thu Dec 27 15:58:55 2012 +++ src/sys/arch/ia64/include/pte.h Fri Aug 5 17:02:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.2 2012/12/27 15:58:55 martin Exp $ */ +/* $NetBSD: pte.h,v 1.3 2016/08/05 17:02:59 scole Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: releng/10.1/sys/ia64/include/pte.h 137978 2004-11-21 21:40:08Z marcel $ */ #ifndef _MACHINE_PTE_H_ @@ -45,7 +45,6 @@ #define PTE_PL_KERN 0x #define PTE_PL_USER 0x0180 #define PTE_AR_MASK 0x0E00 - #define PTE_AR_R 0x #define PTE_AR_RX 0x0200 #define PTE_AR_RW 0x0400 @@ -95,7 +94,6 @@ struct ia64_lpte { uint64_tchain; /* pa of collision chain */ }; - /* * Layout of rr[x]. */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:01:56 UTC 2016 Modified Files: src/sys/arch/ia64/include: pci_machdep.h Log Message: PR port-ia64/51261 Add pci_enumerate_bus To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/pci_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/ia64/include/pci_machdep.h diff -u src/sys/arch/ia64/include/pci_machdep.h:1.2 src/sys/arch/ia64/include/pci_machdep.h:1.3 --- src/sys/arch/ia64/include/pci_machdep.h:1.2 Mon Jun 28 12:14:08 2010 +++ src/sys/arch/ia64/include/pci_machdep.h Fri Aug 5 17:01:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.2 2010/06/28 12:14:08 kiyohara Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.3 2016/08/05 17:01:56 scole Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -42,4 +42,13 @@ void pci_decompose_tag(pci_chipset_tag_t pcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int); void pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); +/* + * XXX should ia64_pci_enumerate_bus and + * #define PCI_MACHDEP_ENUMERATE_BUS ia64_pci_enumerate_bus + * be used? acpi_pci appears to require pci_enumerate_bus though. + */ +int pci_enumerate_bus(struct pci_softc *, const int *, + int (*)(const struct pci_attach_args *), + struct pci_attach_args *); + #endif
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 17:01:13 UTC 2016 Modified Files: src/sys/arch/ia64/include: mcontext.h Log Message: PR port-ia64/51261 Add __fpregset_t __gregset_t _UC_MACHINE_PC stubs To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/mcontext.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/ia64/include/mcontext.h diff -u src/sys/arch/ia64/include/mcontext.h:1.4 src/sys/arch/ia64/include/mcontext.h:1.5 --- src/sys/arch/ia64/include/mcontext.h:1.4 Thu Jun 30 01:41:05 2016 +++ src/sys/arch/ia64/include/mcontext.h Fri Aug 5 17:01:13 2016 @@ -1,9 +1,11 @@ -/* $NetBSD: mcontext.h,v 1.4 2016/06/30 01:41:05 mrg Exp $ */ +/* $NetBSD: mcontext.h,v 1.5 2016/08/05 17:01:13 scole Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * + * Copyright (c) 1999, 2003 Marcel Moolenaar + * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * @@ -15,6 +17,8 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -34,6 +38,19 @@ #include +/* XXX fix this, just get to compile for now */ +#define _NGREG 128 + +#ifndef __ASSEMBLER__ +typedef unsigned long __greg_t; +typedef __greg_t __gregset_t[_NGREG]; + +typedef struct { + union _ia64_fpreg __fpregs[_NGREG]; +} __fpregset_t; + +#endif /* __ASSEMBLER__ */ + /* * The mc_flags field provides the necessary clues when dealing with the gory * details of ia64 specific contexts. A comprehensive explanation is added for @@ -80,7 +97,6 @@ typedef struct __mcontext { unsigned long mc_flags; #define _MC_FLAGS_ASYNC_CONTEXT 0x0001 #define _MC_FLAGS_HIGHFP_VALID 0x0002 -#define _MC_FLAGS_KSE_SET_MBOX 0x0004 /* Undocumented. Has to go. */ #define _MC_FLAGS_SYSCALL_CONTEXT 0x0008 unsigned long _reserved_; struct _special mc_special; @@ -89,10 +105,15 @@ typedef struct __mcontext { struct _caller_saved mc_scratch; struct _caller_saved_fp mc_scratch_fp; struct _high_fp mc_high_fp; + + /* XXX fix */ + __gregset_t __gregs; + __fpregset_t __fpregs; } mcontext_t; #define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.mc_special.sp) -#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.mc_special.rp) +/* XXX or assembly "mov Rn = ip" or ...? */ +#define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.mc_special.iip) static __inline void * __lwp_getprivate_fast(void)
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:59:26 UTC 2016 Modified Files: src/sys/arch/ia64/include: lock.h Log Message: PR port-ia64/51261 Add mb_read mb_write mb_memory To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/lock.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/ia64/include/lock.h diff -u src/sys/arch/ia64/include/lock.h:1.4 src/sys/arch/ia64/include/lock.h:1.5 --- src/sys/arch/ia64/include/lock.h:1.4 Mon Jul 20 04:41:37 2009 +++ src/sys/arch/ia64/include/lock.h Fri Aug 5 16:59:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.4 2009/07/20 04:41:37 kiyohara Exp $ */ +/* $NetBSD: lock.h,v 1.5 2016/08/05 16:59:26 scole Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -116,4 +116,26 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp = __SIMPLELOCK_UNLOCKED; } +/* XXX mf.a overkill for these? */ +static __inline void +mb_read(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + +static __inline void +mb_write(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + +static __inline void +mb_memory(void) +{ + __asm __volatile("mf.a \n" + "mf \n" ::: "memory"); +} + #endif /* _IA64_LOCK_H_ */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:58:33 UTC 2016 Modified Files: src/sys/arch/ia64/include: elf_machdep.h Log Message: PR port-ia64/51261 Add macro R_TYPE() stub To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/elf_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/ia64/include/elf_machdep.h diff -u src/sys/arch/ia64/include/elf_machdep.h:1.1 src/sys/arch/ia64/include/elf_machdep.h:1.2 --- src/sys/arch/ia64/include/elf_machdep.h:1.1 Fri Apr 7 14:21:18 2006 +++ src/sys/arch/ia64/include/elf_machdep.h Fri Aug 5 16:58:33 2016 @@ -27,7 +27,8 @@ * * $FreeBSD: src/sys/ia64/include/elf.h,v 1.11 2003/09/25 01:10:24 peter Exp $ */ - +#ifndef _IA64_ELF_MACHDEP_H +#define _IA64_ELF_MACHDEP_H #define ELF32_MACHDEP_ENDIANNESS XXX /* break compilation */ #define ELF32_MACHDEP_ID_CASES \ @@ -145,6 +146,8 @@ #define SHF_IA_64_NORECOV 0x2000 /* section contains code that uses speculative instructions without * recovery code */ +/* XXX fix these for ld.elf_so */ +#define R_IA64_COPY (0) +#define R_TYPE(name)__CONCAT(R_IA64_,name) - - +#endif /* _IA64_ELF_MACHDEP_H */
CVS commit: src/sys/arch/ia64/include
Module Name:src Committed By: scole Date: Fri Aug 5 16:56:44 UTC 2016 Modified Files: src/sys/arch/ia64/include: Makefile Removed Files: src/sys/arch/ia64/include: acpi_func.h Log Message: PR port-ia64/51261 Remove local acpi_func.h as common version exists To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/include/Makefile cvs rdiff -u -r1.4 -r0 src/sys/arch/ia64/include/acpi_func.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/ia64/include/Makefile diff -u src/sys/arch/ia64/include/Makefile:1.6 src/sys/arch/ia64/include/Makefile:1.7 --- src/sys/arch/ia64/include/Makefile:1.6 Fri Jun 20 12:41:34 2014 +++ src/sys/arch/ia64/include/Makefile Fri Aug 5 16:56:43 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2014/06/20 12:41:34 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2016/08/05 16:56:43 scole Exp $ INCSDIR= /usr/include/ia64 -INCS= _regset.h acpi_func.h acpi_machdep.h ansi.h \ +INCS= _regset.h acpi_machdep.h ansi.h \ aout_machdep.h asm.h atomic.h bootinfo.h bswap.h cdefs.h \ cpu.h cpufunc.h dig64.h disklabel.h efi.h \ elf_machdep.h endian.h endian_machdep.h float.h fpu.h frame.h \
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:53:36 UTC 2016 Modified Files: src/sys/arch/ia64/ia64: support.S Log Message: PR port-ia64/51261 Use common/lib/libc/arch/ia64/string/bzero.S and other string functions To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/support.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/ia64/ia64/support.S diff -u src/sys/arch/ia64/ia64/support.S:1.6 src/sys/arch/ia64/ia64/support.S:1.7 --- src/sys/arch/ia64/ia64/support.S:1.6 Sun Aug 8 18:18:58 2010 +++ src/sys/arch/ia64/ia64/support.S Fri Aug 5 16:53:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: support.S,v 1.6 2010/08/08 18:18:58 chs Exp $ */ +/* $NetBSD: support.S,v 1.7 2016/08/05 16:53:36 scole Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -769,84 +769,10 @@ ENTRY(copyoutstr, 4) st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp // ret0 left over from copystr END(copyoutstr) /* - * Not the fastest bcopy in the world. - */ -ENTRY(bcopy, 3) - mov ret0=r0// return zero for copy{in,out} - ;; - cmp.le p6,p0=in2,r0 // bail if len <= 0 -(p6) br.ret.spnt.few rp - - sub r14=in1,in0 ;; // check for overlap - cmp.ltu p6,p0=r14,in2 // dst-src < len -(p6) br.cond.spnt.few 5f - - extr.u r14=in0,0,3 // src & 7 - extr.u r15=in1,0,3 ;; // dst & 7 - cmp.eq p6,p0=r14,r15 // different alignment? -(p6) br.cond.spnt.few 2f // branch if same alignment - -1: ld1 r14=[in0],1 ;; // copy bytewise - st1 [in1]=r14,1 - add in2=-1,in2 ;; // len-- - cmp.ne p6,p0=r0,in2 -(p6) br.cond.dptk.few 1b // loop - br.ret.sptk.few rp // done - -2: cmp.eq p6,p0=r14,r0 // aligned? -(p6) br.cond.sptk.few 4f - -3: ld1 r14=[in0],1 ;; // copy bytewise - st1 [in1]=r14,1 - extr.u r15=in0,0,3 // src & 7 - add in2=-1,in2 ;; // len-- - cmp.eq p6,p0=r0,in2 // done? - cmp.eq p7,p0=r0,r15 ;; // aligned now? -(p6) br.ret.spnt.few rp // return if done -(p7) br.cond.spnt.few 4f // go to main copy - br.cond.sptk.few 3b // more bytes to copy - - // At this point, in2 is non-zero - -4: mov r14=8 ;; - cmp.ltu p6,p0=in2,r14 ;; // len < 8? -(p6) br.cond.spnt.few 1b // byte copy the end - ld8 r15=[in0],8 ;; // copy word - st8 [in1]=r15,8 - add in2=-8,in2 ;; // len -= 8 - cmp.ne p6,p0=r0,in2 // done? -(p6) br.cond.spnt.few 4b // again - - br.ret.sptk.few rp // return - - // Don't bother optimising overlap case - -5: add in0=in0,in2 - add in1=in1,in2 ;; - add in0=-1,in0 - add in1=-1,in1 ;; - -6: ld1 r14=[in0],-1 ;; - st1 [in1]=r14,-1 - add in2=-1,in2 ;; - cmp.ne p6,p0=r0,in2 -(p6) br.cond.spnt.few 6b - - br.ret.sptk.few rp -END(bcopy) - -ENTRY(memcpy,3) - mov r14=in0 ;; - mov in0=in1 ;; - mov in1=r14 - br.cond.sptk.few bcopy -END(memcpy) - -/* * int kcopy(const void *from, void *to, size_t len); * Copy len bytes, abort on fault. */ @@ -876,12 +802,13 @@ ENTRY(kcopy, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// XXX netbsd kcopy same as freebsd? ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(kcopy) ENTRY(copyin, 3) @@ -914,12 +841,13 @@ ENTRY(copyin, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// return zero for copy{in,out} ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(copyin) ENTRY(copyout, 3) @@ -952,12 +880,13 @@ ENTRY(copyout, 3) mov out0=in0 mov out1=in1 mov out2=in2 + mov ret0=r0// return zero for copy{in,out} ;; br.call.sptk.few rp=bcopy // do the copy. st8 [loc2]=r0 // kill the fault handler. mov ar.pfs=loc0 // restore ar.pfs mov rp=loc1// restore ra. - br.ret.sptk.few rp // ret0 left over from bcopy + br.ret.sptk.few rp END(copyout) ENTRY(copyerr, 0)
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:51:56 UTC 2016 Added Files: src/sys/arch/ia64/ia64: procfs_machdep.c Log Message: PR port-ia64/51261 Add procfs_getcpuinfstr() To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/ia64/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/ia64/ia64/procfs_machdep.c diff -u /dev/null src/sys/arch/ia64/ia64/procfs_machdep.c:1.1 --- /dev/null Fri Aug 5 16:51:56 2016 +++ src/sys/arch/ia64/ia64/procfs_machdep.c Fri Aug 5 16:51:56 2016 @@ -0,0 +1,49 @@ +/* $NetBSD: procfs_machdep.c,v 1.1 2016/08/05 16:51:56 scole Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.1 2016/08/05 16:51:56 scole Exp $"); + +#include +#include +#include +#include +#include + + +/* + * Linux-style /proc/cpuinfo. + * Only used when procfs is mounted with -o linux. + */ +int +procfs_getcpuinfstr(char *buf, size_t *len) +{ + *len = 0; + + return 0; +}
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:50:07 UTC 2016 Added Files: src/sys/arch/ia64/ia64: core_machdep.c Log Message: PR port-ia64/51261 Add cpu_coredump() stub To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/ia64/core_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/ia64/ia64/core_machdep.c diff -u /dev/null src/sys/arch/ia64/ia64/core_machdep.c:1.1 --- /dev/null Fri Aug 5 16:50:07 2016 +++ src/sys/arch/ia64/ia64/core_machdep.c Fri Aug 5 16:50:07 2016 @@ -0,0 +1,59 @@ +/* $NetBSD: core_machdep.c,v 1.1 2016/08/05 16:50:07 scole Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include /* RCS ID & Copyright macro defns */ +__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.1 2016/08/05 16:50:07 scole Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +/* + * Dump the machine specific header information at the start of a core dump. + */ +int +cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie, +struct core *chdr) +{ + /* XXX implement, pause in ski */ + __asm __volatile("break.i 0"); + + return -1; +}
CVS commit: src/sys/arch/ia64/conf
Module Name:src Committed By: scole Date: Fri Aug 5 16:48:04 UTC 2016 Modified Files: src/sys/arch/ia64/conf: files.ia64 Log Message: PR port-ia64/51261 Add pcibus so kernels will compile. Required for acpi now To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/conf/files.ia64 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/ia64/conf/files.ia64 diff -u src/sys/arch/ia64/conf/files.ia64:1.7 src/sys/arch/ia64/conf/files.ia64:1.8 --- src/sys/arch/ia64/conf/files.ia64:1.7 Sat Oct 1 15:59:27 2011 +++ src/sys/arch/ia64/conf/files.ia64 Fri Aug 5 16:48:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.ia64,v 1.7 2011/10/01 15:59:27 chs Exp $ +# $NetBSD: files.ia64,v 1.8 2016/08/05 16:48:04 scole Exp $ # # new style config file for ia64 architecture # @@ -25,6 +25,8 @@ file arch/ia64/ia64/interrupt.c file arch/ia64/ia64/vm_machdep.c file arch/ia64/ia64/efi.c file arch/ia64/ia64/sal.c +#file arch/ia64/ia64/physmem.c +#file arch/ia64/ia64/unaligned.c file arch/ia64/disasm/disasm_decode.c ddb file arch/ia64/disasm/disasm_extract.c ddb @@ -36,6 +38,7 @@ file arch/ia64/ia64/db_trace.c ddb file arch/ia64/ia64/exception.S file arch/ia64/ia64/context.S +#file arch/ia64/ia64/physical.S file arch/ia64/ia64/syscall_stubs.S file arch/ia64/ia64/support.S file arch/ia64/ia64/setjmp.S @@ -55,7 +58,7 @@ file arch/ia64/pci/pci_machdep.c acpi | # # System bus types # -device mainbus: cpubus, acpibus +device mainbus: cpubus, acpibus, pcibus attach mainbus at root file arch/ia64/ia64/mainbus.c mainbus @@ -86,6 +89,8 @@ device fdc {drive = -1} # XXX: Oops # PCI fixup options # XX: Oops, required by acpi.c defflag opt_pcifixup.h ACPI_PCI_FIXUP +# PCI Root Bridge +#device pchb: pcibus include "dev/acpi/files.acpi" include "arch/ia64/conf/majors.ia64"
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:46:56 UTC 2016 Modified Files: src/sys/arch/ia64/ia64: context.S Log Message: PR port-ia64/51261 Import later version from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/context.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/ia64/ia64/context.S diff -u src/sys/arch/ia64/ia64/context.S:1.5 src/sys/arch/ia64/ia64/context.S:1.6 --- src/sys/arch/ia64/ia64/context.S:1.5 Sun Mar 24 06:06:19 2013 +++ src/sys/arch/ia64/ia64/context.S Fri Aug 5 16:46:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: context.S,v 1.5 2013/03/24 06:06:19 kiyohara Exp $ */ +/* $NetBSD: context.S,v 1.6 2016/08/05 16:46:56 scole Exp $ */ /* * Copyright (c) 2003 Marcel Moolenaar @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/context.S,v 1.3 2003/07/02 12:57:07 ru Exp $ + * $FreeBSD: releng/10.1/sys/ia64/ia64/context.S 204184 2010-02-22 01:23:41Z marcel $ */ #include @@ -64,7 +64,7 @@ ENTRY(restorectx, 1) { .mmi loadrs ld8 r21=[r30],16 // rnat - mov pr=r18,0x1003e // Preserved pr (p1-p5, p16-p63) + mov pr=r18,0x1fffe ;; } { .mmi @@ -88,18 +88,18 @@ ENTRY(restorectx, 1) { .mmi ld8.fill r6=[r14],16 // r6 ld8.fill r7=[r15],16 // r7 - nop 1 + nop 0 ;; } { .mmi mov ar.unat=r16 mov ar.rsc=3 - nop 2 + nop 0 } { .mmi ld8 r17=[r14],16 // b1 ld8 r18=[r15],16 // b2 - nop 3 + nop 0 ;; } { .mmi @@ -288,7 +288,7 @@ ENTRY(swapctx, 2) (p15) br.ret.sptk rp ;; } -{ .mfb +{ .mib mov r32=r33 nop 0 br.sptk restorectx @@ -340,10 +340,10 @@ ENTRY(save_callee_saved, 1) mov r17=b5 ;; } -{ .mfi +{ .mii st8 [r14]=r17,16 // b5 - nop 0 mov r16=ar.lc + nop 0 ;; } { .mmb @@ -365,13 +365,13 @@ ENTRY(restore_callee_saved, 1) add r31=-8,r32 ;; } -{ .mmb +{ .mmi ld8.fill r4=[r31],16 // r4 ld8.fill r5=[r32],16 // r5 nop 0 ;; } -{ .mmb +{ .mmi ld8.fill r6=[r31],16 // r6 ld8.fill r7=[r32],16 // r7 nop 0 @@ -657,7 +657,7 @@ ENTRY(restore_high_fp, 1) ldf.fill f32=[r32],32 ;; ldf.fill f33=[r31],32 - ldf.fill f34=[r32],32 + ldf.fill f34=[r32],32 ;; ldf.fill f35=[r31],32 ldf.fill f36=[r32],32
CVS commit: src/sys/arch/ia64/disasm
Module Name:src Committed By: scole Date: Fri Aug 5 16:45:50 UTC 2016 Modified Files: src/sys/arch/ia64/disasm: disasm.h disasm_decode.c disasm_extract.c disasm_format.c disasm_int.h Log Message: PR port-ia64/51261 Import later version from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/disasm/disasm.h \ src/sys/arch/ia64/disasm/disasm_extract.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/disasm/disasm_decode.c \ src/sys/arch/ia64/disasm/disasm_int.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/disasm/disasm_format.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/ia64/disasm/disasm.h diff -u src/sys/arch/ia64/disasm/disasm.h:1.2 src/sys/arch/ia64/disasm/disasm.h:1.3 --- src/sys/arch/ia64/disasm/disasm.h:1.2 Thu Apr 3 17:02:34 2014 +++ src/sys/arch/ia64/disasm/disasm.h Fri Aug 5 16:45:50 2016 @@ -1,7 +1,7 @@ -/* $NetBSD: disasm.h,v 1.2 2014/04/03 17:02:34 martin Exp $ */ +/* $NetBSD: disasm.h,v 1.3 2016/08/05 16:45:50 scole Exp $ */ /*- - * Copyright (c) 2000-2003 Marcel Moolenaar + * Copyright (c) 2000-2006 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/disasm/disasm.h,v 1.3 2005/01/06 22:18:22 imp Exp $ + * $FreeBSD: releng/10.1/sys/ia64/disasm/disasm.h 172689 2007-10-16 02:49:40Z marcel $ */ #ifndef _DISASM_H_ @@ -112,6 +112,7 @@ enum asm_cmpltr_class { ASM_CC_RW, ASM_CC_TREL, ASM_CC_TRUNC, ASM_CC_UNIT, ASM_CC_UNPACK, ASM_CC_UNS, + ASM_CC_VMSW, ASM_CC_XMA }; @@ -205,15 +206,16 @@ enum asm_fmt { ASM_FMT_F1, ASM_FMT_F2, ASM_FMT_F3, ASM_FMT_F4, ASM_FMT_F5, ASM_FMT_F6, ASM_FMT_F7, ASM_FMT_F8, ASM_FMT_F9, ASM_FMT_F10, ASM_FMT_F11, ASM_FMT_F12, - ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15, + ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15, ASM_FMT_F16, ASM_FMT_I = 0x0400, ASM_FMT_I1, ASM_FMT_I2, ASM_FMT_I3, ASM_FMT_I4, ASM_FMT_I5, ASM_FMT_I6, ASM_FMT_I7, ASM_FMT_I8, ASM_FMT_I9, ASM_FMT_I10, ASM_FMT_I11, ASM_FMT_I12, ASM_FMT_I13, ASM_FMT_I14, ASM_FMT_I15, ASM_FMT_I16, - ASM_FMT_I17, ASM_FMT_I19, ASM_FMT_I20, ASM_FMT_I21, - ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24, ASM_FMT_I25, - ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28, ASM_FMT_I29, + ASM_FMT_I17, ASM_FMT_I18, ASM_FMT_I19, ASM_FMT_I20, + ASM_FMT_I21, ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24, + ASM_FMT_I25, ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28, + ASM_FMT_I29, ASM_FMT_I30, ASM_FMT_M = 0x0500, ASM_FMT_M1, ASM_FMT_M2, ASM_FMT_M3, ASM_FMT_M4, ASM_FMT_M5, ASM_FMT_M6, ASM_FMT_M7, ASM_FMT_M8, @@ -226,9 +228,10 @@ enum asm_fmt { ASM_FMT_M33, ASM_FMT_M34, ASM_FMT_M35, ASM_FMT_M36, ASM_FMT_M37, ASM_FMT_M38, ASM_FMT_M39, ASM_FMT_M40, ASM_FMT_M41, ASM_FMT_M42, ASM_FMT_M43, ASM_FMT_M44, - ASM_FMT_M45, ASM_FMT_M46, + ASM_FMT_M45, ASM_FMT_M46, ASM_FMT_M47, ASM_FMT_M48, ASM_FMT_X = 0x0600, - ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4 + ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4, + ASM_FMT_X5 }; /* Instruction opcodes. */ @@ -252,6 +255,7 @@ enum asm_op { ASM_OP_FPRSQRTA, ASM_OP_FRCPA, ASM_OP_FRSQRTA, ASM_OP_FSELECT, ASM_OP_FSETC, ASM_OP_FSWAP, ASM_OP_FSXT, ASM_OP_FWB, ASM_OP_FXOR, ASM_OP_GETF, + ASM_OP_HINT, ASM_OP_INVALA, ASM_OP_ITC, ASM_OP_ITR, ASM_OP_LD1, ASM_OP_LD16, ASM_OP_LD2, ASM_OP_LD4, ASM_OP_LD8, ASM_OP_LDF, ASM_OP_LDF8, ASM_OP_LDFD, ASM_OP_LDFE, ASM_OP_LDFP8, @@ -273,9 +277,10 @@ enum asm_op { ASM_OP_ST2, ASM_OP_ST4, ASM_OP_ST8, ASM_OP_STF, ASM_OP_STF8, ASM_OP_STFD, ASM_OP_STFE, ASM_OP_STFS, ASM_OP_SUB, ASM_OP_SUM, ASM_OP_SXT1, ASM_OP_SXT2, ASM_OP_SXT4, ASM_OP_SYNC, - ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_THASH, ASM_OP_TNAT, ASM_OP_TPA, - ASM_OP_TTAG, + ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_TF, ASM_OP_THASH, ASM_OP_TNAT, + ASM_OP_TPA, ASM_OP_TTAG, ASM_OP_UNPACK1, ASM_OP_UNPACK2, ASM_OP_UNPACK4, + ASM_OP_VMSW, ASM_OP_XCHG1, ASM_OP_XCHG2, ASM_OP_XCHG4, ASM_OP_XCHG8, ASM_OP_XMA, ASM_OP_XOR, ASM_OP_ZXT1, ASM_OP_ZXT2, ASM_OP_ZXT4, Index: src/sys/arch/ia64/disasm/disasm_extract.c diff -u src/sys/arch/ia64/disasm/disasm_extract.c:1.2 src/sys/arch/ia64/disasm/disasm_extract.c:1.3 --- src/sys/arch/ia64/disasm/disasm_extract.c:1.2 Sun Jul 17 20:54:42 2011 +++ src/sys/arch/ia64/disasm/disasm_extract.c Fri Aug 5 16:45:50 2016 @@ -1,7 +1,7 @@ -/* $NetBSD: disasm_extract.c,v 1.2 2011/07/17 20:54:42 joerg Exp $ */ +/* $NetBSD: disasm_extract.c,v 1.3 2016/08/05 16:45:50 scole Exp $ */ /*- - * Copyright (c) 2000-2003 Marcel Moolenaar + * Copyright (c) 2000-2006 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ #include -/* __FBSDID("$FreeBSD:
CVS commit: src/share/mk
Module Name:src Committed By: scole Date: Fri Aug 5 16:44:31 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: PR port-ia64/51261 For ia64, don't build elf32, disable MKDYNAMICROOT and MKRUMP. ld.elf_so and rump are not implemented yet To generate a diff of this commit: cvs rdiff -u -r1.938 -r1.939 src/share/mk/bsd.own.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.own.mk diff -u src/share/mk/bsd.own.mk:1.938 src/share/mk/bsd.own.mk:1.939 --- src/share/mk/bsd.own.mk:1.938 Thu Jul 7 07:52:24 2016 +++ src/share/mk/bsd.own.mk Fri Aug 5 16:44:31 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.938 2016/07/07 07:52:24 martin Exp $ +# $NetBSD: bsd.own.mk,v 1.939 2016/08/05 16:44:31 scole Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -636,7 +636,7 @@ MACHINES.x86_64= amd64 # for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH # OBJECT_FMTS= -.if ${MACHINE_ARCH} != "alpha" +.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64" OBJECT_FMTS+= elf32 .endif .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != "" @@ -703,6 +703,11 @@ check_RELEASEDIR: .PHONY .NOTMAIN # MKDYNAMICROOT?= yes +# For ia64, ld.elf_so not yet implemented +.if ${MACHINE_ARCH} == "ia64" +MKDYNAMICROOT= no +.endif + # # Where the system object and source trees are kept; can be configurable # by the user in case they want them in ~/foosrc and ~/fooobj (for example). @@ -1126,6 +1131,11 @@ MKGCCCMDS?= ${MKGCC} MKKMOD= no .endif +# Rump doesn't work yet on ia64 +.if ${MACHINE} == "ia64" +MKRUMP= no +.endif + # # MK* options which default to "no". Note that MKZFS has a different # default for some platforms, see above.
CVS commit: src/lib/libc/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:40:47 UTC 2016 Modified Files: src/lib/libc/arch/ia64/gen: Makefile.inc src/lib/libc/arch/ia64/sys: __clone.S ptrace.S Added Files: src/lib/libc/arch/ia64/gen: fpgetsticky.c fpsetsticky.c getcontext.S makecontext.c swapcontext.S Log Message: PR port-ia64/51261 Add stubs for ia64 build To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/ia64/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/ia64/gen/fpgetsticky.c \ src/lib/libc/arch/ia64/gen/fpsetsticky.c \ src/lib/libc/arch/ia64/gen/getcontext.S \ src/lib/libc/arch/ia64/gen/makecontext.c \ src/lib/libc/arch/ia64/gen/swapcontext.S cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/ia64/sys/__clone.S \ src/lib/libc/arch/ia64/sys/ptrace.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/ia64/gen/Makefile.inc diff -u src/lib/libc/arch/ia64/gen/Makefile.inc:1.7 src/lib/libc/arch/ia64/gen/Makefile.inc:1.8 --- src/lib/libc/arch/ia64/gen/Makefile.inc:1.7 Thu Jun 30 09:14:30 2016 +++ src/lib/libc/arch/ia64/gen/Makefile.inc Fri Aug 5 16:40:47 2016 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.7 2016/06/30 09:14:30 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.8 2016/08/05 16:40:47 scole Exp $ SRCS+= _lwp.c SRCS+= bswap16.c bswap32.c bswap64.c SRCS+= setjmp.S _setjmp.S sigsetjmp.S SRCS+= flt_rounds.c fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c +SRCS+= fpgetsticky.c fpsetsticky.c +SRCS+= getcontext.S makecontext.c swapcontext.S + # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c SRCS+= fpclassifyf_ieee754.c fpclassifyd_ieee754.c Index: src/lib/libc/arch/ia64/sys/__clone.S diff -u src/lib/libc/arch/ia64/sys/__clone.S:1.1 src/lib/libc/arch/ia64/sys/__clone.S:1.2 --- src/lib/libc/arch/ia64/sys/__clone.S:1.1 Sun Sep 10 21:22:34 2006 +++ src/lib/libc/arch/ia64/sys/__clone.S Fri Aug 5 16:40:47 2016 @@ -1,3 +1,42 @@ -/* $NetBSD: __clone.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */ +/* $NetBSD: __clone.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */ + +/*- + * Copyright (c) 2006,2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* XXX: Stub */ +#include + +#include "SYS.h" + +#ifdef WEAK_ALIAS +WEAK_ALIAS(clone, __clone) +#endif + +ENTRY(__clone,4) + /* XXX implement, break in ski*/ + break.i 0 -/* XXX: Stub */ \ No newline at end of file +END(__clone) Index: src/lib/libc/arch/ia64/sys/ptrace.S diff -u src/lib/libc/arch/ia64/sys/ptrace.S:1.1 src/lib/libc/arch/ia64/sys/ptrace.S:1.2 --- src/lib/libc/arch/ia64/sys/ptrace.S:1.1 Sun Sep 10 21:22:34 2006 +++ src/lib/libc/arch/ia64/sys/ptrace.S Fri Aug 5 16:40:47 2016 @@ -1,3 +1,36 @@ -/* $NetBSD: ptrace.S,v 1.1 2006/09/10 21:22:34 cherry Exp $ */ +/* $NetBSD: ptrace.S,v 1.2 2016/08/05 16:40:47 scole Exp $ */ -/* XXX: Stub */ \ No newline at end of file +/*- + * Copyright (c) 2006,2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS
CVS commit: src/external/gpl3
Module Name:src Committed By: scole Date: Fri Aug 5 16:25:19 UTC 2016 Modified Files: src/external/gpl3/gcc.old/dist/gcc: tree-ssa-ccp.c src/external/gpl3/gcc/dist/gcc: tree-ssa-ccp.c Log Message: PR port-ia64/51261 Change JEMALLOC_TINY_MIN_2POW for ia64 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.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/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c diff -u src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.3 src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.4 --- src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c:1.3 Wed Sep 23 03:39:11 2015 +++ src/external/gpl3/gcc.old/dist/gcc/tree-ssa-ccp.c Fri Aug 5 16:25:18 2016 @@ -2541,6 +2541,7 @@ struct gimple_opt_pass pass_fold_builtin #if defined(__alpha__) || defined(__amd64__) || defined(__sparc64__) \ || (defined(__arm__) && defined(__ARM_EABI)) || defined(__powerpc__) \ + || defined(__ia64__) \ || ((defined(__mips__) || defined(__riscv__)) && defined(_LP64)) #define JEMALLOC_TINY_MIN_2POW 3 #endif Index: src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c diff -u src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.6 src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.7 --- src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c:1.6 Fri Mar 18 10:07:52 2016 +++ src/external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c Fri Aug 5 16:25:19 2016 @@ -2852,7 +2852,7 @@ make_pass_fold_builtins (gcc::context *c #if defined(__alpha__) || defined(__amd64__) || defined(__sparc64__) \ || (defined(__arm__) && defined(__ARM_EABI__)) \ - || defined(__powerpc__) \ + || defined(__ia64__) || defined(__powerpc__) \ || ((defined(__mips__) || defined(__riscv__)) && defined(_LP64)) #define JEMALLOC_TINY_MIN_2POW 3 #endif
CVS commit: src/etc/etc.ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:22:08 UTC 2016 Added Files: src/etc/etc.ia64: MAKEDEV.conf Makefile.inc rc.conf.append ttys Log Message: PR port-ia64/51261 Stubs for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/etc/etc.ia64/MAKEDEV.conf \ src/etc/etc.ia64/Makefile.inc src/etc/etc.ia64/rc.conf.append \ src/etc/etc.ia64/ttys Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/etc/etc.ia64/MAKEDEV.conf diff -u /dev/null src/etc/etc.ia64/MAKEDEV.conf:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/MAKEDEV.conf Fri Aug 5 16:22:08 2016 @@ -0,0 +1,48 @@ +# $NetBSD: MAKEDEV.conf,v 1.1 2016/08/05 16:22:08 scole Exp $ + +# As of 2005-03-15, the "init" case must not create more than 1024 entries. +all_md) + makedev std wscons wt0 fd0 fd1 + makedev wd0 wd1 wd2 wd3 wd4 wd5 wd6 wd7 + makedev sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 + makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7 + makedev tty0 tty1 tty2 tty3 + makedev st0 st1 ch0 cd0 cd1 mcd0 vnd0 + makedev bpf + makedev ccd0 md0 random + makedev cgd0 cgd1 + makedev amr0 iop0 mfi0 mlx0 mly0 dpti0 dpt0 twe0 icp0 + makedev ed0 ed1 + makedev raid0 raid1 raid2 raid3 + makedev ld0 ld1 ld2 ld3 + makedev xbd0 xbd1 xbd2 xbd3 xen + makedev usbs + makedev ipty + makedev local + makedev lpa0 lpa1 lpa2 + makedev lpt0 lpt1 lpt2 + makedev ss0 uk0 uk1 + makedev speaker joy0 joy1 + makedev apm satlink0 + makedev cmos + makedev audio + makedev radio + makedev isdns + makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 + makedev scsibus0 scsibus1 scsibus2 scsibus3 + makedev ses0 ses1 ses2 ses3 + makedev sysmon + makedev bktr + makedev ttyCZ0 ttyCY0 + makedev agp0 + makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7 + makedev pci8 pci9 pci10 pci11 + makedev altq + makedev cir0 cir1 irframe0 irframe1 + makedev dmoverio + makedev kttcp + makedev nsmb + makedev io + makedev bio + makedev cfs + ;; Index: src/etc/etc.ia64/Makefile.inc diff -u /dev/null src/etc/etc.ia64/Makefile.inc:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/Makefile.inc Fri Aug 5 16:22:08 2016 @@ -0,0 +1,27 @@ +# $NetBSD: Makefile.inc,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# etc.ia64/Makefile.inc -- ia64-specific etc Makefile targets +# + +# If you change the list of distributed kernels, don't forget +# to update the release documentation in distrib/notes/common/contents + +# XXX fix all this + +KERNEL_SETS= GENERIC +KERNEL_SETS+= GENERIC.SKI + +#BUILD_KERNELS+= INSTALL + +#INSTALLATION_DIRS+= installation/cdrom +#INSTALLATION_DIRS+= installation/diskimage +#INSTALLATION_DIRS+= installation/instkernel +#INSTALLATION_DIRS+= installation/netboot + +#snap_md_post: +# cd ${KERNSRCDIR}/arch/i386/stand/dosboot && ${MAKE} release +# cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release +# cd ${KERNSRCDIR}/arch/i386/stand/misc && ${MAKE} release +# ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso' +# ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs' +# cd ${KERNSRCDIR}/arch/alpha/stand/netboot && ${MAKE} release Index: src/etc/etc.ia64/rc.conf.append diff -u /dev/null src/etc/etc.ia64/rc.conf.append:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/rc.conf.append Fri Aug 5 16:22:08 2016 @@ -0,0 +1,15 @@ +# $NetBSD: rc.conf.append,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# Arch-specific rc.conf(5) configuration. + +# powerd(8) is required under Xen to manage save/restore events. +# +if /sbin/sysctl -q machdep.xen; then + powerd=YES +fi + +# powerd(8) is recommended if ACPI is enabled to handle PM events. +# +if /sbin/sysctl -q hw.acpi.root; then + powerd=YES +fi Index: src/etc/etc.ia64/ttys diff -u /dev/null src/etc/etc.ia64/ttys:1.1 --- /dev/null Fri Aug 5 16:22:08 2016 +++ src/etc/etc.ia64/ttys Fri Aug 5 16:22:08 2016 @@ -0,0 +1,23 @@ +# +# $NetBSD: ttys,v 1.1 2016/08/05 16:22:08 scole Exp $ +# +# name gettytype status comments + +# In normal operation, getty on 'console' pseudo-device is disabled, and is +# enabled for the correct 'real' device (e.g. one of the serial ports). + +# console pseudo-device +console "/usr/libexec/getty std.9600" vt100 on secure +constty "/usr/libexec/getty std.9600" vt100 off secure + +# Workstation console (framebuffer) ttys +ttyE0 "/usr/libexec/getty std.9600" wsvt25 off secure +ttyE1 "/usr/libexec/getty std.9600" wsvt25 off secure + +# DEC 3000 Z8530 ("scc") serial ports +ttyB0 "/usr/libexec/getty std.9600" unknown off secure +ttyB1 "/usr/libexec/getty std.9600" unknown off secure + +# AlphaStation NS16550 ("com") serial ports +ttyC0 "/usr/libexec/getty std.9600" unknown off secure +ttyC1 "/usr/libexec/getty std.9600" unknown off secure
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: scole Date: Fri Aug 5 16:21:09 UTC 2016 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/modules: md.ia64 Added Files: src/distrib/sets/lists/base: md.ia64 src/distrib/sets/lists/comp: md.ia64 Log Message: PR port-ia64/51261 Changes for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base/md.ia64 cvs rdiff -u -r1.779 -r1.780 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/comp/md.ia64 cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/modules/md.ia64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.779 src/distrib/sets/lists/base/shl.mi:1.780 --- src/distrib/sets/lists/base/shl.mi:1.779 Tue Aug 2 14:54:03 2016 +++ src/distrib/sets/lists/base/shl.mi Fri Aug 5 16:21:09 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.779 2016/08/02 14:54:03 jakllsch Exp $ +# $NetBSD: shl.mi,v 1.780 2016/08/05 16:21:09 scole Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -88,15 +88,15 @@ ./lib/libz.so base-sys-shlib dynamicroot ./lib/libz.so.1 base-sys-shlib dynamicroot ./lib/libz.so.1.0base-sys-shlib dynamicroot -./lib/npf/ext_log.sobase-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_log.so.0base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_log.so.0.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_normalize.so.0.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so.0 base-npf-shlib dynamicroot,compatfile,npf -./lib/npf/ext_rndblock.so.0.0 base-npf-shlib dynamicroot,compatfile,npf +./lib/npf/ext_log.sobase-npf-shlib compatfile,npf +./lib/npf/ext_log.so.0base-npf-shlib compatfile,npf +./lib/npf/ext_log.so.0.0 base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so.0 base-npf-shlib compatfile,npf +./lib/npf/ext_normalize.so.0.0 base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so.0 base-npf-shlib compatfile,npf +./lib/npf/ext_rndblock.so.0.0 base-npf-shlib compatfile,npf ./libexec/ld.elf_sobase-sys-shlib dynamicroot ./usr/lib/i18n/libBIG5.so base-i18n-shlib compatfile ./usr/lib/i18n/libBIG5.so.5 base-i18n-shlib compatfile @@ -870,4 +870,4 @@ ./usr/lib/security/pam_skey.so.4 base-sys-shlib compatfile,skey,pam ./usr/lib/security/pam_ssh.so.4 base-sys-shlib compatfile,crypto,pam ./usr/lib/security/pam_unix.so.4 base-sys-shlib compatfile,pam -./usr/libexec/ld.elf_sobase-sys-shlib +./usr/libexec/ld.elf_sobase-sys-shlib dynamicroot Index: src/distrib/sets/lists/modules/md.ia64 diff -u src/distrib/sets/lists/modules/md.ia64:1.3 src/distrib/sets/lists/modules/md.ia64:1.4 --- src/distrib/sets/lists/modules/md.ia64:1.3 Sun Aug 10 11:51:40 2014 +++ src/distrib/sets/lists/modules/md.ia64 Fri Aug 5 16:21:09 2016 @@ -1,3 +1,5 @@ -# $NetBSD: md.ia64,v 1.3 2014/08/10 11:51:40 bad Exp $ +# $NetBSD: md.ia64,v 1.4 2016/08/05 16:21:09 scole Exp $ +./@MODULEDIR@/exec_elf64 base-kernel-modules kmod +./@MODULEDIR@/exec_elf64/exec_elf64.kmod base-kernel-modules kmod ./@MODULEDIR@/acpiverbose base-kernel-modules kmod ./@MODULEDIR@/acpiverbose/acpiverbose.kmod base-kernel-modules kmod Added files: Index: src/distrib/sets/lists/base/md.ia64 diff -u /dev/null src/distrib/sets/lists/base/md.ia64:1.1 --- /dev/null Fri Aug 5 16:21:09 2016 +++ src/distrib/sets/lists/base/md.ia64 Fri Aug 5 16:21:09 2016 @@ -0,0 +1,9 @@ +# $NetBSD: md.ia64,v 1.1 2016/08/05 16:21:09 scole Exp $ +# +# XXX add skiload for now +# +# XXX loader.sym probaby not necessary +# +./usr/mdec/loader.efi base-sysutil-bin +./usr/mdec/loader.sym base-sysutil-bin +./usr/mdec/skiload base-sysutil-bin Index: src/distrib/sets/lists/comp/md.ia64 diff -u /dev/null src/distrib/sets/lists/comp/md.ia64:1.1 --- /dev/null Fri Aug 5 16:21:09 2016 +++ src/distrib/sets/lists/comp/md.ia64 Fri Aug 5 16:21:09 2016 @@ -0,0 +1,62 @@ +# $NetBSD: md.ia64,v 1.1 2016/08/05 16:21:09 scole Exp $ +./usr/include/gcc-4.8/ia64intrin.h comp-c-include obsolete +./usr/include/gcc-4.8/tgmath.h comp-c-include obsolete +./usr/include/gcc-5/ia64intrin.h comp-c-include +./usr/include/gcc-5/tgmath.h comp-c-include +./usr/include/ia64 comp-c-include +./usr/include/ia64/_regset.h comp-c-include +./usr/include/ia64/acpi_machdep.h comp-c-include +./usr/include/ia64/ansi.h comp-c-include +./usr/include/ia64/aout_machdep.h
CVS commit: src/distrib/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 16:18:19 UTC 2016 Added Files: src/distrib/ia64: Makefile src/distrib/ia64/cdroms: Makefile src/distrib/ia64/cdroms/installcd: Makefile Log Message: PR port-ia64/51261 Add stubs for ia64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/ia64/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/ia64/cdroms/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/ia64/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/distrib/ia64/Makefile diff -u /dev/null src/distrib/ia64/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ + +.include +.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" + +.include + +# XXX add other SUBDIR + +SUBDIR= cdroms +#SUBDIR+= netboot ramdisk + +TARGETS+= release + +# XXX sort out loader.efi +#BOOTOBJ!= cd ${KERNSRCDIR}/arch/ia64/stand/ia64/efi && ${PRINTOBJDIR} +#EFIBOOTERS= ${BOOTOBJ}/loader.sym ${BOOTOBJ}/loader.efi + +#release: check_RELEASEDIR .WAIT ${EFIBOOTERS} +# ${RELEASE_INSTALL} ${EFIBOOTERS} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation + +iso_image: + ${MAKEDIRTARGET} cdroms iso_image + +.include Index: src/distrib/ia64/cdroms/Makefile diff -u /dev/null src/distrib/ia64/cdroms/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/cdroms/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ + +SUBDIR= installcd +TARGETS+= release iso_image + +.include Index: src/distrib/ia64/cdroms/installcd/Makefile diff -u /dev/null src/distrib/ia64/cdroms/installcd/Makefile:1.1 --- /dev/null Fri Aug 5 16:18:19 2016 +++ src/distrib/ia64/cdroms/installcd/Makefile Fri Aug 5 16:18:19 2016 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2016/08/05 16:18:19 scole Exp $ +CDBASE= ia64cd # gives ${CDBASE}.iso +#CDINSTKERNEL= ../../instkernel/instkernel +CDKERNELS= netbsd netbsd +CDRELEASE= true # include $RELEASEDIR/$MACHINE + +#make the CD bootable +image_md_post: + ${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE} + +.include "${.CURDIR}/../../../common/Makefile.bootcd" +
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Aug 5 15:39:09 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Fix register usage in the swap operation in tlb_update_addr. This should help LOONGSON and hpcmips To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.79 src/sys/arch/mips/mips/mipsX_subr.S:1.80 --- src/sys/arch/mips/mips/mipsX_subr.S:1.79 Fri Aug 5 15:35:32 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Fri Aug 5 15:39:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.79 2016/08/05 15:35:32 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.80 2016/08/05 15:39:09 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2164,7 +2164,7 @@ LEAF(MIPSX(tlb_update_addr)) nop move t3, a2# swap a2 and t0 move a2, t0# - move t0, a3# + move t0, t3# 4: _MTC0 t0, MIPS_COP_0_TLB_LO0 # init low reg0. _MTC0 a2, MIPS_COP_0_TLB_LO1 # init low reg1.
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Aug 5 15:35:32 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Fix a comment To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.78 src/sys/arch/mips/mips/mipsX_subr.S:1.79 --- src/sys/arch/mips/mips/mipsX_subr.S:1.78 Fri Aug 5 15:33:28 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Fri Aug 5 15:35:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.78 2016/08/05 15:33:28 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.79 2016/08/05 15:35:32 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2162,7 +2162,7 @@ LEAF(MIPSX(tlb_update_addr)) li v0, 0# assume failure bnez t1, 4f# Decide even odd nop - move t3, a2# swap a1 & t0 + move t3, a2# swap a2 and t0 move a2, t0# move t0, a3# 4:
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Aug 5 15:33:28 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Whitespace (comment alignment) To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.77 src/sys/arch/mips/mips/mipsX_subr.S:1.78 --- src/sys/arch/mips/mips/mipsX_subr.S:1.77 Fri Aug 5 10:39:49 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Fri Aug 5 15:33:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.77 2016/08/05 10:39:49 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.78 2016/08/05 15:33:28 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2088,14 +2088,14 @@ END(MIPSX(tlb_set_asid)) */ LEAF(MIPSX(tlb_update_addr)) #ifdef MIPSNNR2 - di ta0 # Disable interrupts + di ta0# Disable interrupts #else - mfc0 ta0, MIPS_COP_0_STATUS # Save the status register. - mtc0 zero, MIPS_COP_0_STATUS # Disable interrupts + mfc0 ta0, MIPS_COP_0_STATUS # Save the status register. + mtc0 zero, MIPS_COP_0_STATUS # Disable interrupts #endif COP0_SYNC #if (PGSHIFT & 1) == 0 - and t1, a0, MIPS3_PG_ODDPG # t1 = Even/Odd flag + and t1, a0, MIPS3_PG_ODDPG # t1 = Even/Odd flag #endif and a1, a1, MIPS3_PG_ASID #ifdef MIPSNNR2
CVS commit: src/common/lib/libc/arch/ia64/string
Module Name:src Committed By: scole Date: Fri Aug 5 15:06:02 UTC 2016 Added Files: src/common/lib/libc/arch/ia64/string: bcopy.S bzero.S ffs.S memcpy.S memmove.S Log Message: PR port-ia64/51261 Imported from FreeBSD with a minor change or two To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/ia64/string/bcopy.S \ src/common/lib/libc/arch/ia64/string/bzero.S \ src/common/lib/libc/arch/ia64/string/ffs.S \ src/common/lib/libc/arch/ia64/string/memcpy.S \ src/common/lib/libc/arch/ia64/string/memmove.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/common/lib/libc/arch/ia64/string/bcopy.S diff -u /dev/null src/common/lib/libc/arch/ia64/string/bcopy.S:1.1 --- /dev/null Fri Aug 5 15:06:02 2016 +++ src/common/lib/libc/arch/ia64/string/bcopy.S Fri Aug 5 15:06:02 2016 @@ -0,0 +1,102 @@ +/* $NetBSD: bcopy.S,v 1.1 2016/08/05 15:06:02 scole Exp $ */ + +/*- + * Copyright (c) 2000 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * __FBSDID("$FreeBSD: releng/10.1/lib/libc/ia64/string/bcopy.S 125669 2004-02-10 20:45:28Z cperciva $"); + */ + +#include + +/* + * void + * bcopy(const void *src, void *dst, size_t len); + */ + +/* + * Not the fastest bcopy in the world. + */ +ENTRY(bcopy, 3) + + cmp.le p6,p0=in2,r0 // bail if len <= 0 +(p6) br.ret.spnt.few rp + + sub r14=in1,in0 ;; // check for overlap + cmp.ltu p6,p0=r14,in2 // dst-src < len +(p6) br.cond.spnt.few 5f + + extr.u r14=in0,0,3 // src & 7 + extr.u r15=in1,0,3 ;; // dst & 7 + cmp.eq p6,p0=r14,r15 // different alignment? +(p6) br.cond.spnt.few 2f // branch if same alignment + +1: ld1 r14=[in0],1 ;; // copy bytewise + st1 [in1]=r14,1 + add in2=-1,in2 ;; // len-- + cmp.ne p6,p0=r0,in2 +(p6) br.cond.dptk.few 1b // loop + br.ret.sptk.few rp // done + +2: cmp.eq p6,p0=r14,r0 // aligned? +(p6) br.cond.sptk.few 4f + +3: ld1 r14=[in0],1 ;; // copy bytewise + st1 [in1]=r14,1 + extr.u r15=in0,0,3 // src & 7 + add in2=-1,in2 ;; // len-- + cmp.eq p6,p0=r0,in2 // done? + cmp.eq p7,p0=r0,r15 ;; // aligned now? +(p6) br.ret.spnt.few rp // return if done +(p7) br.cond.spnt.few 4f // go to main copy + br.cond.sptk.few 3b // more bytes to copy + + // At this point, in2 is non-zero + +4: mov r14=8 ;; + cmp.ltu p6,p0=in2,r14 ;; // len < 8? +(p6) br.cond.spnt.few 1b // byte copy the end + ld8 r15=[in0],8 ;; // copy word + st8 [in1]=r15,8 + add in2=-8,in2 ;; // len -= 8 + cmp.ne p6,p0=r0,in2 // done? +(p6) br.cond.spnt.few 4b // again + + br.ret.sptk.few rp // return + + // Don't bother optimising overlap case + +5: add in0=in0,in2 + add in1=in1,in2 ;; + add in0=-1,in0 + add in1=-1,in1 ;; + +6: ld1 r14=[in0],-1 ;; + st1 [in1]=r14,-1 + add in2=-1,in2 ;; + cmp.ne p6,p0=r0,in2 +(p6) br.cond.spnt.few 6b + + br.ret.sptk.few rp +END(bcopy) Index: src/common/lib/libc/arch/ia64/string/bzero.S diff -u /dev/null src/common/lib/libc/arch/ia64/string/bzero.S:1.1 --- /dev/null Fri Aug 5 15:06:02 2016 +++ src/common/lib/libc/arch/ia64/string/bzero.S Fri Aug 5 15:06:02 2016 @@ -0,0 +1,88 @@ +/* $NetBSD: bzero.S,v 1.1 2016/08/05 15:06:02 scole Exp $ */ + +/*- + * Copyright (c) 2000 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *
CVS commit: src/tests/lib/libc/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 15:02:29 UTC 2016 Modified Files: src/tests/lib/libc/arch/ia64: return_one.S Log Message: PR port-ia64/51261 Fix for ia64 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/arch/ia64/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/ia64/return_one.S diff -u src/tests/lib/libc/arch/ia64/return_one.S:1.1 src/tests/lib/libc/arch/ia64/return_one.S:1.2 --- src/tests/lib/libc/arch/ia64/return_one.S:1.1 Mon Jul 18 23:16:09 2011 +++ src/tests/lib/libc/arch/ia64/return_one.S Fri Aug 5 15:02:29 2016 @@ -1,8 +1,11 @@ -/* $NetBSD: return_one.S,v 1.1 2011/07/18 23:16:09 jym Exp $ */ +/* $NetBSD: return_one.S,v 1.2 2016/08/05 15:02:29 scole Exp $ */ #include -.globl return_one, return_one_end; +.globl return_one_end -return_one: return_one_end: - nop +ENTRY(return_one,0) + mov ret0=1 + br.ret.sptk.few rp +return_one_end: +END(return_one)
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: scole Date: Fri Aug 5 15:01:39 UTC 2016 Modified Files: src/tests/lib/libc/sys: t_getrusage.c Log Message: PR port-ia64/51261 Make this compile for ia64 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_getrusage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_getrusage.c diff -u src/tests/lib/libc/sys/t_getrusage.c:1.3 src/tests/lib/libc/sys/t_getrusage.c:1.4 --- src/tests/lib/libc/sys/t_getrusage.c:1.3 Wed Sep 3 19:24:12 2014 +++ src/tests/lib/libc/sys/t_getrusage.c Fri Aug 5 15:01:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_getrusage.c,v 1.3 2014/09/03 19:24:12 matt Exp $ */ +/* $NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_getrusage.c,v 1.3 2014/09/03 19:24:12 matt Exp $"); +__RCSID("$NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $"); #include #include @@ -60,6 +60,8 @@ work(void) while (n > 0) { #ifdef __or1k__ asm volatile("l.nop"); /* Do something. */ +#elif defined(__ia64__) + asm volatile("nop 0"); /* Do something. */ #else asm volatile("nop"); /* Do something. */ #endif
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: kiyohara Date: Fri Aug 5 14:32:36 UTC 2016 Modified Files: src/sys/arch/arm/omap: omap3_scm.c Log Message: Support TI_DM37XX. These register maps like to OMAP 34xx/35xx. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/omap3_scm.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/omap/omap3_scm.c diff -u src/sys/arch/arm/omap/omap3_scm.c:1.5 src/sys/arch/arm/omap/omap3_scm.c:1.6 --- src/sys/arch/arm/omap/omap3_scm.c:1.5 Sun Jul 3 12:27:04 2016 +++ src/sys/arch/arm/omap/omap3_scm.c Fri Aug 5 14:32:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: omap3_scm.c,v 1.5 2016/07/03 12:27:04 kiyohara Exp $ */ +/* $NetBSD: omap3_scm.c,v 1.6 2016/08/05 14:32:36 kiyohara Exp $ */ /*- * Copyright (c) 2013 Jared D. McNeill@@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: omap3_scm.c,v 1.5 2016/07/03 12:27:04 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: omap3_scm.c,v 1.6 2016/08/05 14:32:36 kiyohara Exp $"); #include "opt_omap.h" @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: omap3_scm.c, #define SCM_OFFSET_INTERFACE_3530 0 #define SCM_OFFSET_GENERAL_3530 0x270 -#if defined(OMAP_3430) || defined(OMAP_3530) +#if defined(OMAP_3430) || defined(OMAP_3530) || defined(TI_DM37XX) #define SCM_BASE SCM_BASE_3530 #define SCM_SIZE SCM_SIZE_3530 #define SCM_CONTROL_IDCODE SCM_CONTROL_IDCODE_3530
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Fri Aug 5 13:14:16 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add the sched_affinity man pages. To generate a diff of this commit: cvs rdiff -u -r1.2053 -r1.2054 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2053 src/distrib/sets/lists/comp/mi:1.2054 --- src/distrib/sets/lists/comp/mi:1.2053 Wed Jul 20 19:36:23 2016 +++ src/distrib/sets/lists/comp/mi Fri Aug 5 09:14:16 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2053 2016/07/20 23:36:23 christos Exp $ +# $NetBSD: mi,v 1.2054 2016/08/05 13:14:16 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -8681,10 +8681,12 @@ ./usr/share/man/cat3/sched.0 comp-c-catman .cat ./usr/share/man/cat3/sched_get_priority_max.0 comp-c-catman .cat ./usr/share/man/cat3/sched_get_priority_min.0 comp-c-catman .cat +./usr/share/man/cat3/sched_getaffinity_np.0 comp-c-catman .cat ./usr/share/man/cat3/sched_getparam.0 comp-c-catman .cat ./usr/share/man/cat3/sched_getscheduler.0 comp-c-catman .cat ./usr/share/man/cat3/sched_protect.0 comp-c-catman .cat ./usr/share/man/cat3/sched_rr_get_interval.0 comp-c-catman .cat +./usr/share/man/cat3/sched_setaffinity_np.0 comp-c-catman .cat ./usr/share/man/cat3/sched_setparam.0 comp-c-catman .cat ./usr/share/man/cat3/sched_setscheduler.0 comp-c-catman .cat ./usr/share/man/cat3/sched_yield.0 comp-c-catman .cat @@ -15913,10 +15915,12 @@ ./usr/share/man/html3/sched.html comp-c-htmlman html ./usr/share/man/html3/sched_get_priority_max.html comp-c-htmlman html ./usr/share/man/html3/sched_get_priority_min.html comp-c-htmlman html +./usr/share/man/html3/sched_getaffinity_np.html comp-c-htmlman html ./usr/share/man/html3/sched_getparam.html comp-c-htmlman html ./usr/share/man/html3/sched_getscheduler.html comp-c-htmlman html ./usr/share/man/html3/sched_protect.html comp-c-htmlman html ./usr/share/man/html3/sched_rr_get_interval.html comp-c-htmlman html +./usr/share/man/html3/sched_affinity_np.html comp-c-htmlman html ./usr/share/man/html3/sched_setparam.html comp-c-htmlman html ./usr/share/man/html3/sched_setscheduler.html comp-c-htmlman html ./usr/share/man/html3/sched_yield.html comp-c-htmlman html @@ -23146,10 +23150,12 @@ ./usr/share/man/man3/sched.3 comp-c-man .man ./usr/share/man/man3/sched_get_priority_max.3 comp-c-man .man ./usr/share/man/man3/sched_get_priority_min.3 comp-c-man .man +./usr/share/man/man3/sched_getaffinity_np.3 comp-c-man .man ./usr/share/man/man3/sched_getparam.3 comp-c-man .man ./usr/share/man/man3/sched_getscheduler.3 comp-c-man .man ./usr/share/man/man3/sched_protect.3 comp-c-man .man ./usr/share/man/man3/sched_rr_get_interval.3 comp-c-man .man +./usr/share/man/man3/sched_setaffinity_np.3 comp-c-man .man ./usr/share/man/man3/sched_setparam.3 comp-c-man .man ./usr/share/man/man3/sched_setscheduler.3 comp-c-man .man ./usr/share/man/man3/sched_yield.3 comp-c-man .man
CVS commit: src/lib/librt
Module Name:src Committed By: christos Date: Fri Aug 5 13:03:13 UTC 2016 Modified Files: src/lib/librt: Makefile sched.3 Log Message: add missing stuff for the affinity calls (Rocky Hotas) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/librt/Makefile cvs rdiff -u -r1.16 -r1.17 src/lib/librt/sched.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librt/Makefile diff -u src/lib/librt/Makefile:1.19 src/lib/librt/Makefile:1.20 --- src/lib/librt/Makefile:1.19 Tue Jul 5 17:13:12 2016 +++ src/lib/librt/Makefile Fri Aug 5 09:03:13 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2016/07/05 21:13:12 christos Exp $ +# $NetBSD: Makefile,v 1.20 2016/08/05 13:03:13 christos Exp $ # .include @@ -40,6 +40,8 @@ MLINKS+= sched.3 sched_get_priority_max. MLINKS+= sched.3 sched_get_priority_min.3 MLINKS+= sched.3 sched_rr_get_interval.3 MLINKS+= sched.3 sched_yield.3 +MLINKS+= sched.3 sched_setaffinity_np.3 +MLINKS+= sched.3 sched_getaffinity_np.3 MLINKS+= shm_open.3 shm_unlink.3 Index: src/lib/librt/sched.3 diff -u src/lib/librt/sched.3:1.16 src/lib/librt/sched.3:1.17 --- src/lib/librt/sched.3:1.16 Fri Aug 5 04:55:28 2016 +++ src/lib/librt/sched.3 Fri Aug 5 09:03:13 2016 @@ -1,6 +1,6 @@ -.\" $NetBSD: sched.3,v 1.16 2016/08/05 08:55:28 wiz Exp $ +.\" $NetBSD: sched.3,v 1.17 2016/08/05 13:03:13 christos Exp $ .\" -.\" Copyright (c) 2008 The NetBSD Foundation, Inc. +.\" Copyright (c) 2008, 2016 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -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 August 4, 2016 +.Dd August 5, 2016 .Dt SCHED 3 .Os .Sh NAME @@ -39,7 +39,9 @@ .Nm sched_get_priority_min , .Nm sched_rr_get_interval , .Nm sched_yield , -.Nm sched_protect +.Nm sched_protect , +.Nm sched_setaffinity_np , +.Nm sched_getaffinity_np .Nd process scheduling .Sh LIBRARY .Lb librt @@ -62,6 +64,10 @@ .Ft int .Fn sched_yield "void" .Ft int +.fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset" +.Ft int +.fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset" +.Ft int .Fn sched_protect "int priority" .Sh DESCRIPTION This section describes the functions used to get scheduling information
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Fri Aug 5 10:39:49 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Typo in comments To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.76 src/sys/arch/mips/mips/mipsX_subr.S:1.77 --- src/sys/arch/mips/mips/mipsX_subr.S:1.76 Sat Jul 30 07:10:42 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Fri Aug 5 10:39:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.76 2016/07/30 07:10:42 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.77 2016/08/05 10:39:49 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2305,7 +2305,7 @@ LEAF_NOPROFILE(MIPSX(tlb_invalidate_addr #endif and a2, t0# a2=valid entryLo0 afterwards and a3, t1# a3=valid entryLo1 afterwards - or v0, a2, a3 # will one be value? + or v0, a2, a3 # will one be valid? #ifdef MIPSNN movz t0, zero, a2 # zero lo0 if V would not be set movz t1, zero, a3 # zero lo1 if V would not be set @@ -2318,7 +2318,7 @@ LEAF_NOPROFILE(MIPSX(tlb_invalidate_addr _SLL a3, a3, PG_V_LSHIFT # move V to MSB _SRA a3, a3, PG_V_RSHIFT # fill with MSB and t1, t1, a3 # zero lo1 if V would not be set - move t2, a0# we need entryHi to be value + move t2, a0# we need entryHi to be valid 1: #endif /* MIPSNN */ #endif /* (PGSHIFT & 1) == 0 */
CVS commit: src/sys/external/bsd/ipf/netinet
Module Name:src Committed By: christos Date: Fri Aug 5 09:06:52 UTC 2016 Modified Files: src/sys/external/bsd/ipf/netinet: fil.c Log Message: partial sync with FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/ipf/netinet/fil.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/external/bsd/ipf/netinet/fil.c diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.18 src/sys/external/bsd/ipf/netinet/fil.c:1.19 --- src/sys/external/bsd/ipf/netinet/fil.c:1.18 Sun Apr 3 20:44:06 2016 +++ src/sys/external/bsd/ipf/netinet/fil.c Fri Aug 5 05:06:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fil.c,v 1.18 2016/04/04 00:44:06 christos Exp $ */ +/* $NetBSD: fil.c,v 1.19 2016/08/05 09:06:52 christos Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch; #if !defined(lint) #if defined(__NetBSD__) #include -__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.18 2016/04/04 00:44:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.19 2016/08/05 09:06:52 christos Exp $"); #else static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $"; @@ -238,7 +238,7 @@ static const struct optlist ipopts[20] = }; #ifdef USE_INET6 -static struct optlist ip6exthdr[] = { +static const struct optlist ip6exthdr[] = { { IPPROTO_HOPOPTS, 0x01 }, { IPPROTO_IPV6, 0x02 }, { IPPROTO_ROUTING, 0x04 }, @@ -612,6 +612,7 @@ ipf_pr_ipv6hdr(fr_info_t *fin) ipf_main_softc_t *softc = fin->fin_main_soft; fin->fin_flx |= FI_BAD; + DT2(ipf_fi_bad_ipv6_frag_1, fr_info_t *, fin, int, go); LBUMPD(ipf_stats[fin->fin_out], fr_v6_badfrag); LBUMP(ipf_stats[fin->fin_out].fr_v6_bad); } @@ -668,6 +669,7 @@ ipf_pr_ipv6exthdr(fr_info_t *fin, int mu if (shift > fin->fin_dlen) { /* Nasty extension header length? */ fin->fin_flx |= FI_BAD; + DT3(ipf_fi_bad_pr_ipv6exthdr_len, fr_info_t *, fin, u_short, shift, u_short, fin->fin_dlen); LBUMPD(ipf_stats[fin->fin_out], fr_v6_ext_hlen); return NULL; } @@ -689,9 +691,10 @@ ipf_pr_ipv6exthdr(fr_info_t *fin, int mu * Most IPv6 extension headers are only allowed once. */ if ((multiple == 0) && - ((fin->fin_optmsk & ip6exthdr[i].ol_bit) != 0)) + ((fin->fin_optmsk & ip6exthdr[i].ol_bit) != 0)) { fin->fin_flx |= FI_BAD; - else +DT2(ipf_fi_bad_ipv6exthdr_once, fr_info_t *, fin, u_int, (fin->fin_optmsk & ip6exthdr[i].ol_bit)); + } else fin->fin_optmsk |= ip6exthdr[i].ol_bit; break; } @@ -768,6 +771,7 @@ ipf_pr_routing6(fr_info_t *fin) ipf_main_softc_t *softc = fin->fin_main_soft; fin->fin_flx |= FI_BAD; + DT1(ipf_fi_bad_routing6, fr_info_t *, fin); LBUMPD(ipf_stats[fin->fin_out], fr_v6_rh_bad); return IPPROTO_NONE; } @@ -829,8 +833,10 @@ ipf_pr_fragment6(fr_info_t *fin) * Any fragment that isn't the last fragment must have its * length as a multiple of 8. */ - if ((fin->fin_plen & 7) != 0) + if ((fin->fin_plen & 7) != 0) { fin->fin_flx |= FI_BAD; + DT2(ipf_fi_bad_frag_not_8, fr_info_t *, fin, u_int, (fin->fin_plen & 7)); + } } fin->fin_fraghdr = frag; @@ -842,8 +848,10 @@ ipf_pr_fragment6(fr_info_t *fin) /* * Jumbograms aren't handled, so the max. length is 64k */ - if ((fin->fin_off << 3) + fin->fin_dlen > 65535) + if ((fin->fin_off << 3) + fin->fin_dlen > 65535) { fin->fin_flx |= FI_BAD; + DT2(ipf_fi_bad_jumbogram, fr_info_t *, fin, u_int, ((fin->fin_off << 3) + fin->fin_dlen)); + } /* * We don't know where the transport layer header (or whatever is next @@ -945,8 +953,10 @@ ipf_pr_icmp6(fr_info_t *fin) icmp6 = fin->fin_dp; ip6 = (ip6_t *)((char *)icmp6 + ICMPERR_ICMPHLEN); if (IP6_NEQ(>fin_fi.fi_dst, ->ip6_src)) +>ip6_src)) { fin->fin_flx |= FI_BAD; +DT1(ipf_fi_bad_icmp6, fr_info_t *, fin); + } break; default : break; @@ -1248,8 +1258,10 @@ ipf_pr_icmp(fr_info_t *fin) case ICMP_UNREACH : #ifdef icmp_nextmtu if (icmp->icmp_code == ICMP_UNREACH_NEEDFRAG) { - if (icmp->icmp_nextmtu < softc->ipf_icmpminfragmtu) + if (icmp->icmp_nextmtu < softc->ipf_icmpminfragmtu) { fin->fin_flx |= FI_BAD; +DT3(ipf_fi_bad_icmp_nextmtu, fr_info_t *, fin, u_int, icmp->icmp_nextmtu, u_int, softc->ipf_icmpminfragmtu); + } } #endif case ICMP_SOURCEQUENCH : @@ -1268,16 +1280,20 @@ ipf_pr_icmp(fr_info_t *fin) * fragment. */ oip = (ip_t *)((char *)fin->fin_dp + ICMPERR_ICMPHLEN); - if ((ntohs(oip->ip_off) & IP_OFFMASK) != 0) + if ((ntohs(oip->ip_off) & IP_OFFMASK) != 0) { fin->fin_flx |= FI_BAD; + DT2(ipf_fi_bad_icmp_err, fr_info_t, fin, u_int, (ntohs(oip->ip_off) & IP_OFFMASK)); + } /* * If the destination of this packet doesn't match the * source of the original
CVS commit: src/sys/external/bsd/ipf/netinet
Module Name:src Committed By: christos Date: Fri Aug 5 09:05:02 UTC 2016 Modified Files: src/sys/external/bsd/ipf/netinet: ip_compat.h Log Message: unifdef To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/ipf/netinet/ip_compat.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/external/bsd/ipf/netinet/ip_compat.h diff -u src/sys/external/bsd/ipf/netinet/ip_compat.h:1.10 src/sys/external/bsd/ipf/netinet/ip_compat.h:1.11 --- src/sys/external/bsd/ipf/netinet/ip_compat.h:1.10 Fri Jun 10 09:31:44 2016 +++ src/sys/external/bsd/ipf/netinet/ip_compat.h Fri Aug 5 05:05:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_compat.h,v 1.10 2016/06/10 13:31:44 ozaki-r Exp $ */ +/* $NetBSD: ip_compat.h,v 1.11 2016/08/05 09:05:02 christos Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -26,13 +26,11 @@ # define __KERNEL__ #endif -#ifndef SOLARIS # if (defined(sun) && (defined(__svr4__) || defined(__SVR4))) # define SOLARIS 1 # else # define SOLARIS 0 # endif -#endif #if (defined(SOLARIS2) && (SOLARIS2 >= 8)) # ifndef USE_INET6 # define USE_INET6 @@ -132,701 +130,26 @@ struct file; # endif #endif -#if defined(__NetBSD_Version__) # define NETBSD_GE_REV(x) (__NetBSD_Version__ >= (x)) # define NETBSD_GT_REV(x) (__NetBSD_Version__ > (x)) # define NETBSD_LT_REV(x) (__NetBSD_Version__ < (x)) -#else -# define NETBSD_GE_REV(x) 0 -# define NETBSD_GT_REV(x) 0 -# define NETBSD_LT_REV(x) 0 -#endif -#if defined(__FreeBSD_version) -# define FREEBSD_GE_REV(x) (__FreeBSD_version >= (x)) -# define FREEBSD_GT_REV(x) (__FreeBSD_version > (x)) -# define FREEBSD_LT_REV(x) (__FreeBSD_version < (x)) -#else # define FREEBSD_GE_REV(x) 0 # define FREEBSD_GT_REV(x) 0 # define FREEBSD_LT_REV(x) 0 -#endif -#if defined(_BSDI_VERSION) -# define BSDOS_GE_REV(x) (_BSDI_VERSION >= (x)) -# define BSDOS_GT_REV(x) (_BSDI_VERSION > (x)) -# define BSDOS_LT_REV(x) (_BSDI_VERSION < (x)) -#else # define BSDOS_GE_REV(x) 0 # define BSDOS_GT_REV(x) 0 # define BSDOS_LT_REV(x) 0 -#endif -#if defined(OpenBSD) -# define OPENBSD_GE_REV(x) (OpenBSD >= (x)) -# define OPENBSD_GT_REV(x) (OpenBSD > (x)) -# define OPENBSD_LT_REV(x) (OpenBSD < (x)) -#else # define OPENBSD_GE_REV(x) 0 # define OPENBSD_GT_REV(x) 0 # define OPENBSD_LT_REV(x) 0 -#endif -#if defined(BSD) # define BSD_GE_YEAR(x) (BSD >= (x)) # define BSD_GT_YEAR(x) (BSD > (x)) # define BSD_LT_YEAR(x) (BSD < (x)) -#else -# define BSD_GE_YEAR(x) 0 -# define BSD_GT_YEAR(x) 0 -# define BSD_LT_YEAR(x) 0 -#endif - - -/* --- */ -/* S O L A R I S */ -/* --- */ -#if SOLARIS -# define MENTAT 1 -# include -# include -# include -# include -# include -# include -# if SOLARIS2 >= 10 -# include -# include -# include -# include -# include -# endif -/* - * because Solaris 2 defines these in two places :-/ - */ -# ifndef _KERNEL -# define ADD_KERNEL -# define _KERNEL -# undef RES_INIT -# endif /* _KERNEL */ - -# if SOLARIS2 >= 8 -# include -# include -# endif - -# include -/* These 5 are defined in and */ -# undef IPOPT_EOL -# undef IPOPT_NOP -# undef IPOPT_LSRR -# undef IPOPT_RR -# undef IPOPT_SSRR -# ifdef i386 -# define _SYS_PROMIF_H -# endif -# ifdef ADD_KERNEL -# undef _KERNEL -# endif -# include -# include -# undef COPYOUT -# if !defined(_SYS_NETI_H) -# include -# endif -# if SOLARIS2 >= 8 - -# include -# define ipif_local_addr ipif_lcl_addr -/* Only defined in private include file */ -# ifndef V4_PART_OF_V6 -# define V4_PART_OF_V6(v6) v6.s6_addr32[3] -# endif -struct ip6_ext { - u_char ip6e_nxt; - u_char ip6e_len; -}; -# endif /* SOLARIS2 >= 8 */ - -# if SOLARIS2 >= 6 -# include -typedef uint8_t u_int8_t; -typedef uint32_t u_32_t; -# else -typedef unsigned char u_int8_t; -typedef unsigned int u_32_t; -# endif -# define U_32_T 1 -# if SOLARIS2 >= 7 -# define USE_QUAD_T 1 -# define U_QUAD_T uint64_t -# define QUAD_T int64_t -# endif - -# ifdef _KERNEL -# define NEED_LOCAL_RAND 1 -# define KRWLOCK_T krwlock_t -# define KMUTEX_T kmutex_t -# if !defined(FW_HOOKS) -# include "qif.h" -# include "pfil.h" -# endif -# if SOLARIS2 >= 6 -# if SOLARIS2 == 6 -#define ATOMIC_INCL(x) atomic_add_long((uint32_t*)&(x), 1) -#define ATOMIC_DECL(x) atomic_add_long((uint32_t*)&(x), -1) -# else -#define ATOMIC_INCL(x) atomic_add_long(&(x), 1) -#define ATOMIC_DECL(x) atomic_add_long(&(x), -1) -# endif /* SOLARIS2 == 6 */ -# define ATOMIC_INC64(x) atomic_add_64((uint64_t*)&(x), 1) -# define ATOMIC_INC32(x) atomic_add_32((uint32_t*)&(x), 1) -# define ATOMIC_DEC64(x) atomic_add_64((uint64_t*)&(x), -1) -# define ATOMIC_DEC32(x) atomic_add_32((uint32_t*)&(x), -1) -#
CVS commit: src/sys/net
Module Name:src Committed By: pgoyette Date: Fri Aug 5 08:56:36 UTC 2016 Modified Files: src/sys/net: slcompress.c Log Message: Actually commit the changes for making this into a loadable module. The module infrastructure was committed earlier, but the "guts" of the commit were somehow missed. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/net/slcompress.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/net/slcompress.c diff -u src/sys/net/slcompress.c:1.39 src/sys/net/slcompress.c:1.40 --- src/sys/net/slcompress.c:1.39 Mon Aug 24 22:21:26 2015 +++ src/sys/net/slcompress.c Fri Aug 5 08:56:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: slcompress.c,v 1.39 2015/08/24 22:21:26 pooka Exp $ */ +/* $NetBSD: slcompress.c,v 1.40 2016/08/05 08:56:36 pgoyette Exp $ */ /* Id: slcompress.c,v 1.3 1996/05/24 07:04:47 paulus Exp */ /* @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: slcompress.c,v 1.39 2015/08/24 22:21:26 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: slcompress.c,v 1.40 2016/08/05 08:56:36 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: slcompress.c #include #include #include +#include #include #include @@ -617,3 +618,21 @@ bad: return (-1); } #endif + +MODULE(MODULE_CLASS_MISC, slcompress, NULL); + +static int +slcompress_modcmd(modcmd_t cmd, void *arg) +{ + switch (cmd) { + case MODULE_CMD_INIT: + case MODULE_CMD_FINI: +#ifdef INET + return 0; +#endif + case MODULE_CMD_STAT: + case MODULE_CMD_AUTOUNLOAD: + default: + return ENOTTY; + } +}
CVS commit: src/lib/librt
Module Name:src Committed By: wiz Date: Fri Aug 5 08:55:29 UTC 2016 Modified Files: src/lib/librt: sched.3 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/librt/sched.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librt/sched.3 diff -u src/lib/librt/sched.3:1.15 src/lib/librt/sched.3:1.16 --- src/lib/librt/sched.3:1.15 Thu Aug 4 07:09:15 2016 +++ src/lib/librt/sched.3 Fri Aug 5 08:55:28 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: sched.3,v 1.15 2016/08/04 07:09:15 christos Exp $ +.\" $NetBSD: sched.3,v 1.16 2016/08/05 08:55:28 wiz Exp $ .\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -160,12 +160,12 @@ Performs priority protection using the .Dv PTHREAD_PRIO_PROTECT protocol. This function will increase the protected priority of the caller thread to -.Fa priority +.Fa priority if the current thread's protected priority is smaller than .Fa priority . Multiple calls to .Fn sched_protect -with a positive priority will +with a positive priority will .Dq push a priority level to the current thread, whereas calling .Fn sched_protect @@ -177,7 +177,7 @@ will .Dq pop a priority level. When the level reaches -.Dv 0 +.Dv 0 (the same number of .Dq pushes and
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Aug 5 08:24:46 UTC 2016 Modified Files: src/sys/dev: cgd.c Log Message: Ignore return values when restoring what has just been undone. We're really just putting back something that was there before, so we should not get any errors, and a panic() would be rather severe. This and the corresponding commit to vnd.c address newly reported Coverity CID 1364761 and CID 1364760 To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/cgd.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/cgd.c diff -u src/sys/dev/cgd.c:1.109 src/sys/dev/cgd.c:1.110 --- src/sys/dev/cgd.c:1.109 Mon Jul 25 12:45:13 2016 +++ src/sys/dev/cgd.c Fri Aug 5 08:24:46 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.109 2016/07/25 12:45:13 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.110 2016/08/05 08:24:46 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.109 2016/07/25 12:45:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.110 2016/08/05 08:24:46 pgoyette Exp $"); #include #include @@ -1082,7 +1082,7 @@ cgd_modcmd(modcmd_t cmd, void *arg) */ error = config_cfattach_detach(cgd_cd.cd_name, _ca); if (error) { - error = devsw_attach("cgd", _bdevsw, _bmajor, + (void)devsw_attach("cgd", _bdevsw, _bmajor, _cdevsw, _cmajor); aprint_error("%s: failed to detach %s cfattach, " "error %d\n", __func__, cgd_cd.cd_name, error); @@ -1090,8 +1090,8 @@ cgd_modcmd(modcmd_t cmd, void *arg) } error = config_cfdriver_detach(_cd); if (error) { - config_cfattach_attach(cgd_cd.cd_name, _ca); - devsw_attach("cgd", _bdevsw, _bmajor, + (void)config_cfattach_attach(cgd_cd.cd_name, _ca); + (void)devsw_attach("cgd", _bdevsw, _bmajor, _cdevsw, _cmajor); aprint_error("%s: failed to detach %s cfdriver, " "error %d\n", __func__, cgd_cd.cd_name, error);
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Aug 5 08:21:24 UTC 2016 Modified Files: src/sys/dev: vnd.c Log Message: Ignore return values when backing out of a "finish" sequence. There really shouldn't be any errors here (we're just putting something back that previously existed), and a panic() would be rather drastic. To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/sys/dev/vnd.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/vnd.c diff -u src/sys/dev/vnd.c:1.257 src/sys/dev/vnd.c:1.258 --- src/sys/dev/vnd.c:1.257 Tue Jul 26 01:49:48 2016 +++ src/sys/dev/vnd.c Fri Aug 5 08:21:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.257 2016/07/26 01:49:48 pgoyette Exp $ */ +/* $NetBSD: vnd.c,v 1.258 2016/08/05 08:21:24 pgoyette Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.257 2016/07/26 01:49:48 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.258 2016/08/05 08:21:24 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_vnd.h" @@ -2106,7 +2106,7 @@ vnd_modcmd(modcmd_t cmd, void *arg) */ error = config_cfattach_detach(vnd_cd.cd_name, _ca); if (error) { -error = devsw_attach("vnd", _bdevsw, _bmajor, +(void)devsw_attach("vnd", _bdevsw, _bmajor, _cdevsw, _cmajor); aprint_error("%s: failed to detach %s cfattach, " "error %d\n", __func__, vnd_cd.cd_name, error); @@ -2114,8 +2114,8 @@ vnd_modcmd(modcmd_t cmd, void *arg) } error = config_cfdriver_detach(_cd); if (error) { -config_cfattach_attach(vnd_cd.cd_name, _ca); -devsw_attach("vnd", _bdevsw, _bmajor, +(void)config_cfattach_attach(vnd_cd.cd_name, _ca); +(void)devsw_attach("vnd", _bdevsw, _bmajor, _cdevsw, _cmajor); aprint_error("%s: failed to detach %s cfdriver, " "error %d\n", __func__, vnd_cd.cd_name, error);
CVS commit: src/usr.bin/systat
Module Name:src Committed By: christos Date: Fri Aug 5 07:22:17 UTC 2016 Modified Files: src/usr.bin/systat: ifstat.c Log Message: Avoid string gymnastics in an olympic year. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/systat/ifstat.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/systat/ifstat.c diff -u src/usr.bin/systat/ifstat.c:1.3 src/usr.bin/systat/ifstat.c:1.4 --- src/usr.bin/systat/ifstat.c:1.3 Thu Aug 4 08:56:31 2016 +++ src/usr.bin/systat/ifstat.c Fri Aug 5 03:22:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $ */ +/* $NetBSD: ifstat.c,v 1.4 2016/08/05 07:22:17 christos Exp $ */ /* * Copyright (c) 2003, Trent Nelson,. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $"); +__RCSID("$NetBSD: ifstat.c,v 1.4 2016/08/05 07:22:17 christos Exp $"); #endif /* not lint */ #include @@ -350,24 +350,11 @@ fetchifstat(void) static void right_align_string(struct if_stat *ifp) { - int str_len = 0, pad_len = 0; - char *newstr = NULL, *ptr = NULL; - if (ifp == NULL || ifp->if_mib.ifdr_name[0] == '\0') return; - else { - /* string length + '\0' */ - str_len = strlen(ifp->if_mib.ifdr_name)+1; - pad_len = IF_NAMESIZE-(str_len); - - newstr = ifp->if_name; - ptr = newstr + pad_len; - (void)memset((void *)newstr, (int)' ', IF_NAMESIZE); - (void)strncpy(ptr, (const char *)>if_mib.ifdr_name, - str_len); - } - return; + snprintf(ifp->if_name, IF_NAMESIZE, "%*s", IF_NAMESIZE - 1, + ifp->if_mib.ifdr_name); } static int
CVS commit: src/usr.sbin/intrctl
Module Name:src Committed By: knakahara Date: Fri Aug 5 06:58:55 UTC 2016 Modified Files: src/usr.sbin/intrctl: intrctl_io.c Log Message: fix CID 1364766: Resource leaks To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/intrctl/intrctl_io.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/intrctl/intrctl_io.c diff -u src/usr.sbin/intrctl/intrctl_io.c:1.2 src/usr.sbin/intrctl/intrctl_io.c:1.3 --- src/usr.sbin/intrctl/intrctl_io.c:1.2 Wed Aug 3 08:28:09 2016 +++ src/usr.sbin/intrctl/intrctl_io.c Fri Aug 5 06:58:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: intrctl_io.c,v 1.2 2016/08/03 08:28:09 knakahara Exp $ */ +/* $NetBSD: intrctl_io.c,v 1.3 2016/08/05 06:58:55 knakahara Exp $ */ /* * Copyright (c) 2015 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: intrctl_io.c,v 1.2 2016/08/03 08:28:09 knakahara Exp $"); +__RCSID("$NetBSD: intrctl_io.c,v 1.3 2016/08/05 06:58:55 knakahara Exp $"); #include #include @@ -47,16 +47,16 @@ intrctl_io_alloc(int retry) { size_t buf_size; int i, error; - void *buf; + void *buf = NULL; error = sysctlbyname("kern.intr.list", NULL, _size, NULL, 0); if (error < 0) { - return NULL; + goto error; } buf = malloc(buf_size); if (buf == NULL) { - return NULL; + goto error; } for (i = 0; i < retry; i++) { @@ -68,15 +68,16 @@ intrctl_io_alloc(int retry) temp = realloc(buf, buf_size); if (temp == NULL) { -free(buf); -return NULL; +goto error; } buf = temp; } else { - free(buf); - return NULL; + goto error; } } +error: + if (buf != NULL) + free(buf); return NULL; }
CVS commit: src/sys/dev/ata
Module Name:src Committed By: christos Date: Fri Aug 5 06:54:22 UTC 2016 Modified Files: src/sys/dev/ata: wd.c Log Message: CID 1364758: Integer handling issues, avoid sign extension to 64 bits. To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/sys/dev/ata/wd.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.425 src/sys/dev/ata/wd.c:1.426 --- src/sys/dev/ata/wd.c:1.425 Fri Jul 22 08:55:34 2016 +++ src/sys/dev/ata/wd.c Fri Aug 5 02:54:22 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.425 2016/07/22 12:55:34 jakllsch Exp $ */ +/* $NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.425 2016/07/22 12:55:34 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $"); #include "opt_ata.h" @@ -394,8 +394,8 @@ wdattach(device_t parent, device_t self, if ((wd->sc_params.atap_secsz & ATA_SECSZ_VALID_MASK) == ATA_SECSZ_VALID && ((wd->sc_params.atap_secsz & ATA_SECSZ_LLS) != 0)) { wd->sc_blksize = 2ULL * - (wd->sc_params.atap_lls_secsz[1] << 16 | - wd->sc_params.atap_lls_secsz[0] << 0); + ((uint32_t)((wd->sc_params.atap_lls_secsz[1] << 16) | + wd->sc_params.atap_lls_secsz[0])); } else { wd->sc_blksize = 512; }