CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:43:42 UTC 2015 Modified Files: src/sys/arch/mips/mips: mips_softint.c Log Message: Add a KDASSERT to make sure interrupts are still enabled. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/mips_softint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/mips_softint.c diff -u src/sys/arch/mips/mips/mips_softint.c:1.6 src/sys/arch/mips/mips/mips_softint.c:1.7 --- src/sys/arch/mips/mips/mips_softint.c:1.6 Tue Sep 27 01:02:34 2011 +++ src/sys/arch/mips/mips/mips_softint.c Sat Jun 6 04:43:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_softint.c,v 1.6 2011/09/27 01:02:34 jym Exp $ */ +/* $NetBSD: mips_softint.c,v 1.7 2015/06/06 04:43:41 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.6 2011/09/27 01:02:34 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.7 2015/06/06 04:43:41 matt Exp $"); #include #include @@ -114,6 +114,7 @@ softint_process(uint32_t ipending) KASSERT((ipending & MIPS_SOFT_INT_MASK) != 0); KASSERT((ipending & ~MIPS_SOFT_INT_MASK) == 0); KASSERT(ci->ci_cpl == IPL_HIGH); + KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE); KASSERTMSG(ci->ci_mtx_count == 0, "%s: cpu%u (%p): ci_mtx_count (%d) != 0", __func__, cpu_index(ci), ci, ci->ci_mtx_count);
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:40:19 UTC 2015 Modified Files: src/sys/arch/mips/mips: spl.S Log Message: If mipsNN and kernel has DDB, trap on bogus IPL values passed to splraise. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/spl.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/spl.S diff -u src/sys/arch/mips/mips/spl.S:1.7 src/sys/arch/mips/mips/spl.S:1.8 --- src/sys/arch/mips/mips/spl.S:1.7 Fri Jun 5 19:58:01 2015 +++ src/sys/arch/mips/mips/spl.S Sat Jun 6 04:40:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $ */ +/* $NetBSD: spl.S,v 1.8 2015/06/06 04:40:19 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include "opt_multiprocessor.h" /* MP kernel? */ #include "opt_cputype.h" /* which mips CPU levels do we support? */ +#include "opt_ddb.h" #include @@ -38,7 +39,7 @@ #include #include -RCSID("$NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $") +RCSID("$NetBSD: spl.S,v 1.8 2015/06/06 04:40:19 matt Exp $") #include "assym.h" @@ -217,6 +218,9 @@ STATIC_LEAF(_splsw_clrsoftintr) END(_splsw_clrsoftintr) STATIC_LEAF(_splsw_splraise) +#if defined(DDB) && __mips >= 32 + tgeiu a0, IPL_HIGH+1 +#endif move a1, a0 PTR_LA v1, _C_LABEL(ipl_sr_map) sll a2, a0, INT_SCALESHIFT
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat Jun 6 04:39:12 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h if_wmvar.h Log Message: - Add workaround for I210 Errata 25 and I211 Errata 10. - Add wm_gmii_gs40g_{read|write}reg() and use it to access non-standatrd page. - Add wm_pll_workaround_i210() and call it when chip is i211 chip is i210 and it use INVM chip is i210 and NVM image version < 3.25 - Add comment - Rename macros. To generate a diff of this commit: cvs rdiff -u -r1.328 -r1.329 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.328 src/sys/dev/pci/if_wm.c:1.329 --- src/sys/dev/pci/if_wm.c:1.328 Sat Jun 6 03:38:40 2015 +++ src/sys/dev/pci/if_wm.c Sat Jun 6 04:39:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.328 2015/06/06 03:38:40 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.329 2015/06/06 04:39:12 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.328 2015/06/06 03:38:40 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.329 2015/06/06 04:39:12 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -628,6 +628,8 @@ static int wm_gmii_hv_readreg(device_t, static void wm_gmii_hv_writereg(device_t, int, int, int); static int wm_gmii_82580_readreg(device_t, int, int); static void wm_gmii_82580_writereg(device_t, int, int, int); +static int wm_gmii_gs40g_readreg(device_t, int, int); +static void wm_gmii_gs40g_writereg(device_t, int, int, int); static void wm_gmii_statchg(struct ifnet *); static int wm_kmrn_readreg(struct wm_softc *, int); static void wm_kmrn_writereg(struct wm_softc *, int, int); @@ -739,6 +741,7 @@ static void wm_set_mdio_slow_mode_hv(str static void wm_configure_k1_ich8lan(struct wm_softc *, int); static void wm_reset_init_script_82575(struct wm_softc *); static void wm_reset_mdicnfg_82580(struct wm_softc *); +static void wm_pll_workaround_i210(struct wm_softc *); CFATTACH_DECL3_NEW(wm, sizeof(struct wm_softc), wm_match, wm_attach, wm_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); @@ -1942,6 +1945,25 @@ wm_attach(device_t parent, device_t self wm_nvm_version(sc); aprint_verbose("\n"); + /* Check for I21[01] PLL workaround */ + if (sc->sc_type == WM_T_I210) + sc->sc_flags |= WM_F_PLL_WA_I210; + if ((sc->sc_type == WM_T_I210) && wm_nvm_get_flash_presence_i210(sc)) { + /* NVM image release 3.25 has a workaround */ + if ((sc->sc_nvm_ver_major > 3) + || ((sc->sc_nvm_ver_major == 3) + && (sc->sc_nvm_ver_minor >= 25))) + return; + else { + aprint_verbose_dev(sc->sc_dev, + "ROM image version %d.%d is older than 3.25\n", + sc->sc_nvm_ver_major, sc->sc_nvm_ver_minor); + sc->sc_flags |= WM_F_PLL_WA_I210; + } + } + if ((sc->sc_flags & WM_F_PLL_WA_I210) != 0) + wm_pll_workaround_i210(sc); + switch (sc->sc_type) { case WM_T_82571: case WM_T_82572: @@ -6636,19 +6658,24 @@ wm_gmii_mediainit(struct wm_softc *sc, p default: if (((sc->sc_flags & WM_F_SGMII) != 0) && !wm_sgmii_uses_mdio(sc)){ + /* SGMII */ mii->mii_readreg = wm_sgmii_readreg; mii->mii_writereg = wm_sgmii_writereg; } else if (sc->sc_type >= WM_T_80003) { + /* 80003 */ mii->mii_readreg = wm_gmii_i80003_readreg; mii->mii_writereg = wm_gmii_i80003_writereg; } else if (sc->sc_type >= WM_T_I210) { - mii->mii_readreg = wm_gmii_i82544_readreg; - mii->mii_writereg = wm_gmii_i82544_writereg; + /* I210 and I211 */ + mii->mii_readreg = wm_gmii_gs40g_readreg; + mii->mii_writereg = wm_gmii_gs40g_writereg; } else if (sc->sc_type >= WM_T_82580) { + /* 82580, I350 and I354 */ sc->sc_phytype = WMPHY_82580; mii->mii_readreg = wm_gmii_82580_readreg; mii->mii_writereg = wm_gmii_82580_writereg; } else if (sc->sc_type >= WM_T_82544) { + /* 82544, 0, [56], [17], 8257[1234] and 82583 */ mii->mii_readreg = wm_gmii_i82544_readreg; mii->mii_writereg = wm_gmii_i82544_writereg; } else { @@ -7358,6 +7385,75 @@ wm_gmii_82580_writereg(device_t self, in } /* + * wm_gmii_gs40g_readreg: [mii interface function] + * + * Read a PHY register on the I2100 and I211. + * This could be handled by the PHY layer if we didn't have to lock the + * ressource ... + */ +static int +wm_gmii_gs40g_readreg(device_t self, int phy, int reg) +{ + struct wm_softc *sc = device_private(self); + int sem; + int page, offset; + int rv; + + /* Acquire semaphore */ + sem = swfwphysem[sc->sc_funcid]; + if (wm_get_swfw_semaphore(sc, sem)) { + aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n", + __func__); + return 0; + } + + /* Page select */ + page = reg >>
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:38:52 UTC 2015 Modified Files: src/sys/arch/mips/mips: db_interface.c Log Message: Add octeon mach commands nmi and reset. Teach DDB about Cavium BBIT branch instructions. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/mips/mips/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/db_interface.c diff -u src/sys/arch/mips/mips/db_interface.c:1.75 src/sys/arch/mips/mips/db_interface.c:1.76 --- src/sys/arch/mips/mips/db_interface.c:1.75 Thu Aug 18 21:04:23 2011 +++ src/sys/arch/mips/mips/db_interface.c Sat Jun 6 04:38:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.75 2011/08/18 21:04:23 matt Exp $ */ +/* $NetBSD: db_interface.c,v 1.76 2015/06/06 04:38:52 matt Exp $ */ /* * Mach Operating System @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.75 2011/08/18 21:04:23 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.76 2015/06/06 04:38:52 matt Exp $"); #include "opt_multiprocessor.h" #include "opt_cputype.h" /* which mips CPUs do we support? */ @@ -78,7 +78,7 @@ static void db_unwatch_cmd(db_expr_t, bo #endif /* (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0 */ #ifdef MULTIPROCESSOR -static void db_mach_cpu(db_expr_t, bool, db_expr_t, const char *); +static void db_mach_cpu_cmd(db_expr_t, bool, db_expr_t, const char *); #endif void db_tlbdump_cmd(db_expr_t, bool, db_expr_t, const char *); @@ -129,7 +129,7 @@ kdb_trap(int type, struct reg *regs) s = splhigh(); -#ifdef MULTIPROCESSOR +#if defined(MULTIPROCESSOR) bool first_in_ddb = false; const u_int cpu_me = cpu_number(); const u_int old_ddb_cpu = atomic_cas_uint(&ddb_cpu, NOCPU, cpu_me); @@ -155,7 +155,7 @@ kdb_trap(int type, struct reg *regs) db_active--; *regs = ddb_regs; -#ifdef MULTIPROCESSOR +#if defined(MULTIPROCESSOR) if (atomic_cas_uint(&ddb_cpu, cpu_me, NOCPU) == cpu_me) { cpu_resume_others(); } else { @@ -185,6 +185,18 @@ db_read_bytes(vaddr_t addr, size_t size, { const char *src = (char *)addr; + if (size <= 8 && (size & (size-1)) == 0 && (addr & (size-1)) == 0 + && ((uintptr_t)data & (size-1)) == 0) { + if (size == sizeof(uint8_t)) + *(uint8_t *)data = *(const uint8_t *)src; + else if (size == sizeof(uint16_t)) + *(uint16_t *)data = *(const uint16_t *)src; + else if (size == sizeof(uint32_t)) + *(uint32_t *)data = *(const uint32_t *)src; + else + *(uint64_t *)data = *(const uint64_t *)src; + return; + } while (size--) *data++ = *src++; } @@ -198,6 +210,18 @@ db_write_bytes(vaddr_t addr, size_t size char *p = (char *)addr; size_t n = size; + if (size <= 8 && (size & (size-1)) == 0 && (addr & (size-1)) == 0 + && ((uintptr_t)data & (size-1)) == 0) { + if (size == sizeof(uint8_t)) + *(uint8_t *)p = *(const uint8_t *)data; + else if (size == sizeof(uint16_t)) + *(uint16_t *)p = *(const uint16_t *)data; + else if (size == sizeof(uint32_t)) + *(uint32_t *)p = *(const uint32_t *)data; + else + *(uint64_t *)p = *(const uint64_t *)data; + return; + } while (n--) *p++ = *data++; @@ -706,9 +730,51 @@ db_mtcr_cmd(db_expr_t addr, bool have_ad } #endif /* MIPS64_XLS */ +#ifdef MIPS64_OCTEON +#include + +#ifdef MULTIPROCESSOR +static void +db_mach_nmi_cmd(db_expr_t addr, bool have_addr, db_expr_t count, + const char *modif) +{ + CPU_INFO_ITERATOR cii; + struct cpu_info *ci; + + if (!have_addr) { + db_printf("CPU not specific\n"); + return; + } + for (CPU_INFO_FOREACH(cii, ci)) { + if (cpu_index(ci) == addr) + break; + } + if (ci == NULL) { + db_printf("CPU %ld not configured\n", (long)addr); + return; + } + if (ci == curcpu()) { + db_printf("CPU %ld is current cpu; request ignored\n", + (long)addr); + return; + } + mips64_sd_a64(MIPS_PHYS_TO_XKPHYS_UNCACHED(CIU_NMI), + __BIT(ci->ci_cpuid)); +} +#endif + +static void +db_mach_reset_cmd(db_expr_t addr, bool have_addr, db_expr_t count, + const char *modif) +{ + mips64_sd_a64(MIPS_PHYS_TO_XKPHYS_UNCACHED(CIU_SOFT_RST), + mips64_ld_a64(MIPS_PHYS_TO_XKPHYS_UNCACHED(CIU_FUSE))); +} + +#endif const struct db_command db_machine_command_table[] = { #ifdef MULTIPROCESSOR - { DDB_ADD_CMD("cpu", db_mach_cpu, 0, + { DDB_ADD_CMD("cpu", db_mach_cpu_cmd, 0, "switch to another cpu", "cpu#", NULL) }, #endif { DDB_ADD_CMD("cp0", db_cp0dump_cmd, 0, @@ -737,6 +803,16 @@ const struct db_command db_machine_comma "Set processor control register", NULL, NULL) }, #endif +#ifdef MIPS64_OCTEON +#ifdef MULTIPROCESSOR + { DDB_ADD_CMD("nmi", db_mach_nmi_cmd, CS_NOREPEAT, + "Send NMI to processor", + "cpu#", NULL) }, +#endif + { DDB_ADD_CMD("reset", db_mach_reset_cmd, CS_NOREPEAT, + "Initiate hardware reset", + NULL, NULL) }, +#endif { DDB_ADD_CMD(NULL, NULL, 0, NULL,NULL,NULL) } }; #endif
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:36:15 UTC 2015 Modified Files: src/sys/arch/mips/mips: genassym.cf Log Message: Backout last change. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mips/mips/genassym.cf 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/genassym.cf diff -u src/sys/arch/mips/mips/genassym.cf:1.56 src/sys/arch/mips/mips/genassym.cf:1.57 --- src/sys/arch/mips/mips/genassym.cf:1.56 Sat Jun 6 04:34:57 2015 +++ src/sys/arch/mips/mips/genassym.cf Sat Jun 6 04:36:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.56 2015/06/06 04:34:57 matt Exp $ +# $NetBSD: genassym.cf,v 1.57 2015/06/06 04:36:15 matt Exp $ # # Copyright (c) 1992, 1993 # The Regents of the University of California. All rights reserved. @@ -284,7 +284,6 @@ define CPU_INFO_IDEPTH offsetof(struct define CPU_INFO_CURLWP offsetof(struct cpu_info, ci_curlwp) define CPU_INFO_IDLELWP offsetof(struct cpu_info, ci_data.cpu_idlelwp) define CPU_INFO_EV_TLBMISSES offsetof(struct cpu_info, ci_ev_tlbmisses.ev_count) -define CPU_INFO_NMI_STACK offsetof(struct cpu_info, ci_xnext) define CPU_INFO_PMAP_SEG0TAB offsetof(struct cpu_info, ci_pmap_seg0tab) ifdef _LP64 define CPU_INFO_PMAP_SEGTAB offsetof(struct cpu_info, ci_pmap_segtab)
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:34:57 UTC 2015 Modified Files: src/sys/arch/mips/mips: genassym.cf Log Message: Add IPI_WDOG To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mips/mips/genassym.cf 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/genassym.cf diff -u src/sys/arch/mips/mips/genassym.cf:1.55 src/sys/arch/mips/mips/genassym.cf:1.56 --- src/sys/arch/mips/mips/genassym.cf:1.55 Tue Jun 2 05:10:57 2015 +++ src/sys/arch/mips/mips/genassym.cf Sat Jun 6 04:34:57 2015 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.55 2015/06/02 05:10:57 matt Exp $ +# $NetBSD: genassym.cf,v 1.56 2015/06/06 04:34:57 matt Exp $ # # Copyright (c) 1992, 1993 # The Regents of the University of California. All rights reserved. @@ -284,6 +284,7 @@ define CPU_INFO_IDEPTH offsetof(struct define CPU_INFO_CURLWP offsetof(struct cpu_info, ci_curlwp) define CPU_INFO_IDLELWP offsetof(struct cpu_info, ci_data.cpu_idlelwp) define CPU_INFO_EV_TLBMISSES offsetof(struct cpu_info, ci_ev_tlbmisses.ev_count) +define CPU_INFO_NMI_STACK offsetof(struct cpu_info, ci_xnext) define CPU_INFO_PMAP_SEG0TAB offsetof(struct cpu_info, ci_pmap_seg0tab) ifdef _LP64 define CPU_INFO_PMAP_SEGTAB offsetof(struct cpu_info, ci_pmap_segtab)
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: matt Date: Sat Jun 6 04:34:23 UTC 2015 Modified Files: src/sys/arch/mips/conf: files.octeon Log Message: Add a wdog for octeon To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/conf/files.octeon 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/conf/files.octeon diff -u src/sys/arch/mips/conf/files.octeon:1.3 src/sys/arch/mips/conf/files.octeon:1.4 --- src/sys/arch/mips/conf/files.octeon:1.3 Mon Jun 1 22:55:12 2015 +++ src/sys/arch/mips/conf/files.octeon Sat Jun 6 04:34:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.octeon,v 1.3 2015/06/01 22:55:12 matt Exp $ +# $NetBSD: files.octeon,v 1.4 2015/06/06 04:34:23 matt Exp $ file arch/mips/mips/locore_octeon.S file arch/mips/mips/bus_dma.c @@ -25,10 +25,14 @@ file arch/mips/cavium/mainbus_octeon1p.c device cpunode { [core=-1] } attach cpunode at mainbus -file arch/mips/cavium/octeon_cpunode.c cpunode | cpu -device cpu -attach cpu at cpunode with cpunode_cpu +device cpu {} +attach cpu at cpunode with cpu_cpunode + +device wdog: sysmon_wdog +attach wdog at cpunode with wdog_cpunode + +file arch/mips/cavium/octeon_cpunode.c cpunode | cpu | wdog needs-flag # I/O Bus
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:35:14 UTC 2015 Modified Files: src/sys/arch/mips/mips: ipifuncs.c Log Message: Add IPI_WDOG To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/ipifuncs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/ipifuncs.c diff -u src/sys/arch/mips/mips/ipifuncs.c:1.8 src/sys/arch/mips/mips/ipifuncs.c:1.9 --- src/sys/arch/mips/mips/ipifuncs.c:1.8 Tue Apr 14 22:36:53 2015 +++ src/sys/arch/mips/mips/ipifuncs.c Sat Jun 6 04:35:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ipifuncs.c,v 1.8 2015/04/14 22:36:53 jmcneill Exp $ */ +/* $NetBSD: ipifuncs.c,v 1.9 2015/06/06 04:35:14 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.8 2015/04/14 22:36:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.9 2015/06/06 04:35:14 matt Exp $"); #include #include @@ -61,6 +61,7 @@ static const char * const ipi_names[] = [IPI_HALT] = "ipi halt", [IPI_XCALL] = "ipi xcall", [IPI_GENERIC] = "ipi generic", + [IPI_WDOG] = "ipi wdog", }; static void @@ -154,7 +155,7 @@ ipi_init(struct cpu_info *ci) NULL, device_xname(ci->ci_dev), "ipi"); for (size_t i = 0; i < NIPIS; i++) { - KASSERT(ipi_names[i] != NULL); + KASSERTMSG(ipi_names[i] != NULL, "%zu", i); evcnt_attach_dynamic(&ci->ci_evcnt_per_ipi[i], EVCNT_TYPE_INTR, NULL, device_xname(ci->ci_dev), ipi_names[i]); }
CVS commit: src/sys/arch/mips/cavium/dev
Module Name:src Committed By: matt Date: Sat Jun 6 04:33:45 UTC 2015 Modified Files: src/sys/arch/mips/cavium/dev: octeon_ciureg.h Log Message: Fix CUI_MBOX_{SET,CLR}1 values To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/octeon_ciureg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/cavium/dev/octeon_ciureg.h diff -u src/sys/arch/mips/cavium/dev/octeon_ciureg.h:1.2 src/sys/arch/mips/cavium/dev/octeon_ciureg.h:1.3 --- src/sys/arch/mips/cavium/dev/octeon_ciureg.h:1.2 Mon Jun 1 22:55:12 2015 +++ src/sys/arch/mips/cavium/dev/octeon_ciureg.h Sat Jun 6 04:33:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: octeon_ciureg.h,v 1.2 2015/06/01 22:55:12 matt Exp $ */ +/* $NetBSD: octeon_ciureg.h,v 1.3 2015/06/06 04:33:45 matt Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -60,9 +60,9 @@ #define CIU_PP_POKE0UINT64_C(0x000107000580) #define CIU_PP_POKE1UINT64_C(0x000107000588) #define CIU_MBOX_SET0UINT64_C(0x000107000600) -#define CIU_MBOX_SET1UINT64_C(0x000107000600) +#define CIU_MBOX_SET1UINT64_C(0x000107000608) #define CIU_MBOX_CLR0UINT64_C(0x000107000680) -#define CIU_MBOX_CLR1UINT64_C(0x000107000680) +#define CIU_MBOX_CLR1UINT64_C(0x000107000688) #define CIU_PP_RSTUINT64_C(0x000107000700) #define CIU_PP_DBGUINT64_C(0x000107000708) #define CIU_GSTOPUINT64_C(0x000107000710)
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 6 04:32:47 UTC 2015 Modified Files: src/sys/arch/mips/mips: db_disasm.c Log Message: Fix disassembly of trap-immediate instructions To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/mips/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/db_disasm.c diff -u src/sys/arch/mips/mips/db_disasm.c:1.26 src/sys/arch/mips/mips/db_disasm.c:1.27 --- src/sys/arch/mips/mips/db_disasm.c:1.26 Thu Jun 4 05:23:40 2015 +++ src/sys/arch/mips/mips/db_disasm.c Sat Jun 6 04:32:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.26 2015/06/04 05:23:40 matt Exp $ */ +/* $NetBSD: db_disasm.c,v 1.27 2015/06/06 04:32:47 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.26 2015/06/04 05:23:40 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.27 2015/06/06 04:32:47 matt Exp $"); #include #include @@ -487,6 +487,10 @@ db_disasm_insn(int insn, db_addr_t loc, case OP_REGIMM: db_printf("%s\t%s,", regimm_name[i.IType.rt], reg_name[i.IType.rs]); + if (i.IType.rt >= OP_TGEI && i.IType.rt <= OP_TNEI) { + db_printf("%d",(int16_t)i.IType.imm); + break; + } goto pr_displ; case OP_BLEZ:
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Jun 6 04:31:52 UTC 2015 Modified Files: src/sys/arch/mips/include: intr.h Log Message: Add a IPI for watchdogs. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/intr.h diff -u src/sys/arch/mips/include/intr.h:1.9 src/sys/arch/mips/include/intr.h:1.10 --- src/sys/arch/mips/include/intr.h:1.9 Mon Jun 1 22:55:12 2015 +++ src/sys/arch/mips/include/intr.h Sat Jun 6 04:31:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.9 2015/06/01 22:55:12 matt Exp $ */ +/* $NetBSD: intr.h,v 1.10 2015/06/06 04:31:52 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -75,7 +75,8 @@ #define IPI_HALT 6 /* halt cpu */ #define IPI_XCALL 7 /* xcall */ #define IPI_GENERIC 8 /* generic IPI */ -#define NIPIS 9 +#define IPI_WDOG 9 /* tickle a wdog */ +#define NIPIS 10 #ifdef __INTR_PRIVATE struct splsw {
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Jun 6 04:31:10 UTC 2015 Modified Files: src/sys/arch/mips/include: trap.h Log Message: Add missing but now defined trap types. (use define consistently) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/include/trap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/trap.h diff -u src/sys/arch/mips/include/trap.h:1.18 src/sys/arch/mips/include/trap.h:1.19 --- src/sys/arch/mips/include/trap.h:1.18 Tue Aug 16 06:58:15 2011 +++ src/sys/arch/mips/include/trap.h Sat Jun 6 04:31:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.h,v 1.18 2011/08/16 06:58:15 matt Exp $ */ +/* $NetBSD: trap.h,v 1.19 2015/06/06 04:31:10 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -43,21 +43,21 @@ * also known in trap.c for name strings */ #ifndef _MIPS_TRAP_H_ -#define _MIPS_TRAP_H_ +#define _MIPS_TRAP_H_ -#define T_INT 0 /* Interrupt pending */ -#define T_TLB_MOD 1 /* TLB modified fault */ -#define T_TLB_LD_MISS 2 /* TLB miss on load or ifetch */ -#define T_TLB_ST_MISS 3 /* TLB miss on a store */ -#define T_ADDR_ERR_LD 4 /* Address error on a load or ifetch */ -#define T_ADDR_ERR_ST 5 /* Address error on a store */ -#define T_BUS_ERR_IFETCH 6 /* Bus error on an ifetch */ -#define T_BUS_ERR_LD_ST 7 /* Bus error on a load or store */ -#define T_SYSCALL 8 /* System call */ -#define T_BREAK 9 /* Breakpoint */ -#define T_RES_INST 10 /* Reserved instruction exception */ -#define T_COP_UNUSABLE 11 /* Coprocessor unusable */ -#define T_OVFLOW 12 /* Arithmetic overflow */ +#define T_INT 0 /* Interrupt pending */ +#define T_TLB_MOD 1 /* TLB modified fault */ +#define T_TLB_LD_MISS 2 /* TLB miss on load or ifetch */ +#define T_TLB_ST_MISS 3 /* TLB miss on a store */ +#define T_ADDR_ERR_LD 4 /* Address error on a load or ifetch */ +#define T_ADDR_ERR_ST 5 /* Address error on a store */ +#define T_BUS_ERR_IFETCH 6 /* Bus error on an ifetch */ +#define T_BUS_ERR_LD_ST 7 /* Bus error on a load or store */ +#define T_SYSCALL 8 /* System call */ +#define T_BREAK 9 /* Breakpoint */ +#define T_RES_INST 10 /* Reserved instruction exception */ +#define T_COP_UNUSABLE 11 /* Coprocessor unusable */ +#define T_OVFLOW 12 /* Arithmetic overflow */ /* * Trap definitions added for r4000 port. @@ -65,9 +65,16 @@ #define T_TRAP 13 /* Trap instruction */ #define T_VCEI 14 /* Virtual coherency exception */ #define T_FPE 15 /* Floating point exception */ +#define T_NMI 16 /* Reserved so put NMI here */ +#define T_TLBRI 19 /* TLB Read-Inhibit */ +#define T_TLBXI 20 /* TLB Execute-Inhibit */ +#define T_MDMX 22 /* MDMX Unusable exception */ #define T_WATCH 23 /* Watch address reference */ +#define T_MCHECK 24 /* Machine Check exception */ +#define T_THREAD 25 /* Thread exception */ #define T_DSP 26 /* DSP exception */ -#define T_VCED 31 /* Virtual coherency data */ +#define T_CACHE 30 /* Cache Error */ +#define T_VCED 31 /* Virtual coherency data */ #define T_USER 0x20 /* user-mode flag or'ed with type */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat Jun 6 03:38:40 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h if_wmvar.h Log Message: Print NVM image version. To generate a diff of this commit: cvs rdiff -u -r1.327 -r1.328 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.327 src/sys/dev/pci/if_wm.c:1.328 --- src/sys/dev/pci/if_wm.c:1.327 Sat Jun 6 03:37:01 2015 +++ src/sys/dev/pci/if_wm.c Sat Jun 6 03:38:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.327 2015/06/06 03:37:01 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.328 2015/06/06 03:38:40 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.327 2015/06/06 03:37:01 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.328 2015/06/06 03:38:40 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -299,8 +299,10 @@ struct wm_softc { callout_t sc_tick_ch; /* tick callout */ bool sc_stopping; + int sc_nvm_ver_major; + int sc_nvm_ver_minor; int sc_nvm_addrbits; /* NVM address bits */ - unsigned int sc_nvm_wordsize; /* NVM word size */ + unsigned int sc_nvm_wordsize; /* NVM word size */ int sc_ich8_flash_base; int sc_ich8_flash_bank_size; int sc_nvm_k1_enabled; @@ -683,6 +685,7 @@ static void wm_nvm_release(struct wm_sof static int wm_nvm_is_onboard_eeprom(struct wm_softc *); static int wm_nvm_get_flash_presence_i210(struct wm_softc *); static int wm_nvm_validate_checksum(struct wm_softc *); +static void wm_nvm_version(struct wm_softc *); static int wm_nvm_read(struct wm_softc *, int, int, uint16_t *); /* @@ -1917,25 +1920,27 @@ wm_attach(device_t parent, device_t self prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags); if (sc->sc_flags & WM_F_EEPROM_INVALID) - aprint_verbose_dev(sc->sc_dev, "No EEPROM\n"); + aprint_verbose_dev(sc->sc_dev, "No EEPROM"); else { aprint_verbose_dev(sc->sc_dev, "%u words ", sc->sc_nvm_wordsize); if (sc->sc_flags & WM_F_EEPROM_INVM) - aprint_verbose("iNVM\n"); + aprint_verbose("iNVM"); else if (sc->sc_flags & WM_F_EEPROM_FLASH_HW) - aprint_verbose("FLASH(HW)\n"); + aprint_verbose("FLASH(HW)"); else if (sc->sc_flags & WM_F_EEPROM_FLASH) - aprint_verbose("FLASH\n"); + aprint_verbose("FLASH"); else { if (sc->sc_flags & WM_F_EEPROM_SPI) eetype = "SPI"; else eetype = "MicroWire"; - aprint_verbose("(%d address bits) %s EEPROM\n", + aprint_verbose("(%d address bits) %s EEPROM", sc->sc_nvm_addrbits, eetype); } } + wm_nvm_version(sc); + aprint_verbose("\n"); switch (sc->sc_type) { case WM_T_82571: @@ -8984,7 +8989,7 @@ wm_nvm_read_invm(struct wm_softc *sc, in return rv; } -/* Lock, detecting NVM type, validate checksum and read */ +/* Lock, detecting NVM type, validate checksum, version and read */ /* * wm_nvm_acquire: @@ -9181,6 +9186,79 @@ wm_nvm_validate_checksum(struct wm_softc return 0; } +static void +wm_nvm_version(struct wm_softc *sc) +{ + int major, minor; + int build = -1; + uint16_t uid0, uid1; + uint16_t nvm_data; + uint16_t off; + + wm_nvm_read(sc, NVM_OFF_IMAGE_UID1, 1, &uid1); + switch (sc->sc_type) { + case WM_T_82575: + case WM_T_82576: + case WM_T_82580: + if ((uid1 & NVM_MAJOR_MASK) != NVM_UID_VALID) { + /* Major, Minor and build in UID words */ + wm_nvm_read(sc, NVM_OFF_VERSION, 1, &nvm_data); + major = (nvm_data & NVM_MAJOR_MASK) >> NVM_MAJOR_SHIFT; + minor = (nvm_data & NVM_MINOR_MASK) >> NVM_MINOR_SHIFT; + build = nvm_data & NVM_BUILD_MASK; + goto printver; + } + break; + case WM_T_I211: + /* XXX wm_nvm_version_invm(sc); */ + return; + case WM_T_I210: + if (!wm_nvm_get_flash_presence_i210(sc)) { + /* XXX wm_nvm_version_invm(sc); */ + return; + } + /* FALLTHROUGH */ + case WM_T_I350: + case WM_T_I354: + wm_nvm_read(sc, NVM_OFF_COMB_VER_PTR, 1, &off); + /* Option ROM Version */ + if ((off != 0x) && (off != 0x)) { + off += NVM_COMBO_VER_OFF; + wm_nvm_read(sc, off + 1, 1, &uid1); + wm_nvm_read(sc, off, 1, &uid0); + if ((uid0 != 0) && (uid0 != 0x) + && (uid1 != 0) && (uid1 != 0x)) { +aprint_verbose(" option ROM Version %d.%d.%d", +uid0 >> 8, +(uid0 << 8) | (uid1 >> 8), +uid1 & 0x00ff); + } + } + break; + default: + /* XXX Should we print PXE boot agent's version? */ + return; + } + wm_nvm_read(sc, NVM_OFF_VERSION, 1, &nvm_data); + major = (nvm_data & NVM_MAJOR_MASK) >> NVM_MAJOR_SHIFT; + if ((nvm_data & 0x0f00) == 0x) + minor = nvm_data & 0x00ff; + else + minor = (nvm_data & NVM_MINOR_MASK) >> NVM_MINOR_SHIFT; + /* Decimal */ + minor = (minor / 16) * 10
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat Jun 6 03:37:02 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h if_wmvar.h Log Message: Revert previos. Sorry, I committed in another working directory... To generate a diff of this commit: cvs rdiff -u -r1.326 -r1.327 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.326 src/sys/dev/pci/if_wm.c:1.327 --- src/sys/dev/pci/if_wm.c:1.326 Sat Jun 6 03:33:37 2015 +++ src/sys/dev/pci/if_wm.c Sat Jun 6 03:37:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.326 2015/06/06 03:33:37 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.327 2015/06/06 03:37:01 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.326 2015/06/06 03:33:37 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.327 2015/06/06 03:37:01 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -135,8 +135,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #include #include -// #define WM_DEBUG 1 - #ifdef WM_DEBUG #define WM_DEBUG_LINK 0x01 #define WM_DEBUG_TX 0x02 @@ -144,12 +142,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #define WM_DEBUG_GMII 0x08 #define WM_DEBUG_MANAGE 0x10 #define WM_DEBUG_NVM 0x20 -#if 0 int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII | WM_DEBUG_MANAGE | WM_DEBUG_NVM; -#else -int wm_debug = WM_DEBUG_LINK; -#endif #define DPRINTF(x, y) if (wm_debug & (x)) printf y #else @@ -305,10 +299,8 @@ struct wm_softc { callout_t sc_tick_ch; /* tick callout */ bool sc_stopping; - int sc_nvm_ver_major; - int sc_nvm_ver_minor; int sc_nvm_addrbits; /* NVM address bits */ - unsigned int sc_nvm_wordsize; /* NVM word size */ + unsigned int sc_nvm_wordsize; /* NVM word size */ int sc_ich8_flash_base; int sc_ich8_flash_bank_size; int sc_nvm_k1_enabled; @@ -634,8 +626,6 @@ static int wm_gmii_hv_readreg(device_t, static void wm_gmii_hv_writereg(device_t, int, int, int); static int wm_gmii_82580_readreg(device_t, int, int); static void wm_gmii_82580_writereg(device_t, int, int, int); -static int wm_gmii_gs40g_readreg(device_t, int, int); -static void wm_gmii_gs40g_writereg(device_t, int, int, int); static void wm_gmii_statchg(struct ifnet *); static int wm_kmrn_readreg(struct wm_softc *, int); static void wm_kmrn_writereg(struct wm_softc *, int, int); @@ -687,13 +677,12 @@ static int wm_nvm_read_ich8(struct wm_so /* iNVM */ static int wm_nvm_read_word_invm(struct wm_softc *, uint16_t, uint16_t *); static int wm_nvm_read_invm(struct wm_softc *, int, int, uint16_t *); -/* Lock, detecting NVM type, validate checksum, version and read */ +/* Lock, detecting NVM type, validate checksum and read */ static int wm_nvm_acquire(struct wm_softc *); static void wm_nvm_release(struct wm_softc *); static int wm_nvm_is_onboard_eeprom(struct wm_softc *); static int wm_nvm_get_flash_presence_i210(struct wm_softc *); static int wm_nvm_validate_checksum(struct wm_softc *); -static void wm_nvm_version(struct wm_softc *); static int wm_nvm_read(struct wm_softc *, int, int, uint16_t *); /* @@ -747,10 +736,6 @@ static void wm_set_mdio_slow_mode_hv(str static void wm_configure_k1_ich8lan(struct wm_softc *, int); static void wm_reset_init_script_82575(struct wm_softc *); static void wm_reset_mdicnfg_82580(struct wm_softc *); -static void wm_pll_workaround_i210(struct wm_softc *); -#ifdef WM_DEBUG -static void wm_regdump(struct wm_softc *); -#endif CFATTACH_DECL3_NEW(wm, sizeof(struct wm_softc), wm_match, wm_attach, wm_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); @@ -1756,15 +1741,6 @@ wm_attach(device_t parent, device_t self || (sc->sc_type == WM_T_PCH_LPT)) wm_smbustopci(sc); -#ifdef WM_DEBUG - wm_regdump(sc); -#endif - - printf("%s: SC_CTRL(0) = %08x (%s)\n", device_xname(sc->sc_dev), - sc->sc_ctrl, __func__); - sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL); - printf("%s: SC_CTRL(1) = %08x (%s)\n", device_xname(sc->sc_dev), - sc->sc_ctrl, __func__); /* Reset the chip to a known state. */ wm_reset(sc); @@ -1941,45 +1917,25 @@ wm_attach(device_t parent, device_t self prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags); if (sc->sc_flags & WM_F_EEPROM_INVALID) - aprint_verbose_dev(sc->sc_dev, "No EEPROM"); + aprint_verbose_dev(sc->sc_dev, "No EEPROM\n"); else { aprint_verbose_dev(sc->sc_dev, "%u words ", sc->sc_nvm_wordsize); if (sc->sc_flags & WM_F_EEPROM_INVM) - aprint_verbose("iNVM"); + aprint_verbose("iNVM\n"); else if (sc->sc_flags & WM_F_EEPROM_FLASH_HW) - aprint_verbose("FLASH(HW)"); + aprint_verbose("FLASH(HW)\n"); else if (sc->s
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat Jun 6 03:33:37 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h if_wmvar.h Log Message: Print NVM image version. To generate a diff of this commit: cvs rdiff -u -r1.325 -r1.326 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.325 src/sys/dev/pci/if_wm.c:1.326 --- src/sys/dev/pci/if_wm.c:1.325 Tue Jun 2 14:19:26 2015 +++ src/sys/dev/pci/if_wm.c Sat Jun 6 03:33:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.325 2015/06/02 14:19:26 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.326 2015/06/06 03:33:37 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.325 2015/06/02 14:19:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.326 2015/06/06 03:33:37 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -135,6 +135,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #include #include +// #define WM_DEBUG 1 + #ifdef WM_DEBUG #define WM_DEBUG_LINK 0x01 #define WM_DEBUG_TX 0x02 @@ -142,8 +144,12 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #define WM_DEBUG_GMII 0x08 #define WM_DEBUG_MANAGE 0x10 #define WM_DEBUG_NVM 0x20 +#if 0 int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII | WM_DEBUG_MANAGE | WM_DEBUG_NVM; +#else +int wm_debug = WM_DEBUG_LINK; +#endif #define DPRINTF(x, y) if (wm_debug & (x)) printf y #else @@ -299,8 +305,10 @@ struct wm_softc { callout_t sc_tick_ch; /* tick callout */ bool sc_stopping; + int sc_nvm_ver_major; + int sc_nvm_ver_minor; int sc_nvm_addrbits; /* NVM address bits */ - unsigned int sc_nvm_wordsize; /* NVM word size */ + unsigned int sc_nvm_wordsize; /* NVM word size */ int sc_ich8_flash_base; int sc_ich8_flash_bank_size; int sc_nvm_k1_enabled; @@ -626,6 +634,8 @@ static int wm_gmii_hv_readreg(device_t, static void wm_gmii_hv_writereg(device_t, int, int, int); static int wm_gmii_82580_readreg(device_t, int, int); static void wm_gmii_82580_writereg(device_t, int, int, int); +static int wm_gmii_gs40g_readreg(device_t, int, int); +static void wm_gmii_gs40g_writereg(device_t, int, int, int); static void wm_gmii_statchg(struct ifnet *); static int wm_kmrn_readreg(struct wm_softc *, int); static void wm_kmrn_writereg(struct wm_softc *, int, int); @@ -677,12 +687,13 @@ static int wm_nvm_read_ich8(struct wm_so /* iNVM */ static int wm_nvm_read_word_invm(struct wm_softc *, uint16_t, uint16_t *); static int wm_nvm_read_invm(struct wm_softc *, int, int, uint16_t *); -/* Lock, detecting NVM type, validate checksum and read */ +/* Lock, detecting NVM type, validate checksum, version and read */ static int wm_nvm_acquire(struct wm_softc *); static void wm_nvm_release(struct wm_softc *); static int wm_nvm_is_onboard_eeprom(struct wm_softc *); static int wm_nvm_get_flash_presence_i210(struct wm_softc *); static int wm_nvm_validate_checksum(struct wm_softc *); +static void wm_nvm_version(struct wm_softc *); static int wm_nvm_read(struct wm_softc *, int, int, uint16_t *); /* @@ -736,6 +747,10 @@ static void wm_set_mdio_slow_mode_hv(str static void wm_configure_k1_ich8lan(struct wm_softc *, int); static void wm_reset_init_script_82575(struct wm_softc *); static void wm_reset_mdicnfg_82580(struct wm_softc *); +static void wm_pll_workaround_i210(struct wm_softc *); +#ifdef WM_DEBUG +static void wm_regdump(struct wm_softc *); +#endif CFATTACH_DECL3_NEW(wm, sizeof(struct wm_softc), wm_match, wm_attach, wm_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); @@ -1741,6 +1756,15 @@ wm_attach(device_t parent, device_t self || (sc->sc_type == WM_T_PCH_LPT)) wm_smbustopci(sc); +#ifdef WM_DEBUG + wm_regdump(sc); +#endif + + printf("%s: SC_CTRL(0) = %08x (%s)\n", device_xname(sc->sc_dev), + sc->sc_ctrl, __func__); + sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL); + printf("%s: SC_CTRL(1) = %08x (%s)\n", device_xname(sc->sc_dev), + sc->sc_ctrl, __func__); /* Reset the chip to a known state. */ wm_reset(sc); @@ -1917,25 +1941,45 @@ wm_attach(device_t parent, device_t self prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags); if (sc->sc_flags & WM_F_EEPROM_INVALID) - aprint_verbose_dev(sc->sc_dev, "No EEPROM\n"); + aprint_verbose_dev(sc->sc_dev, "No EEPROM"); else { aprint_verbose_dev(sc->sc_dev, "%u words ", sc->sc_nvm_wordsize); if (sc->sc_flags & WM_F_EEPROM_INVM) - aprint_verbose("iNVM\n"); + aprint_verbose("iNVM"); else if (sc->sc_flags & WM_F_EEPROM_FLASH_HW) - aprint_verbose("FLASH(HW)\n"); + aprint_verbose("FLASH(HW)"); else if (sc->sc_flags & WM_F_EEPROM_FLASH) - aprint_ve
CVS commit: src/external/bsd/openpam/dist/doc/man
Module Name:src Committed By: joerg Date: Fri Jun 5 20:41:46 UTC 2015 Modified Files: src/external/bsd/openpam/dist/doc/man: pam_strerror.3 Log Message: Fix sentence. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/openpam/dist/doc/man/pam_strerror.3 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/openpam/dist/doc/man/pam_strerror.3 diff -u src/external/bsd/openpam/dist/doc/man/pam_strerror.3:1.6 src/external/bsd/openpam/dist/doc/man/pam_strerror.3:1.7 --- src/external/bsd/openpam/dist/doc/man/pam_strerror.3:1.6 Fri Oct 24 18:25:14 2014 +++ src/external/bsd/openpam/dist/doc/man/pam_strerror.3 Fri Jun 5 20:41:46 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: pam_strerror.3,v 1.6 2014/10/24 18:25:14 christos Exp $ +.\" $NetBSD: pam_strerror.3,v 1.7 2015/06/05 20:41:46 joerg Exp $ .\" .\" Generated from pam_strerror.c by gendoc.pl .\" Id: pam_strerror.c 648 2013-03-05 17:54:27Z des @@ -21,9 +21,8 @@ The function returns a pointer to a string containing a textual description of the error indicated by the .Fa error_number -argument. -argument, in the context of the PAM transaction described by the -.Fa pamh +argument in the context of the PAM transaction described by the +.Fa pamh . The .Fa pamh argument is ignored.
CVS commit: src/external/bsd/openpam/dist/doc/man
Module Name:src Committed By: joerg Date: Fri Jun 5 20:35:10 UTC 2015 Modified Files: src/external/bsd/openpam/dist/doc/man: openpam.3 pam.3 Log Message: Switch .Nm to match file name. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/openpam/dist/doc/man/openpam.3 \ src/external/bsd/openpam/dist/doc/man/pam.3 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/openpam/dist/doc/man/openpam.3 diff -u src/external/bsd/openpam/dist/doc/man/openpam.3:1.8 src/external/bsd/openpam/dist/doc/man/openpam.3:1.9 --- src/external/bsd/openpam/dist/doc/man/openpam.3:1.8 Fri Oct 24 18:25:14 2014 +++ src/external/bsd/openpam/dist/doc/man/openpam.3 Fri Jun 5 20:35:10 2015 @@ -1,11 +1,11 @@ -.\" $NetBSD: openpam.3,v 1.8 2014/10/24 18:25:14 christos Exp $ +.\" $NetBSD: openpam.3,v 1.9 2015/06/05 20:35:10 joerg Exp $ .\" .\" Generated by gendoc.pl .Dd September 12, 2014 .Dt OPENPAM 3 .Os .Sh NAME -.Nm pam +.Nm openpam .Nd Pluggable Authentication Modules Library .Sh LIBRARY .Lb libpam Index: src/external/bsd/openpam/dist/doc/man/pam.3 diff -u src/external/bsd/openpam/dist/doc/man/pam.3:1.8 src/external/bsd/openpam/dist/doc/man/pam.3:1.9 --- src/external/bsd/openpam/dist/doc/man/pam.3:1.8 Fri Oct 24 18:25:14 2014 +++ src/external/bsd/openpam/dist/doc/man/pam.3 Fri Jun 5 20:35:10 2015 @@ -1,11 +1,11 @@ -.\" $NetBSD: pam.3,v 1.8 2014/10/24 18:25:14 christos Exp $ +.\" $NetBSD: pam.3,v 1.9 2015/06/05 20:35:10 joerg Exp $ .\" .\" Generated by gendoc.pl .Dd September 12, 2014 .Dt PAM 3 .Os .Sh NAME -.Nm openpam +.Nm pam .Nd Pluggable Authentication Modules Library .Sh LIBRARY .Lb libpam
CVS commit: src/lib/libintl
Module Name:src Committed By: christos Date: Fri Jun 5 20:12:56 UTC 2015 Modified Files: src/lib/libintl: libintl.h Log Message: Make the cpp protection macro name consistent with other headers. Fix problems caused by the new macros introduced for gnu gettext compatibility. XXX: Must be a better way... To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libintl/libintl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libintl/libintl.h diff -u src/lib/libintl/libintl.h:1.5 src/lib/libintl/libintl.h:1.6 --- src/lib/libintl/libintl.h:1.5 Fri May 29 08:26:28 2015 +++ src/lib/libintl/libintl.h Fri Jun 5 16:12:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: libintl.h,v 1.5 2015/05/29 12:26:28 christos Exp $ */ +/* $NetBSD: libintl.h,v 1.6 2015/06/05 20:12:56 christos Exp $ */ /*- * Copyright (c) 2000 Citrus Project, @@ -26,11 +26,17 @@ * SUCH DAMAGE. */ -#ifndef __LIBINTL_H_DEFINED__ -#define __LIBINTL_H_DEFINED__ +#ifndef _LIBINTL_H_ +#define _LIBINTL_H_ #include +#ifndef _LIBGETTEXT_H +/* + * Avoid defining these if the GNU gettext compatibility header includes + * us, since it re-defines those unconditionally and creates inline functions + * for some of them. This is horrible. + */ #define pgettext_expr(msgctxt, msgid) pgettext((msgctxt), (msgid)) #define dpggettext_expr(domainname, msgctxt, msgid) \ dpgettext((domainname), (msgctxt), (msgid)) @@ -42,6 +48,7 @@ dnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n)) #define dcnpgettext_expr(domainname, msgctxt, msgid1, msgid2, n, category) \ dcnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n), (category)) +#endif __BEGIN_DECLS char *gettext(const char *) __format_arg(1); @@ -72,4 +79,4 @@ char *bindtextdomain(const char *, const char *bind_textdomain_codeset(const char *, const char *); __END_DECLS -#endif /*__LIBINTL_H_DEFINED__*/ +#endif /* _LIBINTL_H_ */
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Fri Jun 5 19:58:01 UTC 2015 Modified Files: src/sys/arch/mips/mips: spl.S Log Message: Only need KX/SX if _LP64 && MULTIPROCESSOR since cpu_info's are always in KSEG0 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/mips/spl.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/spl.S diff -u src/sys/arch/mips/mips/spl.S:1.6 src/sys/arch/mips/mips/spl.S:1.7 --- src/sys/arch/mips/mips/spl.S:1.6 Fri Jun 5 16:16:18 2015 +++ src/sys/arch/mips/mips/spl.S Fri Jun 5 19:58:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.6 2015/06/05 16:16:18 matt Exp $ */ +/* $NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include -RCSID("$NetBSD: spl.S,v 1.6 2015/06/05 16:16:18 matt Exp $") +RCSID("$NetBSD: spl.S,v 1.7 2015/06/05 19:58:01 matt Exp $") #include "assym.h" @@ -86,7 +86,7 @@ _splraise: or v1, MIPS_INT_MASK # enable all interrupts xor a0, v1# disable ipl's masked bits DYNAMIC_STATUS_MASK(a0,v0) # machine dependent masking -#ifdef _LP64 +#if defined(_LP64) && MULTIPROCESSOR li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts #else @@ -143,12 +143,7 @@ STATIC_XLEAF(_splsw_splx_noprof) # does or v1, MIPS_INT_MASK # set all INT bits xor v1, a1# clear any bits for this IPL DYNAMIC_STATUS_MASK(v1,t0) # machine dependent masking -#ifdef _LP64 - li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on - mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts -#else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts -#endif COP0_SYNC INT_S a0, CPU_INFO_CPL(a3) ## save IPL in cpu_info (KSEG0) mtc0 v1, MIPS_COP_0_STATUS ## store back @@ -176,19 +171,15 @@ END(_splsw_splx) STATIC_LEAF(_splsw_spl0) INT_L v1, _C_LABEL(ipl_sr_map) + 4*IPL_NONE PTR_L a3, L_CPU(MIPS_CURLWP) - xor v1, MIPS_INT_MASK | MIPS_SR_INT_IE # invert and or in IE + or v1, MIPS_SR_INT_IE # mask sure interrupts are on + xor v1, MIPS_INT_MASK # invert mtc0 zero, MIPS_COP_0_CAUSE # clear SOFT_INT bits COP0_SYNC mfc0 a0, MIPS_COP_0_STATUS NOP_L # load delay or v0, a0, v1 DYNAMIC_STATUS_MASK(v0,t0) # machine dependent masking -#ifdef _LP64 - li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on - mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts -#else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts -#endif COP0_SYNC #if IPL_NONE == 0 INT_S zero, CPU_INFO_CPL(a3) ## set ipl to 0
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Fri Jun 5 17:05:13 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: 814 & 825 To generate a diff of this commit: cvs rdiff -u -r1.1.2.324 -r1.1.2.325 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.324 src/doc/CHANGES-7.0:1.1.2.325 --- src/doc/CHANGES-7.0:1.1.2.324 Fri Jun 5 16:46:05 2015 +++ src/doc/CHANGES-7.0 Fri Jun 5 17:05:12 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.324 2015/06/05 16:46:05 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.325 2015/06/05 17:05:12 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -31759,3 +31759,17 @@ tools/llvm/Makefile1.20 Update LLVM to 3.6.1. [joerg, ticket #824] +sys/arch/i386/conf/GENERIC 1.1125 +sys/arch/i386/conf/XEN3_DOM0 1.95 +sys/arch/i386/conf/XEN3_DOMU 1.67 + + Disable COMPAT_FREEBSD. The implementation is poor, not well + tested and almost irrelevant. People who need it (for tw_cli + for example) can still recompile their kernels with this option. + [maxv, ticket #814] + +share/mk/bsd.lib.mk1.358 via patch + + Fix MKDEBUG vs parallel builds. + [riz, ticket #825] +
CVS commit: [netbsd-7] src/share/mk
Module Name:src Committed By: snj Date: Fri Jun 5 17:03:43 UTC 2015 Modified Files: src/share/mk [netbsd-7]: bsd.lib.mk Log Message: Pull up following revision(s) (requested by riz in ticket #825): share/mk/bsd.lib.mk: revision 1.358 via patch fix MKDEBUG vs parallel builds. split the creation of the final .so file from the main link of it, and use the main file as the input for both the .so output and the .so.debug file. for MKDEBUG builds we now: (a) create the (new) .so.full file (d) create the .so.debug file (c) create the (installable) .so file for other builds, we simply use the same rule for (a) to create (c). this stops the .so.debug rule from modifying the .so rule's target and leading to mayhem. see this thread for more details: http://mail-index.netbsd.org/tech-toolchain/2015/06/03/msg002616.html To generate a diff of this commit: cvs rdiff -u -r1.355 -r1.355.2.1 src/share/mk/bsd.lib.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.lib.mk diff -u src/share/mk/bsd.lib.mk:1.355 src/share/mk/bsd.lib.mk:1.355.2.1 --- src/share/mk/bsd.lib.mk:1.355 Fri Jun 13 01:17:45 2014 +++ src/share/mk/bsd.lib.mk Fri Jun 5 17:03:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.355 2014/06/13 01:17:45 mrg Exp $ +# $NetBSD: bsd.lib.mk,v 1.355.2.1 2015/06/05 17:03:43 snj Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -406,6 +406,7 @@ _LIB.ln:=llib-l${LIB}.ln _LIB.so:=${_LIB}.so _LIB.so.major:=${_LIB}.so.${SHLIB_MAJOR} _LIB.so.full:=${_LIB}.so.${SHLIB_FULLVERSION} +_LIB.so.link:=${_LIB}.so.${SHLIB_FULLVERSION}.link .if ${MKDEBUG} != "no" _LIB.so.debug:=${_LIB.so.full}.debug .endif @@ -614,8 +615,25 @@ LIBCC:= ${CC} _LDADD.${_LIB}= ${LDADD} ${LDADD.${_LIB}} _LDFLAGS.${_LIB}= ${LDFLAGS} ${LDFLAGS.${_LIB}} -${_LIB.so.full}: ${SOLIB} ${DPADD} ${DPLIBC} \ -${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} +_MAINLIBDEPS= ${SOLIB} ${DPADD} ${DPLIBC} \ + ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} + +.if defined(_LIB.so.debug) +${_LIB.so.debug}: ${_LIB.so.link} + ${_MKTARGET_CREATE} + ( ${OBJCOPY} --only-keep-debug \ + ${_LIB.so.link} ${_LIB.so.debug} \ + ) || (rm -f ${.TARGET}; false) +${_LIB.so.full}: ${_LIB.so.link} ${_LIB.so.debug} + ${_MKTARGET_CREATE} + ( ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \ + --add-gnu-debuglink=${_LIB.so.debug} \ + ${_LIB.so.link} ${_LIB.so.full} \ + ) || (rm -f ${.TARGET}; false) +${_LIB.so.link}: ${_MAINLIBDEPS} +.else # aka no MKDEBUG +${_LIB.so.full}: ${_MAINLIBDEPS} +.endif ${_MKTARGET_BUILD} rm -f ${.TARGET} ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} \ @@ -625,6 +643,8 @@ ${_LIB.so.full}: ${SOLIB} ${DPADD} ${DPL # We don't use INSTALL_SYMLINK here because this is just # happening inside the build directory/objdir. XXX Why does # this spend so much effort on libraries that aren't live??? XXX +# XXX Also creates dead symlinks until the .full rule runs +# above and creates the main link .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \ "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}" ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so.major}.tmp @@ -636,15 +656,6 @@ ${_LIB.so.full}: ${SOLIB} ${DPADD} ${DPL ${OBJCOPY} -R .ident ${.TARGET} .endif -.if defined(_LIB.so.debug) -${_LIB.so.debug}: ${_LIB.so.full} - ${_MKTARGET_CREATE} - ( ${OBJCOPY} --only-keep-debug ${_LIB.so.full} ${_LIB.so.debug} \ - && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \ - --add-gnu-debuglink=${_LIB.so.debug} ${_LIB.so.full} \ - ) || (rm -f ${.TARGET}; false) -.endif - .if !empty(LOBJS) # { LLIBS?= -lc ${_LIB.ln}: ${LOBJS}
CVS commit: [netbsd-7] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Fri Jun 5 16:52:39 UTC 2015 Modified Files: src/sys/arch/i386/conf [netbsd-7]: GENERIC XEN3_DOM0 XEN3_DOMU Log Message: Pull up following revision(s) (requested by maxv in ticket #814): sys/arch/i386/conf/GENERIC: revision 1.1125 sys/arch/i386/conf/XEN3_DOM0: revision 1.95 sys/arch/i386/conf/XEN3_DOMU: revision 1.67 Disable COMPAT_FREEBSD. The implementation is poor, not well tested and almost irrelevant. People who need it (for tw_cli for example) can still recompile their kernels with this option. Discussed on tech-kern@ To generate a diff of this commit: cvs rdiff -u -r1.1107.2.7 -r1.1107.2.8 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.85.2.3 -r1.85.2.4 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.59.2.3 -r1.59.2.4 src/sys/arch/i386/conf/XEN3_DOMU 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/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1107.2.7 src/sys/arch/i386/conf/GENERIC:1.1107.2.8 --- src/sys/arch/i386/conf/GENERIC:1.1107.2.7 Fri May 15 03:44:18 2015 +++ src/sys/arch/i386/conf/GENERIC Fri Jun 5 16:52:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1107.2.7 2015/05/15 03:44:18 snj Exp $ +# $NetBSD: GENERIC,v 1.1107.2.8 2015/06/05 16:52:39 snj Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1107.2.7 $" +#ident "GENERIC-$Revision: 1.1107.2.8 $" maxusers 64 # estimated number of users @@ -147,7 +147,7 @@ options COMPAT_OSSAUDIO # OSS (Voxware) options COMPAT_SVR4 # binary compatibility with SVR4 options COMPAT_IBCS2 # binary compatibility with SCO and ISC options COMPAT_LINUX # binary compatibility with Linux -options COMPAT_FREEBSD # binary compatibility with FreeBSD +#options COMPAT_FREEBSD # binary compatibility with FreeBSD #options COMPAT_NDIS # NDIS network driver options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.85.2.3 src/sys/arch/i386/conf/XEN3_DOM0:1.85.2.4 --- src/sys/arch/i386/conf/XEN3_DOM0:1.85.2.3 Tue Nov 18 19:05:30 2014 +++ src/sys/arch/i386/conf/XEN3_DOM0 Fri Jun 5 16:52:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.85.2.3 2014/11/18 19:05:30 snj Exp $ +# $NetBSD: XEN3_DOM0,v 1.85.2.4 2015/06/05 16:52:39 snj Exp $ # # XEN3_0: Xen 3.0 domain0 kernel @@ -97,7 +97,7 @@ options COMPAT_OSSAUDIO # OSS (Voxware) options COMPAT_SVR4 # binary compatibility with SVR4 options COMPAT_IBCS2 # binary compatibility with SCO and ISC options COMPAT_LINUX # binary compatibility with Linux -options COMPAT_FREEBSD # binary compatibility with FreeBSD +#options COMPAT_FREEBSD # binary compatibility with FreeBSD options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Wedge support Index: src/sys/arch/i386/conf/XEN3_DOMU diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.59.2.3 src/sys/arch/i386/conf/XEN3_DOMU:1.59.2.4 --- src/sys/arch/i386/conf/XEN3_DOMU:1.59.2.3 Tue Nov 18 19:05:30 2014 +++ src/sys/arch/i386/conf/XEN3_DOMU Fri Jun 5 16:52:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.59.2.3 2014/11/18 19:05:30 snj Exp $ +# $NetBSD: XEN3_DOMU,v 1.59.2.4 2015/06/05 16:52:39 snj Exp $ include "arch/xen/conf/std.xen" @@ -83,7 +83,7 @@ options COMPAT_OSSAUDIO # OSS (Voxware) options COMPAT_SVR4 # binary compatibility with SVR4 options COMPAT_IBCS2 # binary compatibility with SCO and ISC options COMPAT_LINUX # binary compatibility with Linux -options COMPAT_FREEBSD # binary compatibility with FreeBSD +#options COMPAT_FREEBSD # binary compatibility with FreeBSD options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. # Wedge support
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Fri Jun 5 16:46:05 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: amend 824 To generate a diff of this commit: cvs rdiff -u -r1.1.2.323 -r1.1.2.324 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.323 src/doc/CHANGES-7.0:1.1.2.324 --- src/doc/CHANGES-7.0:1.1.2.323 Thu Jun 4 20:41:19 2015 +++ src/doc/CHANGES-7.0 Fri Jun 5 16:46:05 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.323 2015/06/04 20:41:19 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.324 2015/06/05 16:46:05 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -26652,8 +26652,8 @@ external/bsd/llvm/dist/llvm/lib/CodeGen/ external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp llvm-237755 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h llvm-237755 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp llvm-237755 -external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp llvm-23775 -external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h llvm-237755 +external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp 1.1.1.3 +external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h 1.1.1.3 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm-237755 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h llvm-237755 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfException.h llvm-237755
CVS commit: src/gnu/dist/texinfo/makeinfo
Module Name:src Committed By: joerg Date: Fri Jun 5 16:44:56 UTC 2015 Modified Files: src/gnu/dist/texinfo/makeinfo: files.c Log Message: Fix operator precedence to allocate enough memory. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/gnu/dist/texinfo/makeinfo/files.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/texinfo/makeinfo/files.c diff -u src/gnu/dist/texinfo/makeinfo/files.c:1.9 src/gnu/dist/texinfo/makeinfo/files.c:1.10 --- src/gnu/dist/texinfo/makeinfo/files.c:1.9 Tue Sep 2 08:41:51 2008 +++ src/gnu/dist/texinfo/makeinfo/files.c Fri Jun 5 16:44:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.9 2008/09/02 08:41:51 christos Exp $ */ +/* $NetBSD: files.c,v 1.10 2015/06/05 16:44:56 joerg Exp $ */ /* files.c -- file-related functions for makeinfo. Id: files.c,v 1.5 2004/07/27 00:06:31 karl Exp @@ -458,8 +458,7 @@ full_pathname (char *filename) temp_home = (char *) getenv ("HOME"); result = xmalloc (strlen (&filename[1]) + 1 -+ temp_home ? strlen (temp_home) -: 0); ++ (temp_home ? strlen (temp_home) : 0)); *result = 0; if (temp_home)
CVS commit: [netbsd-7] src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter
Module Name:src Committed By: snj Date: Fri Jun 5 16:45:19 UTC 2015 Modified Files: src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter [netbsd-7]: DwarfCompileUnit.cpp DwarfCompileUnit.h Log Message: Pull up following revision(s) (requested by joerg in ticket #824): external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp: revision 1.1.1.3 external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h: revision 1.1.1.3 Update LLVM to 3.6.1. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \ src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp \ src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h 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/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp diff -u src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1.1.1.2.2.2 src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1.1.1.2.2.3 --- src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1.1.1.2.2.2 Thu Jun 4 20:19:12 2015 +++ src/external/bsd/llvm/dist/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Jun 5 16:45:19 2015 @@ -1,1481 +1,71 @@ -//===-- llvm/CodeGen/DwarfCompileUnit.cpp - Dwarf Compile Unit ===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===--===// -// -// This file contains support for constructing a dwarf compile unit. -// -//===--===// - -#define DEBUG_TYPE "dwarfdebug" - #include "DwarfCompileUnit.h" -#include "DwarfAccelTable.h" -#include "DwarfDebug.h" -#include "llvm/ADT/APFloat.h" -#include "llvm/DIBuilder.h" -#include "llvm/IR/Constants.h" +#include "DwarfExpression.h" +#include "llvm/CodeGen/MachineFunction.h" #include "llvm/IR/DataLayout.h" +#include "llvm/IR/GlobalValue.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Instructions.h" -#include "llvm/MC/MCSection.h" +#include "llvm/IR/Instruction.h" +#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCStreamer.h" -#include "llvm/Target/Mangler.h" #include "llvm/Target/TargetFrameLowering.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetLoweringObjectFile.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/Target/TargetSubtargetInfo.h" -using namespace llvm; - -/// CompileUnit - Compile unit constructor. -CompileUnit::CompileUnit(unsigned UID, DIE *D, DICompileUnit Node, - AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU) -: UniqueID(UID), Node(Node), CUDie(D), Asm(A), DD(DW), DU(DWU), - IndexTyDie(0), DebugInfoOffset(0) { - DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1); - insertDIE(Node, D); -} - -/// ~CompileUnit - Destructor for compile unit. -CompileUnit::~CompileUnit() { - for (unsigned j = 0, M = DIEBlocks.size(); j < M; ++j) -DIEBlocks[j]->~DIEBlock(); -} - -/// createDIEEntry - Creates a new DIEEntry to be a proxy for a debug -/// information entry. -DIEEntry *CompileUnit::createDIEEntry(DIE *Entry) { - DIEEntry *Value = new (DIEValueAllocator) DIEEntry(Entry); - return Value; -} - -/// getDefaultLowerBound - Return the default lower bound for an array. If the -/// DWARF version doesn't handle the language, return -1. -int64_t CompileUnit::getDefaultLowerBound() const { - switch (getLanguage()) { - default: -break; - - case dwarf::DW_LANG_C89: - case dwarf::DW_LANG_C99: - case dwarf::DW_LANG_C: - case dwarf::DW_LANG_C_plus_plus: - case dwarf::DW_LANG_ObjC: - case dwarf::DW_LANG_ObjC_plus_plus: -return 0; - - case dwarf::DW_LANG_Fortran77: - case dwarf::DW_LANG_Fortran90: - case dwarf::DW_LANG_Fortran95: -return 1; - - // The languages below have valid values only if the DWARF version >= 4. - case dwarf::DW_LANG_Java: - case dwarf::DW_LANG_Python: - case dwarf::DW_LANG_UPC: - case dwarf::DW_LANG_D: -if (dwarf::DWARF_VERSION >= 4) - return 0; -break; - - case dwarf::DW_LANG_Ada83: - case dwarf::DW_LANG_Ada95: - case dwarf::DW_LANG_Cobol74: - case dwarf::DW_LANG_Cobol85: - case dwarf::DW_LANG_Modula2: - case dwarf::DW_LANG_Pascal83: - case dwarf::DW_LANG_PLI: -if (dwarf::DWARF_VERSION >= 4) - return 1; -break; - } - - return -1; -} +namespace llvm { -/// Check whether the DIE for this MDNode can be shared across CUs. -static bool isShareableAcrossCUs(DIDescriptor D) { - // When the MDNode can be part of the type system, the DIE can be - // shared across CUs. - return D.isType() || - (D
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Fri Jun 5 16:16:18 UTC 2015 Modified Files: src/sys/arch/mips/mips: spl.S Log Message: Make sure KX/UX stay on in 64-bit kernels so deferencing the lwp to get the cpu_info doesn't cause a fault. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/mips/spl.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/spl.S diff -u src/sys/arch/mips/mips/spl.S:1.5 src/sys/arch/mips/mips/spl.S:1.6 --- src/sys/arch/mips/mips/spl.S:1.5 Wed Apr 6 05:48:35 2011 +++ src/sys/arch/mips/mips/spl.S Fri Jun 5 16:16:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.5 2011/04/06 05:48:35 matt Exp $ */ +/* $NetBSD: spl.S,v 1.6 2015/06/05 16:16:18 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include -RCSID("$NetBSD: spl.S,v 1.5 2011/04/06 05:48:35 matt Exp $") +RCSID("$NetBSD: spl.S,v 1.6 2015/06/05 16:16:18 matt Exp $") #include "assym.h" @@ -86,7 +86,12 @@ _splraise: or v1, MIPS_INT_MASK # enable all interrupts xor a0, v1# disable ipl's masked bits DYNAMIC_STATUS_MASK(a0,v0) # machine dependent masking +#ifdef _LP64 + li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on + mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts +#else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts +#endif COP0_SYNC #ifdef MULTIPROCESSOR PTR_L a3, L_CPU(MIPS_CURLWP) ## make sure curcpu is correct @@ -138,7 +143,12 @@ STATIC_XLEAF(_splsw_splx_noprof) # does or v1, MIPS_INT_MASK # set all INT bits xor v1, a1# clear any bits for this IPL DYNAMIC_STATUS_MASK(v1,t0) # machine dependent masking +#ifdef _LP64 + li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on + mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts +#else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts +#endif COP0_SYNC INT_S a0, CPU_INFO_CPL(a3) ## save IPL in cpu_info (KSEG0) mtc0 v1, MIPS_COP_0_STATUS ## store back @@ -173,7 +183,12 @@ STATIC_LEAF(_splsw_spl0) NOP_L # load delay or v0, a0, v1 DYNAMIC_STATUS_MASK(v0,t0) # machine dependent masking +#ifdef _LP64 + li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on + mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts +#else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts +#endif COP0_SYNC #if IPL_NONE == 0 INT_S zero, CPU_INFO_CPL(a3) ## set ipl to 0
CVS commit: src/sys/arch/vax/boot/boot
Module Name:src Committed By: martin Date: Fri Jun 5 16:01:55 UTC 2015 Modified Files: src/sys/arch/vax/boot/boot: boot.c Log Message: Close the file descriptor used for loading before jumping to the kernel. Pointed out by Felix Deichmann on port-vax. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/vax/boot/boot/boot.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/vax/boot/boot/boot.c diff -u src/sys/arch/vax/boot/boot/boot.c:1.32 src/sys/arch/vax/boot/boot/boot.c:1.33 --- src/sys/arch/vax/boot/boot/boot.c:1.32 Sat Nov 9 18:31:53 2013 +++ src/sys/arch/vax/boot/boot/boot.c Fri Jun 5 16:01:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.32 2013/11/09 18:31:53 christos Exp $ */ +/* $NetBSD: boot.c,v 1.33 2015/06/05 16:01:55 martin Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -93,7 +93,7 @@ struct rpb bootrpb; void Xmain(void) { - int j, nu; + int j, nu, fd; u_long marks[MARK_MAX]; extern const char bootprog_rev[]; @@ -133,14 +133,14 @@ Xmain(void) int fileindex; for (fileindex = 0; filelist[fileindex].name[0] != '\0'; fileindex++) { - int err; errno = 0; if (!filelist[fileindex].quiet) printf("> boot %s\n", filelist[fileindex].name); marks[MARK_START] = 0; - err = loadfile(filelist[fileindex].name, marks, + fd = loadfile(filelist[fileindex].name, marks, LOAD_KERNEL|COUNT_KERNEL); - if (err == 0) { + if (fd >= 0) { +close(fd); machdep_start((char *)marks[MARK_ENTRY], marks[MARK_NSYM], (void *)marks[MARK_START], @@ -197,7 +197,7 @@ void boot(char *arg) { char *fn = "netbsd"; - int howto, fl, err; + int howto, fl, fd; u_long marks[MARK_MAX]; if (arg) { @@ -230,8 +230,9 @@ fail: printf("usage: boot [filename] [ } load: marks[MARK_START] = 0; - err = loadfile(fn, marks, LOAD_KERNEL|COUNT_KERNEL); - if (err == 0) { + fd = loadfile(fn, marks, LOAD_KERNEL|COUNT_KERNEL); + if (fd >= 0) { + close(fd); machdep_start((char *)marks[MARK_ENTRY], marks[MARK_NSYM], (void *)marks[MARK_START],
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: roy Date: Fri Jun 5 15:41:59 UTC 2015 Modified Files: src/usr.sbin/rtadvd: advcap.c if.c rrenum.c rtadvd.c Log Message: Use %m in syslog(3) instead of %s strerror(3). To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/rtadvd/advcap.c cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/rtadvd/if.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/rtadvd/rrenum.c cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/rtadvd/rtadvd.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/rtadvd/advcap.c diff -u src/usr.sbin/rtadvd/advcap.c:1.14 src/usr.sbin/rtadvd/advcap.c:1.15 --- src/usr.sbin/rtadvd/advcap.c:1.14 Thu Dec 13 15:36:35 2012 +++ src/usr.sbin/rtadvd/advcap.c Fri Jun 5 15:41:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: advcap.c,v 1.14 2012/12/13 15:36:35 roy Exp $ */ +/* $NetBSD: advcap.c,v 1.15 2015/06/05 15:41:59 roy Exp $ */ /* $KAME: advcap.c,v 1.11 2003/05/19 09:46:50 keiichi Exp $ */ /* @@ -136,8 +136,7 @@ getent(char *bp, char *name, char *cp) tf = open(RM = cp, O_RDONLY); } if (tf < 0) { - syslog(LOG_INFO, - "<%s> open: %s", __func__, strerror(errno)); + syslog(LOG_INFO, "<%s> open: %m", __func__); return (-2); } for (;;) { Index: src/usr.sbin/rtadvd/if.c diff -u src/usr.sbin/rtadvd/if.c:1.22 src/usr.sbin/rtadvd/if.c:1.23 --- src/usr.sbin/rtadvd/if.c:1.22 Thu Dec 13 15:36:36 2012 +++ src/usr.sbin/rtadvd/if.c Fri Jun 5 15:41:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.22 2012/12/13 15:36:36 roy Exp $ */ +/* $NetBSD: if.c,v 1.23 2015/06/05 15:41:59 roy Exp $ */ /* $KAME: if.c,v 1.36 2004/11/30 22:32:01 suz Exp $ */ /* @@ -134,8 +134,7 @@ if_getflags(int ifindex, int oifflags) int s; if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - syslog(LOG_ERR, "<%s> socket: %s", __func__, - strerror(errno)); + syslog(LOG_ERR, "<%s> socket: %m", __func__); return (oifflags & ~IFF_UP); } Index: src/usr.sbin/rtadvd/rrenum.c diff -u src/usr.sbin/rtadvd/rrenum.c:1.17 src/usr.sbin/rtadvd/rrenum.c:1.18 --- src/usr.sbin/rtadvd/rrenum.c:1.17 Fri Jun 5 14:09:20 2015 +++ src/usr.sbin/rtadvd/rrenum.c Fri Jun 5 15:41:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rrenum.c,v 1.17 2015/06/05 14:09:20 roy Exp $ */ +/* $NetBSD: rrenum.c,v 1.18 2015/06/05 15:41:59 roy Exp $ */ /* $KAME: rrenum.c,v 1.14 2004/06/14 05:36:00 itojun Exp $ */ /* @@ -165,8 +165,7 @@ do_use_prefix(int len, struct rr_pco_mat irr->irr_useprefix.sin6_addr = in6addr_any; if (ioctl(s, rrcmd2pco[rpm->rpm_code], irr) < 0 && errno != EADDRNOTAVAIL) - syslog(LOG_ERR, "<%s> ioctl: %s", __func__, - strerror(errno)); + syslog(LOG_ERR, "<%s> ioctl: %m", __func__); return; } @@ -197,8 +196,7 @@ do_use_prefix(int len, struct rr_pco_mat if (ioctl(s, rrcmd2pco[rpm->rpm_code], irr) < 0 && errno != EADDRNOTAVAIL) - syslog(LOG_ERR, "<%s> ioctl: %s", __func__, - strerror(errno)); + syslog(LOG_ERR, "<%s> ioctl: %m", __func__); /* very adhoc: should be rewritten */ if (rpm->rpm_code == RPM_PCO_CHANGE && @@ -252,8 +250,7 @@ do_pco(struct icmp6_router_renum *rr, in return 1; if (s == -1 && (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - syslog(LOG_ERR, "<%s> socket: %s", __func__, - strerror(errno)); + syslog(LOG_ERR, "<%s> socket: %m", __func__); exit(1); } @@ -283,8 +280,7 @@ do_pco(struct icmp6_router_renum *rr, in if (errno == ENXIO) return 0; else if (errno) { - syslog(LOG_ERR, "<%s> if_indextoname: %s", __func__, - strerror(errno)); + syslog(LOG_ERR, "<%s> if_indextoname: %m", __func__); return 1; } return 0; Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.48 src/usr.sbin/rtadvd/rtadvd.c:1.49 --- src/usr.sbin/rtadvd/rtadvd.c:1.48 Fri Jun 5 14:15:41 2015 +++ src/usr.sbin/rtadvd/rtadvd.c Fri Jun 5 15:41:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.48 2015/06/05 14:15:41 roy Exp $ */ +/* $NetBSD: rtadvd.c,v 1.49 2015/06/05 15:41:59 roy Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -336,8 +336,7 @@ main(int argc, char *argv[]) { /* EINTR would occur upon SIGUSR1 for status dump */ if (errno != EINTR) -syslog(LOG_ERR, "<%s> poll: %s", -__func__, strerror(errno)); +syslog(LOG_ERR, "<%s> poll: %m", __func__); continue; } if (i == 0) /* timeout */ @@ -1500,7 +1499,7 @@ sock_open(void) CMSG_SPACE(sizeof(int)); rcvcmsgbuf = malloc(rcvcmsgbuflen); if (rcvcmsgbuf == NULL) { - syslog(LOG_ERR, "<%s> not enough core", __func__); + syslog(LOG_ERR, "<%s> malloc: %m", __func__); exit(1); } @@ -1508,13 +1507,12 @@ sock_open(void) CMSG_SPACE(sizeof(int)); sndcmsgbuf = malloc(sndcmsgbuflen); if (sndcmsgbuf == NULL) { - syslog(LOG_ERR, "<%s> not enough core", __func__); + syslog(LOG_ERR, "<%s> malloc: %m", __func__); exit(1); } if ((sock = socket(
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: roy Date: Fri Jun 5 14:15:41 UTC 2015 Modified Files: src/usr.sbin/rtadvd: rtadvd.c Log Message: Set the hoplimit of 255 as specified in RFC 4861 section 4.2 using the IPV6_MULTICAST_HOPS socket option rather than using CMSG when constructing each message. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/rtadvd/rtadvd.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/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.47 src/usr.sbin/rtadvd/rtadvd.c:1.48 --- src/usr.sbin/rtadvd/rtadvd.c:1.47 Fri Jun 5 14:09:20 2015 +++ src/usr.sbin/rtadvd/rtadvd.c Fri Jun 5 14:15:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.47 2015/06/05 14:09:20 roy Exp $ */ +/* $NetBSD: rtadvd.c,v 1.48 2015/06/05 14:15:41 roy Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -1518,6 +1518,14 @@ sock_open(void) exit(1); } + /* RFC 4861 Section 4.2 */ + on = 255; + if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "<%s> IPV6_MULTICAST_HOPS: %m", __func__); + exit(1); + } + /* specify to tell receiving interface */ on = 1; #ifdef IPV6_RECVPKTINFO @@ -1693,17 +1701,6 @@ ra_output(struct rainfo *rai) memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*XXX*/ pi->ipi6_ifindex = rai->ifindex; - /* specify the hop limit of the packet */ - { - int hoplimit = 255; - - cm = CMSG_NXTHDR(&sndmhdr, cm); - cm->cmsg_level = IPPROTO_IPV6; - cm->cmsg_type = IPV6_HOPLIMIT; - cm->cmsg_len = CMSG_LEN(sizeof(int)); - memcpy(CMSG_DATA(cm), &hoplimit, sizeof(int)); - } - syslog(LOG_DEBUG, "<%s> send RA on %s, # of waitings = %d", __func__, rai->ifname, rai->waiting);
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: roy Date: Fri Jun 5 14:09:21 UTC 2015 Modified Files: src/usr.sbin/rtadvd: config.c dump.c rrenum.c rtadvd.c rtadvd.h timer.c timer.h Log Message: Use clock_gettime(2) instead of gettimeofday(2) so we can use a monotonic clock rather than the wall clock. Use timespec rather than timeval structs to make this transition easier. Kill custom timeval comparison functions in favor of timespeccmp(3). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/rtadvd/config.c cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/rtadvd/dump.c \ src/usr.sbin/rtadvd/timer.c cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/rtadvd/rrenum.c cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/rtadvd/rtadvd.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/rtadvd/rtadvd.h cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/rtadvd/timer.h 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/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.33 src/usr.sbin/rtadvd/config.c:1.34 --- src/usr.sbin/rtadvd/config.c:1.33 Thu Jan 24 19:55:28 2013 +++ src/usr.sbin/rtadvd/config.c Fri Jun 5 14:09:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.33 2013/01/24 19:55:28 christos Exp $ */ +/* $NetBSD: config.c,v 1.34 2015/06/05 14:09:20 roy Exp $ */ /* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */ /* @@ -444,8 +444,8 @@ getconfig(const char *intface, int exith makeentry(entbuf, sizeof(entbuf), i, "vltimedecr"); if (agetflag(entbuf)) { - struct timeval now; - gettimeofday(&now, 0); + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); pfx->vltimeexpire = now.tv_sec + pfx->validlifetime; } @@ -464,8 +464,8 @@ getconfig(const char *intface, int exith makeentry(entbuf, sizeof(entbuf), i, "pltimedecr"); if (agetflag(entbuf)) { - struct timeval now; - gettimeofday(&now, 0); + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); pfx->pltimeexpire = now.tv_sec + pfx->preflifetime; } @@ -958,7 +958,7 @@ void invalidate_prefix(struct prefix *prefix) { char ntopbuf[INET6_ADDRSTRLEN]; - struct timeval timo; + struct timespec timo; struct rainfo *rai = prefix->rainfo; if (prefix->timer) { /* sanity check */ @@ -981,7 +981,7 @@ invalidate_prefix(struct prefix *prefix) delete_prefix(prefix); } timo.tv_sec = prefix_timo; - timo.tv_usec = 0; + timo.tv_nsec = 0; rtadvd_set_timer(&timo, prefix->timer); } @@ -1200,7 +1200,7 @@ make_packet(struct rainfo *rainfo) TAILQ_FOREACH(pfx, &rainfo->prefix, next) { uint32_t vltime, pltime; - struct timeval now; + struct timespec now; CHECKLEN(sizeof(*ndopt_pi)); ndopt_pi = (struct nd_opt_prefix_info *)buf; @@ -1218,7 +1218,7 @@ make_packet(struct rainfo *rainfo) vltime = 0; else { if (pfx->vltimeexpire || pfx->pltimeexpire) -gettimeofday(&now, NULL); +clock_gettime(CLOCK_MONOTONIC, &now); if (pfx->vltimeexpire == 0) vltime = pfx->validlifetime; else Index: src/usr.sbin/rtadvd/dump.c diff -u src/usr.sbin/rtadvd/dump.c:1.11 src/usr.sbin/rtadvd/dump.c:1.12 --- src/usr.sbin/rtadvd/dump.c:1.11 Tue Jul 9 09:34:59 2013 +++ src/usr.sbin/rtadvd/dump.c Fri Jun 5 14:09:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dump.c,v 1.11 2013/07/09 09:34:59 roy Exp $ */ +/* $NetBSD: dump.c,v 1.12 2015/06/05 14:09:20 roy Exp $ */ /* $KAME: dump.c,v 1.34 2004/06/14 05:35:59 itojun Exp $ */ /* @@ -99,9 +99,9 @@ if_dump(void) struct dnssl_domain *dnsd; char *p, len; char prefixbuf[INET6_ADDRSTRLEN]; - struct timeval now; + struct timespec now; - gettimeofday(&now, NULL); /* XXX: unused in most cases */ + clock_gettime(CLOCK_MONOTONIC, &now); /* XXX: unused in most cases */ TAILQ_FOREACH(rai, &ralist, next) { fprintf(fp, "%s:\n", rai->ifname); @@ -198,7 +198,7 @@ if_dump(void) pfx->autoconfflg ? "A" : "", ""); if (pfx->timer) { -struct timeval *rest; +struct timespec *rest; rest = rtadvd_timer_rest(pfx->timer); if (rest) { /* XXX: what if not? */ Index: src/usr.sbin/rtadvd/timer.c diff -u src/usr.sbin/rtadvd/timer.c:1.11 src/usr.sbin/rtadvd/timer.c:1.12 --- src/usr.sbin/rtadvd/timer.c:1.11 Thu Dec 13 15:36:36 2012 +++ src/usr.sbin/rtadvd/timer.c Fri Jun 5 14:09:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: timer.c,v 1.11 2012/12/13 15:36:36 roy Exp $ */ +/* $NetBSD: timer.c,v 1.12 2015/06/05 14:09:20 roy Exp $ */ /* $KAME: timer.c,v 1.11 2005/04/14 06:22:35 suz Exp $ */ /* @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -41,13 +42,8 @@ #include "timer.h" struct rtadvd_timer_head_t ra_timer = TAILQ_HEAD_INITIALIZER(ra_timer); - -#define MILLION 100 -#define TIMEVAL_EQUAL(t1,t2) ((t1)->tv_sec == (t2)->tv_sec &&\ - (t1)->tv_usec == (t2)->tv_usec) - -static struct timeval tm_limit = {0x7fff, 0x7fff}; -static struct timeval tm_max; +static struct timespec tm_
CVS commit: src/usr.sbin/installboot
Module Name:src Committed By: mlelstv Date: Fri Jun 5 07:44:39 UTC 2015 Modified Files: src/usr.sbin/installboot: installboot.c Log Message: Can't use getfsspecname (and thus wedge names) while building tools. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/installboot/installboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/installboot/installboot.c diff -u src/usr.sbin/installboot/installboot.c:1.37 src/usr.sbin/installboot/installboot.c:1.38 --- src/usr.sbin/installboot/installboot.c:1.37 Fri Jun 5 05:03:21 2015 +++ src/usr.sbin/installboot/installboot.c Fri Jun 5 07:44:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.37 2015/06/05 05:03:21 mlelstv Exp $ */ +/* $NetBSD: installboot.c,v 1.38 2015/06/05 07:44:39 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if !defined(__lint) -__RCSID("$NetBSD: installboot.c,v 1.37 2015/06/05 05:03:21 mlelstv Exp $"); +__RCSID("$NetBSD: installboot.c,v 1.38 2015/06/05 07:44:39 mlelstv Exp $"); #endif /* !__lint */ #include @@ -51,7 +51,9 @@ __RCSID("$NetBSD: installboot.c,v 1.37 2 #include #include #include +#if !HAVE_NBTOOL_CONFIG_H #include +#endif #include "installboot.h" @@ -107,9 +109,11 @@ main(int argc, char *argv[]) char *p; const char *op; ib_flags unsupported_flags; +#if !HAVE_NBTOOL_CONFIG_H char specname[MAXPATHLEN]; char rawname[MAXPATHLEN]; const char *special, *raw; +#endif setprogname(argv[0]); params = &installboot_params; @@ -234,12 +238,16 @@ main(int argc, char *argv[]) params->stage2 = argv[2]; } +#if !HAVE_NBTOOL_CONFIG_H special = getfsspecname(specname, sizeof(specname), argv[0]); raw = getdiskrawname(rawname, sizeof(rawname), special); if (raw != NULL) special = raw; - params->filesystem = special; +#else + params->filesystem = argv[0]; +#endif + if (params->flags & IB_NOWRITE) { op = "only"; mode = O_RDONLY;
CVS commit: src/usr.bin/make
Module Name:src Committed By: wiz Date: Fri Jun 5 07:33:40 UTC 2015 Modified Files: src/usr.bin/make: make.1 Log Message: Drop trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.248 -r1.249 src/usr.bin/make/make.1 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/make/make.1 diff -u src/usr.bin/make/make.1:1.248 src/usr.bin/make/make.1:1.249 --- src/usr.bin/make/make.1:1.248 Fri Jun 5 05:37:42 2015 +++ src/usr.bin/make/make.1 Fri Jun 5 07:33:40 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.248 2015/06/05 05:37:42 sjg Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -2009,7 +2009,7 @@ If it exists, .Nm will .Xr chdir 2 -to it and update the value of +to it and update the value of .Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence.
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Fri Jun 5 07:04:46 UTC 2015 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Print the Revision ID regster (verbose) To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/arm/arm32/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.108 src/sys/arch/arm/arm32/cpu.c:1.109 --- src/sys/arch/arm/arm32/cpu.c:1.108 Sun May 17 06:30:06 2015 +++ src/sys/arch/arm/arm32/cpu.c Fri Jun 5 07:04:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.108 2015/05/17 06:30:06 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.109 2015/06/05 07:04:46 skrll Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.108 2015/05/17 06:30:06 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.109 2015/06/05 07:04:46 skrll Exp $"); #include #include @@ -840,6 +840,7 @@ identify_features(device_t dv) cpu_processor_features[0] = armreg_pfr0_read(); cpu_processor_features[1] = armreg_pfr1_read(); + aprint_verbose_dev(dv, "revidr: %#x\n", armreg_revidr_read()); #ifdef MULTIPROCESSOR aprint_verbose_dev(dv, "mpidr: %#x\n", armreg_mpidr_read()); #endif