CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Jul 12 03:49:32 UTC 2016 Modified Files: src/sys/arch/mips/mips: bus_space_alignstride_chipdep.c Log Message: Use mips3_ld To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 \ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.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/bus_space_alignstride_chipdep.c diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.26 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.27 --- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.26 Mon Jul 11 19:05:02 2016 +++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c Tue Jul 12 03:49:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.26 2016/07/11 19:05:02 skrll Exp $ */ +/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.27 2016/07/12 03:49:32 matt Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.26 2016/07/11 19:05:02 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.27 2016/07/12 03:49:32 matt Exp $"); #ifdef CHIP_EXTENT #include @@ -727,7 +727,7 @@ __BS(read_2)(void *v, bus_space_handle_t const int shift = (h & (CHIP_ACCESS_SIZE - 1)) * 8; h &= ~((bus_space_handle_t)(CHIP_ACCESS_SIZE - 1)); #if CHIP_ACCESS_SIZE == 8 - const CHIP_TYPE val = mips_ld(h); + const CHIP_TYPE val = mips3_ld(h); #elif CHIP_ACCESS_SIZE == 4 const CHIP_TYPE val = mips_lwu(h); #else
CVS commit: src
Module Name:src Committed By: knakahara Date: Tue Jul 12 03:39:55 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile pci.9 pci_intr.9 pci_msi.9 Log Message: fix missing mans about pci.9 and pci_intr.9 - add links from pci.9 and pci_intr.9 to pci_msi.9 - add pci_intr_establish_xname entries - add pci_intr_setattr entries - add pci_intr_type descriptions - fix pci_*_alloc functions' argument type pointed out by nonaka@n.o. To generate a diff of this commit: cvs rdiff -u -r1.2050 -r1.2051 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.395 -r1.396 src/share/man/man9/Makefile cvs rdiff -u -r1.43 -r1.44 src/share/man/man9/pci.9 cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/pci_intr.9 cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/pci_msi.9 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.2050 src/distrib/sets/lists/comp/mi:1.2051 --- src/distrib/sets/lists/comp/mi:1.2050 Tue Jul 5 21:13:12 2016 +++ src/distrib/sets/lists/comp/mi Tue Jul 12 03:39:55 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2050 2016/07/05 21:13:12 christos Exp $ +# $NetBSD: mi,v 1.2051 2016/07/12 03:39:55 knakahara Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -10593,9 +10593,11 @@ ./usr/share/man/cat9/pci_intr_disestablish.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_distribute.0 comp-obsolete obsolete ./usr/share/man/cat9/pci_intr_establish.0 comp-sys-catman .cat +./usr/share/man/cat9/pci_intr_establish_xname.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_evcnt.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_map.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_release.0 comp-sys-catman .cat +./usr/share/man/cat9/pci_intr_setattr.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_string.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intr_type.0 comp-sys-catman .cat ./usr/share/man/cat9/pci_intx_alloc.0 comp-sys-catman .cat @@ -17741,9 +17743,11 @@ ./usr/share/man/html9/pci_intr_disestablish.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_distribute.html comp-obsolete obsolete ./usr/share/man/html9/pci_intr_establish.html comp-sys-htmlman html +./usr/share/man/html9/pci_intr_establish_xname.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_evcnt.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_map.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_release.html comp-sys-htmlman html +./usr/share/man/html9/pci_intr_setattr.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_string.html comp-sys-htmlman html ./usr/share/man/html9/pci_intr_type.html comp-sys-htmlman html ./usr/share/man/html9/pci_intx_alloc.html comp-sys-htmlman html @@ -25049,9 +25053,11 @@ ./usr/share/man/man9/pci_intr_disestablish.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_distribute.9 comp-obsolete obsolete ./usr/share/man/man9/pci_intr_establish.9 comp-sys-man .man +./usr/share/man/man9/pci_intr_establish_xname.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_evcnt.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_map.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_release.9 comp-sys-man .man +./usr/share/man/man9/pci_intr_setattr.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_string.9 comp-sys-man .man ./usr/share/man/man9/pci_intr_type.9 comp-sys-man .man ./usr/share/man/man9/pci_intx_alloc.9 comp-sys-man .man Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.395 src/share/man/man9/Makefile:1.396 --- src/share/man/man9/Makefile:1.395 Sat Apr 9 06:21:16 2016 +++ src/share/man/man9/Makefile Tue Jul 12 03:39:55 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.395 2016/04/09 06:21:16 riastradh Exp $ +# $NetBSD: Makefile,v 1.396 2016/07/12 03:39:55 knakahara Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -567,7 +567,9 @@ MLINKS+=pci.9 pci_conf_read.9 \ pci.9 pci_intr_string.9 \ pci.9 pci_intr_evcnt.9 \ pci.9 pci_intr_establish.9 \ + pci.9 pci_intr_establish_xname.9 \ pci.9 pci_intr_disestablish.9 \ + pci.9 pci_intr_setattr.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_set_powerstate.9 \ pci.9 pci_vpd_read.9 \ Index: src/share/man/man9/pci.9 diff -u src/share/man/man9/pci.9:1.43 src/share/man/man9/pci.9:1.44 --- src/share/man/man9/pci.9:1.43 Sun Oct 4 12:10:51 2015 +++ src/share/man/man9/pci.9 Tue Jul 12 03:39:55 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci.9,v 1.43 2015/10/04 12:10:51 wiz Exp $ +.\" $NetBSD: pci.9,v 1.44 2016/07/12 03:39:55 knakahara Exp $ .\" .\" Copyright (c) 2001, 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Jul 12 03:34:50 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Fix busted #if/endif To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 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.70 src/sys/arch/mips/mips/mipsX_subr.S:1.71 --- src/sys/arch/mips/mips/mipsX_subr.S:1.70 Mon Jul 11 19:00:04 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Tue Jul 12 03:34:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.70 2016/07/11 19:00:04 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.71 2016/07/12 03:34:50 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -1874,7 +1874,7 @@ LEAF_NOPROFILE(MIPSX(kern_tlb_invalid_ex PTR_L k1, (k1) # load segtab address beqz k1, _C_LABEL(MIPSX(kern_gen_exception)) nop -#endif +#endif /* _LP64 */ #ifdef MIPSNNR2 _EXT k0, k0, SEGSHIFT, SEGLENGTH _INS k1, k0, PTR_SCALESHIFT, SEGLENGTH @@ -1900,7 +1900,6 @@ LEAF_NOPROFILE(MIPSX(kern_tlb_invalid_ex mfc0 k0, MIPS_COP_0_TLB_INDEX MFC0_HAZARD -#endif bltz k0, _C_LABEL(MIPSX(kern_gen_exception)) # ASSERT(TLB entry exists) nop # - delay slot - @@ -2000,6 +1999,7 @@ MIPSX(kern_tlbi_odd): #endif eret END(MIPSX(kern_tlb_invalid_exception)) +#endif /* (PGSHIFT & 1) == 0 */ /* * Mark where code entered from exception hander jumptable
CVS commit: src/sys/arch/mips/cavium/dev
Module Name:src Committed By: matt Date: Tue Jul 12 03:34:25 UTC 2016 Modified Files: src/sys/arch/mips/cavium/dev: octeon_dwctwo.c Log Message: Use mips_lwu To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/cavium/dev/octeon_dwctwo.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/cavium/dev/octeon_dwctwo.c diff -u src/sys/arch/mips/cavium/dev/octeon_dwctwo.c:1.8 src/sys/arch/mips/cavium/dev/octeon_dwctwo.c:1.9 --- src/sys/arch/mips/cavium/dev/octeon_dwctwo.c:1.8 Mon Jul 11 16:15:35 2016 +++ src/sys/arch/mips/cavium/dev/octeon_dwctwo.c Tue Jul 12 03:34:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: octeon_dwctwo.c,v 1.8 2016/07/11 16:15:35 matt Exp $ */ +/* $NetBSD: octeon_dwctwo.c,v 1.9 2016/07/12 03:34:25 matt Exp $ */ /* * Copyright (c) 2015 Masao Uebayashi@@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.8 2016/07/11 16:15:35 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.9 2016/07/12 03:34:25 matt Exp $"); #include "opt_octeon.h" #include "opt_usb.h" @@ -321,7 +321,7 @@ octeon_dwc2_rd_4(void *v, bus_space_hand { /* dwc2 uses little-endian addressing */ - return mips_lw((h + off) ^ 4); + return mips_lwu((h + off) ^ 4); } static void
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: knakahara Date: Mon Jul 11 23:09:35 UTC 2016 Modified Files: src/sys/arch/x86/x86: intr.c Log Message: should use strlcpy instead of strncpy. pointed out by dholland@n.o. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.93 src/sys/arch/x86/x86/intr.c:1.94 --- src/sys/arch/x86/x86/intr.c:1.93 Mon Jul 11 09:42:20 2016 +++ src/sys/arch/x86/x86/intr.c Mon Jul 11 23:09:34 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $ */ +/* $NetBSD: intr.c,v 1.94 2016/07/11 23:09:34 knakahara Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.94 2016/07/11 23:09:34 knakahara Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -2103,7 +2103,7 @@ interrupt_get_devname(const char *intrid } slot = ih->ih_slot; isp = ih->ih_cpu->ci_isources[slot]; - strncpy(buf, isp->is_xname, len); + strlcpy(buf, isp->is_xname, len); out: mutex_exit(_lock);
CVS commit: src/sys/arch/mips
Module Name:src Committed By: matt Date: Mon Jul 11 23:06:54 UTC 2016 Modified Files: src/sys/arch/mips/conf: files.mips src/sys/arch/mips/include: cache_r4k.h src/sys/arch/mips/mips: cache.c cache_r4k.c Log Message: Use sdcache routines. Remove old cache support. Switch to new cache routines. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/conf/files.mips cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/include/cache_r4k.h cvs rdiff -u -r1.51 -r1.52 src/sys/arch/mips/mips/cache.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/mips/cache_r4k.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/conf/files.mips diff -u src/sys/arch/mips/conf/files.mips:1.74 src/sys/arch/mips/conf/files.mips:1.75 --- src/sys/arch/mips/conf/files.mips:1.74 Mon Jul 11 16:15:35 2016 +++ src/sys/arch/mips/conf/files.mips Mon Jul 11 23:06:53 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.mips,v 1.74 2016/07/11 16:15:35 matt Exp $ +# $NetBSD: files.mips,v 1.75 2016/07/11 23:06:53 matt Exp $ # defflag opt_cputype.h NOFPU FPEMUL @@ -77,12 +77,12 @@ file arch/mips/mips/cache_octeon.c mips file arch/mips/mips/cache_mipsNN.c mips32|mips32r2|mips64|mips64r2 file arch/mips/mips/cache_r4k_pcache16.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 file arch/mips/mips/cache_r4k_pcache32.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 -file arch/mips/mips/cache_r4k_pcache64.S mips32|mips32r2|mips64|mips64r2 -file arch/mips/mips/cache_r4k_pcache128.S mips32|mips32r2|mips64|mips64r2 -#file arch/mips/mips/cache_r4k_scache16.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 -#file arch/mips/mips/cache_r4k_scache32.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 -#file arch/mips/mips/cache_r4k_scache64.S mips32|mips32r2|mips64|mips64r2 -#file arch/mips/mips/cache_r4k_scache128.S mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_pcache64.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_pcache128.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_scache16.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_scache32.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_scache64.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 +file arch/mips/mips/cache_r4k_scache128.S mips3|mips4|mips32|mips32r2|mips64|mips64r2 file arch/mips/mips/mips_fputrap.c !nofpu | fpemul file arch/mips/mips/mips_emul.c Index: src/sys/arch/mips/include/cache_r4k.h diff -u src/sys/arch/mips/include/cache_r4k.h:1.13 src/sys/arch/mips/include/cache_r4k.h:1.14 --- src/sys/arch/mips/include/cache_r4k.h:1.13 Mon Jul 11 19:06:33 2016 +++ src/sys/arch/mips/include/cache_r4k.h Mon Jul 11 23:06:54 2016 @@ -57,6 +57,7 @@ #if !defined(_LOCORE) +#if 1 /* * cache_r4k_op_line: * @@ -306,49 +307,15 @@ cache_r4k_op_8lines_NN_4way(size_t n, re cache_r4k_op_8lines_NN_4way(64, (va1), (va2), (va3), (va4), (op)) #define cache_r4k_op_8lines_128_4way(va1, va2, va3, va4, op) \ cache_r4k_op_8lines_NN_4way(128, (va1), (va2), (va3), (va4), (op)) +#endif -void r4k_icache_sync_all_16(void); -void r4k_icache_sync_range_16(register_t, vsize_t); -void r4k_icache_sync_range_index_16(vaddr_t, vsize_t); - -void r4k_icache_sync_all_32(void); -void r4k_icache_sync_range_32(register_t, vsize_t); -void r4k_icache_sync_range_index_32(vaddr_t, vsize_t); - -void r4k_pdcache_wbinv_all_16(void); -void r4k_pdcache_wbinv_range_16(register_t, vsize_t); -void r4k_pdcache_wbinv_range_index_16(vaddr_t, vsize_t); - -void r4k_pdcache_inv_range_16(register_t, vsize_t); -void r4k_pdcache_wb_range_16(register_t, vsize_t); - -void r4k_pdcache_wbinv_all_32(void); -void r4k_pdcache_wbinv_range_32(register_t, vsize_t); -void r4k_pdcache_wbinv_range_index_32(vaddr_t, vsize_t); - -void r4k_pdcache_inv_range_32(register_t, vsize_t); -void r4k_pdcache_wb_range_32(register_t, vsize_t); - -void r4k_sdcache_wbinv_all_32(void); -void r4k_sdcache_wbinv_range_32(register_t, vsize_t); -void r4k_sdcache_wbinv_range_index_32(vaddr_t, vsize_t); - -void r4k_sdcache_inv_range_32(register_t, vsize_t); -void r4k_sdcache_wb_range_32(register_t, vsize_t); - -void r4k_sdcache_wbinv_all_128(void); -void r4k_sdcache_wbinv_range_128(register_t, vsize_t); -void r4k_sdcache_wbinv_range_index_128(vaddr_t, vsize_t); - -void r4k_sdcache_inv_range_128(register_t, vsize_t); -void r4k_sdcache_wb_range_128(register_t, vsize_t); +/* cache_r4k.c */ +void r4k_icache_sync_all_generic(void); +void r4k_icache_sync_range_generic(register_t, vsize_t); +void r4k_icache_sync_range_index_generic(vaddr_t, vsize_t); +void r4k_pdcache_wbinv_all_generic(void); void r4k_sdcache_wbinv_all_generic(void); -void r4k_sdcache_wbinv_range_generic(register_t, vsize_t); -void r4k_sdcache_wbinv_range_index_generic(vaddr_t, vsize_t); - -void r4k_sdcache_inv_range_generic(register_t,
CVS commit: src/sys/arch/hpcmips/conf
Module Name:src Committed By: skrll Date: Mon Jul 11 19:36:04 UTC 2016 Modified Files: src/sys/arch/hpcmips/conf: std.hpcmips.vr41 std.lcard Log Message: Adapt to recent mips pmap changes To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hpcmips/conf/std.hpcmips.vr41 cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hpcmips/conf/std.lcard 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/hpcmips/conf/std.hpcmips.vr41 diff -u src/sys/arch/hpcmips/conf/std.hpcmips.vr41:1.11 src/sys/arch/hpcmips/conf/std.hpcmips.vr41:1.12 --- src/sys/arch/hpcmips/conf/std.hpcmips.vr41:1.11 Sun Dec 11 12:17:33 2005 +++ src/sys/arch/hpcmips/conf/std.hpcmips.vr41 Mon Jul 11 19:36:04 2016 @@ -1,11 +1,12 @@ # -# $NetBSD: std.hpcmips.vr41,v 1.11 2005/12/11 12:17:33 christos Exp $ +# $NetBSD: std.hpcmips.vr41,v 1.12 2016/07/11 19:36:04 skrll Exp $ # VR41XX common configuration. # options MIPS3 # R4000/R4400/R4600 CPUs options MIPS3_4100 # VR4100 core options VR41XX # NEC VR41xx series -options MIPS3_NO_PV_UNCACHED +options PMAP_NO_PV_UNCACHED +options ENABLE_MIPS_4KB_PAGE # # Vr4102, 4111, 4121 Index: src/sys/arch/hpcmips/conf/std.lcard diff -u src/sys/arch/hpcmips/conf/std.lcard:1.8 src/sys/arch/hpcmips/conf/std.lcard:1.9 --- src/sys/arch/hpcmips/conf/std.lcard:1.8 Sun Feb 20 07:58:13 2011 +++ src/sys/arch/hpcmips/conf/std.lcard Mon Jul 11 19:36:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: std.lcard,v 1.8 2011/02/20 07:58:13 matt Exp $ +# $NetBSD: std.lcard,v 1.9 2016/07/11 19:36:04 skrll Exp $ # standard, required hpcmips info machine hpcmips mips @@ -12,7 +12,8 @@ options MIPS3 # R4000/R4400/R4600 CPU options MIPS3_4100 # VR4100 core makeoptions CPUFLAGS="-mips3" # CPU codegen options options VR41XX # NEC VR41xx series -options MIPS3_NO_PV_UNCACHED +options PMAP_NO_PV_UNCACHED +options ENABLE_MIPS_4KB_PAGE options NO_SYMBOLSZ_ENTRY options VR4181 # NEC VR4181
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 19:17:55 UTC 2016 Modified Files: src/sys/arch/mips/mips: mips_fixup.c Log Message: Fix a comment To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/mips/mips_fixup.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_fixup.c diff -u src/sys/arch/mips/mips/mips_fixup.c:1.15 src/sys/arch/mips/mips/mips_fixup.c:1.16 --- src/sys/arch/mips/mips/mips_fixup.c:1.15 Mon Jul 11 19:17:23 2016 +++ src/sys/arch/mips/mips/mips_fixup.c Mon Jul 11 19:17:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_fixup.c,v 1.15 2016/07/11 19:17:23 skrll Exp $ */ +/* $NetBSD: mips_fixup.c,v 1.16 2016/07/11 19:17:55 skrll Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.15 2016/07/11 19:17:23 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.16 2016/07/11 19:17:55 skrll Exp $"); #include "opt_mips3_wired.h" #include "opt_multiprocessor.h" @@ -285,7 +285,7 @@ mips_fixup_addr(const uint32_t *stubp) const char *errstr = "mips"; /* * This is basically a small MIPS emulator for those instructions - * that might in a stub routine. + * that might be in a stub routine. */ for (n = 0; n < 16; n++) { const InstFmt insn = { .word = stubp[n] };
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 19:17:23 UTC 2016 Modified Files: src/sys/arch/mips/mips: mips_fixup.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/mips/mips_fixup.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_fixup.c diff -u src/sys/arch/mips/mips/mips_fixup.c:1.14 src/sys/arch/mips/mips/mips_fixup.c:1.15 --- src/sys/arch/mips/mips/mips_fixup.c:1.14 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/mips_fixup.c Mon Jul 11 19:17:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_fixup.c,v 1.14 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: mips_fixup.c,v 1.15 2016/07/11 19:17:23 skrll Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.14 2016/07/11 16:15:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.15 2016/07/11 19:17:23 skrll Exp $"); #include "opt_mips3_wired.h" #include "opt_multiprocessor.h" @@ -151,7 +151,7 @@ mips_fixup_exceptions(mips_fixup_callbac if (fixed) mips_icache_sync_range((vaddr_t)start, sizeof(start[0]) * (end - start)); - + return fixed; } @@ -287,8 +287,8 @@ mips_fixup_addr(const uint32_t *stubp) * This is basically a small MIPS emulator for those instructions * that might in a stub routine. */ - for (n = 0; n < 16; n++) { - const InstFmt insn = { .word = stubp[n] }; + for (n = 0; n < 16; n++) { + const InstFmt insn = { .word = stubp[n] }; switch (insn.IType.op) { case OP_LUI: regs[insn.IType.rt] = (int16_t)insn.IType.imm << 16; @@ -534,7 +534,7 @@ tlb_get_asid(void) void tlb_set_asid(uint32_t asid) { - (*mips_locore_jumpvec.ljv_tlb_set_asid)(asid); + (*mips_locore_jumpvec.ljv_tlb_set_asid)(asid); } void
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: maya Date: Mon Jul 11 19:16:03 UTC 2016 Modified Files: src/sys/uvm/pmap: pmap.c Log Message: Fix build by removing accidential duplicate line. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 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.15 src/sys/uvm/pmap/pmap.c:1.16 --- src/sys/uvm/pmap/pmap.c:1.15 Mon Jul 11 16:06:09 2016 +++ src/sys/uvm/pmap/pmap.c Mon Jul 11 19:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.15 2016/07/11 16:06:09 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.16 2016/07/11 19:16:03 maya Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.15 2016/07/11 16:06:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.16 2016/07/11 19:16:03 maya Exp $"); /* * Manages physical address maps. @@ -1187,7 +1187,6 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd "(RX)\0 " \ "(WX)\0 " \ "(RWX)\0"[UVM_PROTECTION(prot)*6] - UVMHIST_LOG(*histp, "(pmap=%p, va=%#"PRIxVADDR", pa=%#"PRIxPADDR, UVMHIST_LOG(*histp, "(pmap=%p, va=%#"PRIxVADDR", pa=%#"PRIxPADDR, pmap, va, pa, 0); UVMHIST_LOG(*histp, "prot=%#x%s flags=%#x%s)",
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: skrll Date: Mon Jul 11 19:06:33 UTC 2016 Modified Files: src/sys/arch/mips/include: cache_r4k.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/include/cache_r4k.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/cache_r4k.h diff -u src/sys/arch/mips/include/cache_r4k.h:1.12 src/sys/arch/mips/include/cache_r4k.h:1.13 --- src/sys/arch/mips/include/cache_r4k.h:1.12 Mon Jul 11 16:15:35 2016 +++ src/sys/arch/mips/include/cache_r4k.h Mon Jul 11 19:06:33 2016 @@ -389,5 +389,5 @@ void cache_r4k_sdcache_index_wb_inv_128( void cache_r4k_sdcache_hit_inv_128(register_t, vsize_t); void cache_r4k_sdcache_hit_wb_inv_128(register_t, vsize_t); void cache_r4k_sdcache_hit_wb_128(register_t, vsize_t); - + #endif /* !_LOCORE */
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: skrll Date: Mon Jul 11 19:05:57 UTC 2016 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Remove commented #include To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/sys/arch/mips/include/cpu.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/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.118 src/sys/arch/mips/include/cpu.h:1.119 --- src/sys/arch/mips/include/cpu.h:1.118 Mon Jul 11 16:15:35 2016 +++ src/sys/arch/mips/include/cpu.h Mon Jul 11 19:05:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.118 2016/07/11 16:15:35 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.119 2016/07/11 19:05:57 skrll Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,8 +37,6 @@ #ifndef _CPU_H_ #define _CPU_H_ -//#include - /* * Exported definitions unique to NetBSD/mips cpu support. */
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 19:05:02 UTC 2016 Modified Files: src/sys/arch/mips/mips: bus_space_alignstride_chipdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 \ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.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/bus_space_alignstride_chipdep.c diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.25 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.26 --- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.25 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c Mon Jul 11 19:05:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.25 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: bus_space_alignstride_chipdep.c,v 1.26 2016/07/11 19:05:02 skrll Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,17 +35,17 @@ * All rights reserved. * * Author: Chris G. Demetriou - * + * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or software.distribut...@cs.cmu.edu @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.25 2016/07/11 16:15:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.26 2016/07/11 19:05:02 skrll Exp $"); #ifdef CHIP_EXTENT #include @@ -120,7 +120,7 @@ __KERNEL_RCSID(0, "$NetBSD: bus_space_al #define CHIP_SWAP16(x) be16toh(x) #define CHIP_SWAP32(x) be32toh(x) #define CHIP_SWAP64(x) be64toh(x) -#define CHIP_NEED_STREAM 1 +#define CHIP_NEED_STREAM 1 #else #define CHIP_SWAP16(x) (x) #define CHIP_SWAP32(x) (x) @@ -542,7 +542,7 @@ __BS(unmap)(void *v, bus_space_handle_t #ifdef EXTENT_DEBUG extent_print(CHIP_EXTENT(v)); #endif - } + } #endif /* CHIP_EXTENT */ #if !defined(_LP64) || defined(CHIP_EXTENT) __USE(addr); @@ -680,7 +680,7 @@ __BS(mmap)(void *v, bus_addr_t addr, off if (flags & BUS_SPACE_MAP_PREFETCHABLE) { ret |= PGC_PREFETCH; } -#endif +#endif return (mips_btop(ret)); #else @@ -1178,37 +1178,37 @@ __BS(init)(bus_space_tag_t t, void *v) /* barrier */ t->bs_barrier = __BS(barrier); - + /* read (single) */ t->bs_r_1 = __BS(read_1); t->bs_r_2 = __BS(read_2); t->bs_r_4 = __BS(read_4); t->bs_r_8 = __BS(read_8); - + /* read multiple */ t->bs_rm_1 = __BS(read_multi_1); t->bs_rm_2 = __BS(read_multi_2); t->bs_rm_4 = __BS(read_multi_4); t->bs_rm_8 = __BS(read_multi_8); - + /* read region */ t->bs_rr_1 = __BS(read_region_1); t->bs_rr_2 = __BS(read_region_2); t->bs_rr_4 = __BS(read_region_4); t->bs_rr_8 = __BS(read_region_8); - + /* write (single) */ t->bs_w_1 = __BS(write_1); t->bs_w_2 = __BS(write_2); t->bs_w_4 = __BS(write_4); t->bs_w_8 = __BS(write_8); - + /* write multiple */ t->bs_wm_1 = __BS(write_multi_1); t->bs_wm_2 = __BS(write_multi_2); t->bs_wm_4 = __BS(write_multi_4); t->bs_wm_8 = __BS(write_multi_8); - + /* write region */ t->bs_wr_1 = __BS(write_region_1); t->bs_wr_2 = __BS(write_region_2); @@ -1220,7 +1220,7 @@ __BS(init)(bus_space_tag_t t, void *v) t->bs_sm_2 = __BS(set_multi_2); t->bs_sm_4 = __BS(set_multi_4); t->bs_sm_8 = __BS(set_multi_8); - + /* set region */ t->bs_sr_1 = __BS(set_region_1); t->bs_sr_2 = __BS(set_region_2); @@ -1239,31 +1239,31 @@ __BS(init)(bus_space_tag_t t, void *v) t->bs_rs_2 = __BS(read_stream_2); t->bs_rs_4 = __BS(read_stream_4); t->bs_rs_8 = __BS(read_stream_8); - + /* read multiple, stream */ t->bs_rms_1 = __BS(read_multi_stream_1); t->bs_rms_2 = __BS(read_multi_stream_2); t->bs_rms_4 = __BS(read_multi_stream_4); t->bs_rms_8 = __BS(read_multi_stream_8); - + /* read region, stream */ t->bs_rrs_1 = __BS(read_region_stream_1); t->bs_rrs_2 = __BS(read_region_stream_2); t->bs_rrs_4 = __BS(read_region_stream_4); t->bs_rrs_8 = __BS(read_region_stream_8); - + /* write (single), stream */ t->bs_ws_1 = __BS(write_stream_1); t->bs_ws_2 = __BS(write_stream_2);
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 19:01:55 UTC 2016 Modified Files: src/sys/arch/mips/mips: locore_mips1.S Log Message: Correct a comment To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/arch/mips/mips/locore_mips1.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/locore_mips1.S diff -u src/sys/arch/mips/mips/locore_mips1.S:1.88 src/sys/arch/mips/mips/locore_mips1.S:1.89 --- src/sys/arch/mips/mips/locore_mips1.S:1.88 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/locore_mips1.S Mon Jul 11 19:01:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_mips1.S,v 1.88 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: locore_mips1.S,v 1.89 2016/07/11 19:01:55 skrll Exp $ */ /* * Copyright (c) 1992, 1993 @@ -1104,7 +1104,7 @@ _C_LABEL(MIPSX(exceptionentry_end)): *-- */ LEAF(MIPSX(tlb_get_asid)) - mfc0 v0, MIPS_COP_0_TLB_HI # Write the hi reg value + mfc0 v0, MIPS_COP_0_TLB_HI # Read the hi reg value nop and v0, MIPS1_TLB_PID # mask out only the PID j ra
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 19:00:04 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 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.69 src/sys/arch/mips/mips/mipsX_subr.S:1.70 --- src/sys/arch/mips/mips/mipsX_subr.S:1.69 Mon Jul 11 18:07:33 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Mon Jul 11 19:00:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.69 2016/07/11 18:07:33 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.70 2016/07/11 19:00:04 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -361,7 +361,7 @@ * Loongson2 processors don't have separate tlbmiss and xtlbmiss handlers; * so we have to check for useg addresses in tlb_miss. The good news is that * we can use 64 intructions form tlbmiss instead of 32. - * + * * */ #ifdef MIPS3_LOONGSON2 @@ -1020,7 +1020,7 @@ NESTED_NOPROFILE(MIPSX(kern_nonmaskable_ * Clear exception level. */ li v0, ~(MIPS_SR_EXL|MIPS3_SR_NMI) - and v0, a0# zero NMI/EXL bits + and v0, a0# zero NMI/EXL bits mtc0 v0, MIPS_COP_0_STATUS # update. COP0_SYNC #ifdef MIPS3 @@ -1858,7 +1858,7 @@ LEAF_NOPROFILE(MIPSX(kern_tlb_invalid_ex PTR_LA k1, _C_LABEL(pmap_limits) PTR_L k1, PMAP_LIMITS_VIRTUAL_END(k1) PTR_SUBU k1, k0 - blez k1, _C_LABEL(MIPSX(kern_gen_exception)) # full trap processing + blez k1, _C_LABEL(MIPSX(kern_gen_exception)) # full trap processing nop PTR_LA k1, _C_LABEL(pmap_kern_segtab) #ifdef _LP64 @@ -1872,7 +1872,7 @@ LEAF_NOPROFILE(MIPSX(kern_tlb_invalid_ex #endif _MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address (again) PTR_L k1, (k1) # load segtab address - beqz k1, _C_LABEL(MIPSX(kern_gen_exception)) + beqz k1, _C_LABEL(MIPSX(kern_gen_exception)) nop #endif #ifdef MIPSNNR2 @@ -1885,7 +1885,7 @@ LEAF_NOPROFILE(MIPSX(kern_tlb_invalid_ex #endif _MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address (again) PTR_L k1, (k1) # load page table address - beqz k1, _C_LABEL(MIPSX(kern_gen_exception)) + beqz k1, _C_LABEL(MIPSX(kern_gen_exception)) nop #ifdef MIPSNNR2 _EXT k0, k0, PGSHIFT, PTPLENGTH @@ -2084,7 +2084,7 @@ 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 @@ -2710,7 +2710,7 @@ LEAF_NOPROFILE(MIPSX(cpu_switch_resume)) #if !defined(ENABLE_MIPS_16KB_PAGE) && !defined(ENABLE_MIPS_8KB_PAGE) INT_L a1, L_MD_UPTE_0(a0) # a1 = upte[0] #if (PGSHIFT & 1) - INT_ADD a2, a1, MIPS3_PG_NEXT # a2 = upper half + INT_ADD a2, a1, MIPS3_PG_NEXT # a2 = upper half #else INT_L a2, L_MD_UPTE_1(a0) # a2 = upte[1] #endif
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 18:56:41 UTC 2016 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/arch/mips/mips/mips_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/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.271 src/sys/arch/mips/mips/mips_machdep.c:1.272 --- src/sys/arch/mips/mips/mips_machdep.c:1.271 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/mips_machdep.c Mon Jul 11 18:56:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.271 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.272 2016/07/11 18:56:41 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.271 2016/07/11 16:15:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.272 2016/07/11 18:56:41 skrll Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -365,7 +365,7 @@ static const struct pridtab cputab[] = { { 0, MIPS_TX3900, MIPS_REV_TX3927, -1, CPU_ARCH_MIPS1, 64, CPU_MIPS_NO_LLSC, 0, 0, "Toshiba TX3927 CPU" }, { 0, MIPS_R5000, -1, -1, CPU_ARCH_MIPS4, 48, - CPU_MIPS_R4K_MMU | CPU_MIPS_DOUBLE_COUNT, 0, 0, + CPU_MIPS_R4K_MMU | CPU_MIPS_DOUBLE_COUNT, 0, 0, "MIPS R5000 CPU" }, { 0, MIPS_RM5200, -1, -1, CPU_ARCH_MIPS4, 48, CPU_MIPS_R4K_MMU | CPU_MIPS_CAUSE_IV | CPU_MIPS_DOUBLE_COUNT | @@ -380,7 +380,7 @@ static const struct pridtab cputab[] = { MIPS_NOT_SUPP | CPU_MIPS_CAUSE_IV | CPU_MIPS_DOUBLE_COUNT | CPU_MIPS_USE_WAIT, 0, 0, "QED RM7000 CPU" }, - /* + /* * IDT RC32300 core is a 32 bit MIPS2 processor with * MIPS3/MIPS4 extensions. It has an R4000-style TLB, * while all registers are 32 bits and any 64 bit @@ -415,7 +415,7 @@ static const struct pridtab cputab[] = { CPU_MIPS_R4K_MMU | CPU_MIPS_DOUBLE_COUNT, 0, 0, "Toshiba TX4900 CPU" }, - /* + /* * ICT Loongson2 is a MIPS64 CPU with a few quirks. For some reason * the virtual aliases present with 4KB pages make the caches misbehave * so we make all accesses uncached. With 16KB pages, no virtual @@ -1318,7 +1318,7 @@ mips_vector_init(const struct splsw *spl mips3_vector_init(splsw); mips_locoresw = mips3_locoresw; break; - + #endif /* MIPS3 */ #if defined(MIPS32) case CPU_ARCH_MIPS32: @@ -1528,7 +1528,7 @@ cpu_identify(device_t dev) mci->mci_picache_line_size, waynames[mci->mci_picache_ways], opts->mips_num_tlb_entries); else - aprint_normal_dev(dev, "%d TLB entries\n", + aprint_normal_dev(dev, "%d TLB entries\n", opts->mips_num_tlb_entries); if (mci->mci_pdcache_size) aprint_normal_dev(dev, "%dKB/%dB %s %s Data cache\n", @@ -2140,7 +2140,7 @@ mips_page_physload(vaddr_t vkernstart, v /* * If this segment doesn't overlap the freelist * at all, skip it. - */ + */ if (segstart >= flp[i].fl_end || segend <= flp[i].fl_start) continue; @@ -2218,12 +2218,12 @@ mips_page_physload(vaddr_t vkernstart, v break; } } - + /* * Now we give this segment to uvm. */ printf("adding %#"PRIxPADDR" @ %#"PRIxPADDR" to freelist %d\n", - + segend - segstart, segstart, freelist); paddr_t first = atop(segstart); paddr_t last = atop(segend); @@ -2237,7 +2237,7 @@ mips_page_physload(vaddr_t vkernstart, v } } -/* +/* * Start a new LWP */ void @@ -2255,7 +2255,7 @@ startlwp(void *arg) } #ifdef COMPAT_NETBSD32 -/* +/* * Start a new LWP */ void
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 18:54:32 UTC 2016 Modified Files: src/sys/arch/mips/mips: trap.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.240 -r1.241 src/sys/arch/mips/mips/trap.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/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.240 src/sys/arch/mips/mips/trap.c:1.241 --- src/sys/arch/mips/mips/trap.c:1.240 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/trap.c Mon Jul 11 18:54:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.240 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: trap.c,v 1.241 2016/07/11 18:54:32 skrll Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.240 2016/07/11 16:15:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.241 2016/07/11 18:54:32 skrll Exp $"); #include "opt_cputype.h" /* which mips CPU levels do we support? */ #include "opt_ddb.h" @@ -190,24 +190,24 @@ trap(uint32_t status, uint32_t cause, va int n, sz = sizeof(strbuf); n = snprintf(str, sz, "pid %d(%s): ", p->p_pid, p->p_comm); - sz -= n; + sz -= n; str += n; n = snprintf(str, sz, "trap: cpu%d, %s in %s mode\n", cpu_number(), trap_names[TRAPTYPE(cause)], USERMODE(status) ? "user" : "kernel"); - sz -= n; + sz -= n; str += n; n = snprintf(str, sz, "status=%#x, cause=%#x, epc=%#" PRIxVADDR ", vaddr=%#" PRIxVADDR "\n", status, cause, pc, vaddr); - sz -= n; + sz -= n; str += n; if (USERMODE(status)) { KASSERT(tf == utf); n = snprintf(str, sz, "frame=%p usp=%#" PRIxREGISTER " ra=%#" PRIxREGISTER "\n", tf, tf->tf_regs[_R_SP], tf->tf_regs[_R_RA]); - sz -= n; + sz -= n; str += n; } else { n = snprintf(str, sz, "tf=%p ksp=%p ra=%#" @@ -216,7 +216,7 @@ trap(uint32_t status, uint32_t cause, va ? (void*)(uintptr_t)tf->tf_regs[_R_SP] : tf+1, tf->tf_regs[_R_RA], tf->tf_ppl); - sz -= n; + sz -= n; str += n; } printf("%s", strbuf); @@ -261,7 +261,7 @@ trap(uint32_t status, uint32_t cause, va kpreempt_disable(); pt_entry_t * const ptep = pmap_pte_lookup(pmap, vaddr); - if (!ptep) + if (!ptep) panic("%ctlbmod: %#"PRIxVADDR": no pte", user_p ? 'u' : 'k', vaddr); pt_entry_t pte = *ptep; @@ -922,7 +922,7 @@ loop: /* * Find the beginning of the current subroutine by scanning backwards * from the current PC for the end of the previous subroutine. - * + * * XXX This won't work well because nowadays gcc is so aggressive * as to reorder instruction blocks for branch-predict. * (i.e. 'jr ra' wouldn't indicate the end of subroutine) @@ -1079,7 +1079,7 @@ done: } } else { finish: - (*printfn)("User-level: pid %d.%d\n", + (*printfn)("User-level: pid %d.%d\n", curlwp->l_proc->p_pid, curlwp->l_lid); } }
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Mon Jul 11 18:07:33 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Remove extra #endif To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 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.68 src/sys/arch/mips/mips/mipsX_subr.S:1.69 --- src/sys/arch/mips/mips/mipsX_subr.S:1.68 Mon Jul 11 16:15:36 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Mon Jul 11 18:07:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.68 2016/07/11 16:15:36 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.69 2016/07/11 18:07:33 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2008,7 +2008,6 @@ END(MIPSX(kern_tlb_invalid_exception)) .globl _C_LABEL(MIPSX(exceptionentry_end)) _C_LABEL(MIPSX(exceptionentry_end)): -#endif /* (PGSHIFT & 1) == 0 */ .set at
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Mon Jul 11 16:18:56 UTC 2016 Modified Files: src/sys/arch/arc/arc: bus_space_sparse.c c_nec_eisa.c src/sys/arch/emips/emips: interrupt.c xilinx_ml40x.c xs_bee3.c src/sys/arch/evbmips/cavium: machdep.c src/sys/arch/evbmips/gdium: machdep.c src/sys/arch/evbmips/malta: machdep.c src/sys/arch/hpcmips/hpcmips: bus_space.c src/sys/arch/hpcmips/tx: tx3912video.c Log Message: Use pmap_kenter flags to create cached/uncached entries. #include when appropriate To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arc/arc/bus_space_sparse.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arc/arc/c_nec_eisa.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/emips/emips/interrupt.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/emips/xilinx_ml40x.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/emips/emips/xs_bee3.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/cavium/machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbmips/gdium/machdep.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbmips/malta/machdep.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcmips/hpcmips/bus_space.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hpcmips/tx/tx3912video.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/arc/arc/bus_space_sparse.c diff -u src/sys/arch/arc/arc/bus_space_sparse.c:1.18 src/sys/arch/arc/arc/bus_space_sparse.c:1.19 --- src/sys/arch/arc/arc/bus_space_sparse.c:1.18 Fri Jul 1 19:28:00 2011 +++ src/sys/arch/arc/arc/bus_space_sparse.c Mon Jul 11 16:18:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space_sparse.c,v 1.18 2011/07/01 19:28:00 dyoung Exp $ */ +/* $NetBSD: bus_space_sparse.c,v 1.19 2016/07/11 16:18:55 matt Exp $ */ /* NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp */ /*- @@ -39,42 +39,21 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.18 2011/07/01 19:28:00 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.19 2016/07/11 16:18:55 matt Exp $"); #include -#include -#include +#include #include +#include +#include #include -#include +#include #include -#include - extern paddr_t kvtophys(vaddr_t); /* XXX */ -static void arc_kseg2_make_cacheable(vaddr_t vaddr, vsize_t size); - -static void -arc_kseg2_make_cacheable(vaddr_t vaddr, vsize_t size) -{ - vaddr_t start, end; - pt_entry_t *pte; - uint32_t entry, mask; - - start = mips_trunc_page(vaddr); - end = mips_round_page(vaddr + size); - mask = ~(CPUISMIPS3 ? MIPS3_PG_UNCACHED : MIPS1_PG_N); - for (; start < end; start += PAGE_SIZE) { - pte = kvtopte(start); - entry = pte->pt_entry & mask; - pte->pt_entry &= entry; - tlb_update(start, entry); - } -} - void arc_sparse_bus_space_init(bus_space_tag_t bst, const char *name, paddr_t paddr, bus_addr_t start, bus_size_t size) @@ -96,7 +75,9 @@ arc_sparse_bus_space_compose_handle(bus_ * Since all buses can be linearly mappable, we don't have to check * BUS_SPACE_MAP_LINEAR and BUS_SPACE_MAP_PREFETCHABLE. */ - int cacheable = (flags & BUS_SPACE_MAP_CACHEABLE); + const u_int pmap_flags = (flags & BUS_SPACE_MAP_CACHEABLE) + ? PMAP_WRITE_BACK + : 0; /* * XXX - `bst->bs_pbase' must be page aligned, @@ -111,22 +92,20 @@ arc_sparse_bus_space_compose_handle(bus_ MIPS_PHYS_TO_KSEG0(start) : MIPS_PHYS_TO_KSEG1(start)); } else { - vaddr_t va, - vaddr = uvm_km_alloc(kernel_map, (vsize_t)(end - start), 0, - UVM_KMF_VAONLY | UVM_KMF_NOWAIT); + vaddr_t vaddr = uvm_km_alloc(kernel_map, (vsize_t)(end - start), + 0, UVM_KMF_VAONLY | UVM_KMF_NOWAIT); if (vaddr == 0) panic("arc_sparse_bus_space_compose_handle: " "cannot allocate KVA 0x%llx..0x%llx", start, end); - for (va = vaddr; start < end; - start += PAGE_SIZE, va += PAGE_SIZE) - pmap_kenter_pa(va, start, - VM_PROT_READ|VM_PROT_WRITE, 0); + for (vaddr_t va = vaddr; start < end; + start += PAGE_SIZE, va += PAGE_SIZE) { + pmap_kenter_pa(va, start, VM_PROT_READ|VM_PROT_WRITE, + pmap_flags); + } pmap_update(pmap_kernel()); vaddr += (offset & PGOFSET); - if (cacheable) - arc_kseg2_make_cacheable(vaddr, size); *bshp = vaddr; } return 0; Index: src/sys/arch/arc/arc/c_nec_eisa.c diff -u src/sys/arch/arc/arc/c_nec_eisa.c:1.16 src/sys/arch/arc/arc/c_nec_eisa.c:1.17 --- src/sys/arch/arc/arc/c_nec_eisa.c:1.16 Sun Feb 20 07:52:42 2011 +++ src/sys/arch/arc/arc/c_nec_eisa.c Mon Jul 11 16:18:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: c_nec_eisa.c,v 1.16 2011/02/20 07:52:42 matt Exp $ */ +/* $NetBSD: c_nec_eisa.c,v 1.17 2016/07/11 16:18:55 matt Exp $ */ /*- * Copyright (c) 2003 Izumi Tsutsui. All rights reserved. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.16 2011/02/20 07:52:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.17 2016/07/11
CVS commit: src/sys/dev
Module Name:src Committed By: matt Date: Mon Jul 11 16:13:28 UTC 2016 Modified Files: src/sys/dev: mm.c mm.h Log Message: Add mm_md_page_color hook and use to support better page coloring. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/mm.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/mm.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/mm.c diff -u src/sys/dev/mm.c:1.20 src/sys/dev/mm.c:1.21 --- src/sys/dev/mm.c:1.20 Sun Jan 17 23:17:04 2016 +++ src/sys/dev/mm.c Mon Jul 11 16:13:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mm.c,v 1.20 2016/01/17 23:17:04 christos Exp $ */ +/* $NetBSD: mm.c,v 1.21 2016/07/11 16:13:28 matt Exp $ */ /*- * Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.20 2016/01/17 23:17:04 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.21 2016/07/11 16:13:28 matt Exp $"); #include "opt_compat_netbsd.h" @@ -128,11 +128,11 @@ mm_init(void) * constant, general mapping address otherwise. */ static inline vaddr_t -dev_mem_getva(paddr_t pa) +dev_mem_getva(paddr_t pa, int color) { #ifdef __HAVE_MM_MD_CACHE_ALIASING return uvm_km_alloc(kernel_map, PAGE_SIZE, - atop(pa) & uvmexp.colormask, + color & uvmexp.colormask, UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_COLORMATCH); #else return dev_mem_addr; @@ -161,6 +161,7 @@ dev_mem_readwrite(struct uio *uio, struc size_t len, offset; bool have_direct; int error; + int color = 0; /* Check for wrap around. */ if ((intptr_t)uio->uio_offset != uio->uio_offset) { @@ -175,16 +176,24 @@ dev_mem_readwrite(struct uio *uio, struc offset = uio->uio_offset & PAGE_MASK; len = MIN(uio->uio_resid, PAGE_SIZE - offset); +#ifdef __HAVE_MM_MD_CACHE_ALIASING + have_direct = mm_md_page_color(paddr, ); +#else + have_direct = true; + color = 0; +#endif + #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS /* Is physical address directly mapped? Return VA. */ - have_direct = mm_md_direct_mapped_phys(paddr, ); + if (have_direct) + have_direct = mm_md_direct_mapped_phys(paddr, ); #else vaddr = 0; have_direct = false; #endif if (!have_direct) { /* Get a special virtual address. */ - const vaddr_t va = dev_mem_getva(paddr); + const vaddr_t va = dev_mem_getva(paddr, color); /* Map selected KVA to physical address. */ mutex_enter(_mem_lock); Index: src/sys/dev/mm.h diff -u src/sys/dev/mm.h:1.2 src/sys/dev/mm.h:1.3 --- src/sys/dev/mm.h:1.2 Sun Jun 12 03:35:51 2011 +++ src/sys/dev/mm.h Mon Jul 11 16:13:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mm.h,v 1.2 2011/06/12 03:35:51 rmind Exp $ */ +/* $NetBSD: mm.h,v 1.3 2016/07/11 16:13:28 matt Exp $ */ /*- * Copyright (c) 2008 Joerg Sonnenberger. @@ -88,8 +88,10 @@ bool mm_md_direct_mapped_io(void *, padd /* * Some architectures may need to deal with cache aliasing issues. - * - * machine/types.h must define __HAVE_MM_MD_CACHE_ALIASING to note that. + * Optional hook to fetch a page's current color and returns whether + * that page can be direct mapped. + * machine/types.h must define __HAVE_MM_MD_CACHE_ALIASING to use this. */ +bool mm_md_page_color(paddr_t, int *); #endif /* _SYS_DEV_MM_H_ */
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Mon Jul 11 16:09:27 UTC 2016 Modified Files: src/sys/arch/arm/arm32: arm32_tlb.c Log Message: Adapt to common pmap changes. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/arm32/arm32_tlb.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/arm32_tlb.c diff -u src/sys/arch/arm/arm32/arm32_tlb.c:1.9 src/sys/arch/arm/arm32/arm32_tlb.c:1.10 --- src/sys/arch/arm/arm32/arm32_tlb.c:1.9 Thu Mar 26 08:45:05 2015 +++ src/sys/arch/arm/arm32/arm32_tlb.c Mon Jul 11 16:09:27 2016 @@ -30,7 +30,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.9 2015/03/26 08:45:05 hsuenaga Exp $"); +__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.10 2016/07/11 16:09:27 matt Exp $"); #include #include @@ -77,6 +77,7 @@ tlb_invalidate_all(void) armreg_iciallu_write(0); } } + arm_dsb(); arm_isb(); } @@ -99,6 +100,7 @@ tlb_invalidate_asids(tlb_asid_t lo, tlb_ armreg_tlbiasid_write(lo); #endif } + arm_dsb(); arm_isb(); if (__predict_false(vivt_icache_p)) { #ifdef MULTIPROCESSOR @@ -130,7 +132,6 @@ tlb_invalidate_addr(vaddr_t va, tlb_asid #endif //armreg_tlbiall_write(asid); } - arm_dsb(); arm_isb(); } @@ -143,7 +144,7 @@ tlb_update_addr(vaddr_t va, tlb_asid_t a #if !defined(MULTIPROCESSOR) && defined(CPU_CORTEXA5) static u_int -tlb_cortex_a5_record_asids(u_long *mapp) +tlb_cortex_a5_record_asids(u_long *mapp, tlb_asid_t asid_max) { u_int nasids = 0; for (size_t va_index = 0; va_index < 63; va_index++) { @@ -175,7 +176,7 @@ tlb_cortex_a5_record_asids(u_long *mapp) #if !defined(MULTIPROCESSOR) && defined(CPU_CORTEXA7) static u_int -tlb_cortex_a7_record_asids(u_long *mapp) +tlb_cortex_a7_record_asids(u_long *mapp, tlb_asid_t asid_max) { u_int nasids = 0; for (size_t va_index = 0; va_index < 128; va_index++) { @@ -207,16 +208,16 @@ tlb_cortex_a7_record_asids(u_long *mapp) #endif u_int -tlb_record_asids(u_long *mapp) +tlb_record_asids(u_long *mapp, tlb_asid_t asid_max) { #ifndef MULTIPROCESSOR #ifdef CPU_CORTEXA5 if (CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) - return tlb_cortex_a5_record_asids(mapp); + return tlb_cortex_a5_record_asids(mapp, asid_max); #endif #ifdef CPU_CORTEXA7 if (CPU_ID_CORTEX_A7_P(curcpu()->ci_arm_cpuid)) - return tlb_cortex_a7_record_asids(mapp); + return tlb_cortex_a7_record_asids(mapp, asid_max); #endif #endif /* MULTIPROCESSOR */ #ifdef DIAGNOSTIC
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Mon Jul 11 16:10:10 UTC 2016 Modified Files: src/sys/sys: param.h Log Message: Welcome 7.99.34 To generate a diff of this commit: cvs rdiff -u -r1.499 -r1.500 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.499 src/sys/sys/param.h:1.500 --- src/sys/sys/param.h:1.499 Mon Jul 4 07:44:08 2016 +++ src/sys/sys/param.h Mon Jul 11 16:10:10 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.499 2016/07/04 07:44:08 pgoyette Exp $ */ +/* $NetBSD: param.h,v 1.500 2016/07/11 16:10:10 matt Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799003300 /* NetBSD 7.99.33 */ +#define __NetBSD_Version__ 799003400 /* NetBSD 7.99.34 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Mon Jul 11 16:06:52 UTC 2016 Modified Files: src/sys/arch/powerpc/booke: booke_machdep.c booke_pmap.c booke_stubs.c e500_tlb.c src/sys/arch/powerpc/include/booke: pmap.h pte.h Log Message: Adapt to common pmap changes. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/booke/booke_machdep.c \ src/sys/arch/powerpc/booke/booke_pmap.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/booke_stubs.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/booke/e500_tlb.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/booke/pmap.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/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/powerpc/booke/booke_machdep.c diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.23 src/sys/arch/powerpc/booke/booke_machdep.c:1.24 --- src/sys/arch/powerpc/booke/booke_machdep.c:1.23 Fri Jan 23 07:27:05 2015 +++ src/sys/arch/powerpc/booke/booke_machdep.c Mon Jul 11 16:06:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: booke_machdep.c,v 1.23 2015/01/23 07:27:05 nonaka Exp $ */ +/* $NetBSD: booke_machdep.c,v 1.24 2016/07/11 16:06:52 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #define _POWERPC_BUS_DMA_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.23 2015/01/23 07:27:05 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.24 2016/07/11 16:06:52 matt Exp $"); #include "opt_modular.h" @@ -130,6 +130,7 @@ struct cpu_info cpu_info[] = { .ci_softc = _softc[0], .ci_cpl = IPL_HIGH, .ci_idepth = -1, + .ci_pmap_kern_segtab = _kern_segtab, }, #ifdef MULTIPROCESSOR [CPU_MAXNUM-1] = { @@ -138,6 +139,7 @@ struct cpu_info cpu_info[] = { .ci_softc = _softc[CPU_MAXNUM-1], .ci_cpl = IPL_HIGH, .ci_idepth = -1, + .ci_pmap_kern_segtab = _kern_segtab, }, #endif }; Index: src/sys/arch/powerpc/booke/booke_pmap.c diff -u src/sys/arch/powerpc/booke/booke_pmap.c:1.23 src/sys/arch/powerpc/booke/booke_pmap.c:1.24 --- src/sys/arch/powerpc/booke/booke_pmap.c:1.23 Thu Nov 5 06:26:15 2015 +++ src/sys/arch/powerpc/booke/booke_pmap.c Mon Jul 11 16:06:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: booke_pmap.c,v 1.23 2015/11/05 06:26:15 pgoyette Exp $ */ +/* $NetBSD: booke_pmap.c,v 1.24 2016/07/11 16:06:52 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.23 2015/11/05 06:26:15 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.24 2016/07/11 16:06:52 matt Exp $"); #include #include @@ -53,19 +53,11 @@ __KERNEL_RCSID(0, "$NetBSD: booke_pmap.c kmutex_t pmap_tlb_miss_lock; #endif -/* - * Initialize the kernel pmap. - */ -#ifdef MULTIPROCESSOR -#define PMAP_SIZE offsetof(struct pmap, pm_pai[PMAP_TLB_MAX]) -#else -#define PMAP_SIZE sizeof(struct pmap) -#endif +PMAP_COUNTER(zeroed_pages, "pages zeroed"); +PMAP_COUNTER(copied_pages, "pages copied"); CTASSERT(sizeof(pmap_segtab_t) == NBPG); -pmap_segtab_t pmap_kernel_segtab; - void pmap_procwr(struct proc *p, vaddr_t va, size_t len) { @@ -140,7 +132,7 @@ kvtopte(const pmap_segtab_t *stp, vaddr_ vaddr_t pmap_kvptefill(vaddr_t sva, vaddr_t eva, pt_entry_t pt_entry) { - const pmap_segtab_t * const stp = pmap_kernel()->pm_segtab; + pmap_segtab_t * const stp = _kern_segtab; KASSERT(sva == trunc_page(sva)); pt_entry_t *ptep = kvtopte(stp, sva); for (; sva < eva; sva += NBPG) { @@ -158,13 +150,7 @@ vaddr_t pmap_bootstrap(vaddr_t startkernel, vaddr_t endkernel, phys_ram_seg_t *avail, size_t cnt) { - pmap_segtab_t * const stp = _kernel_segtab; - - /* - * Initialize the kernel segment table. - */ - pmap_kernel()->pm_segtab = stp; - curcpu()->ci_pmap_kern_segtab = stp; + pmap_segtab_t * const stp = _kern_segtab; KASSERT(endkernel == trunc_page(endkernel)); @@ -350,6 +336,7 @@ pmap_md_unmap_poolpage(vaddr_t va, vsize void pmap_zero_page(paddr_t pa) { + PMAP_COUNT(zeroed_pages); vaddr_t va = pmap_md_map_poolpage(pa, NBPG); dcache_zero_page(va); @@ -365,6 +352,8 @@ pmap_copy_page(paddr_t src, paddr_t dst) vaddr_t dst_va = pmap_md_map_poolpage(dst, NBPG); const vaddr_t end = src_va + PAGE_SIZE; + PMAP_COUNT(copied_pages); + while (src_va < end) { __asm __volatile( "dcbt %2,%0" "\n\t" /* touch next src cacheline */ Index: src/sys/arch/powerpc/booke/booke_stubs.c diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.9 src/sys/arch/powerpc/booke/booke_stubs.c:1.10 --- src/sys/arch/powerpc/booke/booke_stubs.c:1.9 Thu Jun 30 00:52:58 2011 +++ src/sys/arch/powerpc/booke/booke_stubs.c Mon Jul 11 16:06:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: booke_stubs.c,v 1.9 2011/06/30 00:52:58 matt Exp $ */ +/* $NetBSD: booke_stubs.c,v 1.10 2016/07/11
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: matt Date: Mon Jul 11 16:06:09 UTC 2016 Modified Files: src/sys/uvm/pmap: pmap.c pmap.h pmap_segtab.c pmap_synci.c pmap_tlb.c pmap_tlb.h tlb.h vmpagemd.h Added Files: src/sys/uvm/pmap: pmap_synci.h Log Message: Changes so that MIPS can use the common pmap. Change/augment the virtual cache alias callbacks. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/uvm/pmap/pmap.c cvs rdiff -u -r1.6 -r1.7 src/sys/uvm/pmap/pmap.h cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/pmap/pmap_segtab.c \ src/sys/uvm/pmap/pmap_synci.c src/sys/uvm/pmap/tlb.h \ src/sys/uvm/pmap/vmpagemd.h cvs rdiff -u -r0 -r1.1 src/sys/uvm/pmap/pmap_synci.h cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap_tlb.c cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/pmap/pmap_tlb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/pmap/pmap.c diff -u src/sys/uvm/pmap/pmap.c:1.14 src/sys/uvm/pmap/pmap.c:1.15 --- src/sys/uvm/pmap/pmap.c:1.14 Thu Jul 7 06:55:44 2016 +++ src/sys/uvm/pmap/pmap.c Mon Jul 11 16:06:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.14 2016/07/07 06:55:44 msaitoh Exp $ */ +/* $NetBSD: pmap.c,v 1.15 2016/07/11 16:06:09 matt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.14 2016/07/07 06:55:44 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.15 2016/07/11 16:06:09 matt Exp $"); /* * Manages physical address maps. @@ -102,22 +102,22 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.1 #define __PMAP_PRIVATE #include -#include -#include +#include #include +#include +#include #include #include #include #include -#include /* XXX: for sock_loan_thresh */ #include -#define PMAP_COUNT(name) (pmap_evcnt_##name.ev_count++ + 0) -#define PMAP_COUNTER(name, desc) \ -static struct evcnt pmap_evcnt_##name = \ - EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "pmap", desc); \ -EVCNT_ATTACH_STATIC(pmap_evcnt_##name) +#if defined(MULTIPROCESSOR) && defined(PMAP_VIRTUAL_CACHE_ALIASES) \ +&& !defined(PMAP_NO_PV_UNCACHED) +#error PMAP_VIRTUAL_CACHE_ALIASES with MULTIPROCESSOR requires \ + PMAP_NO_PV_UNCACHED to be defined +#endif PMAP_COUNTER(remove_kernel_calls, "remove kernel calls"); PMAP_COUNTER(remove_kernel_pages, "kernel pages unmapped"); @@ -132,8 +132,6 @@ PMAP_COUNTER(prefer_requests, "prefer re PMAP_COUNTER(prefer_adjustments, "prefer adjustments"); PMAP_COUNTER(idlezeroed_pages, "pages idle zeroed"); -PMAP_COUNTER(zeroed_pages, "pages zeroed"); -PMAP_COUNTER(copied_pages, "pages copied"); PMAP_COUNTER(kenter_pa, "kernel fast mapped pages"); PMAP_COUNTER(kenter_pa_bad, "kernel fast mapped pages (bad color)"); @@ -190,20 +188,22 @@ PMAP_COUNTER(page_protect, "page_protect #define PMAP_ASID_RESERVED 0 CTASSERT(PMAP_ASID_RESERVED == 0); -/* - * Initialize the kernel pmap. - */ -#ifdef MULTIPROCESSOR -#define PMAP_SIZE offsetof(struct pmap, pm_pai[PMAP_TLB_MAX]) -#else -#define PMAP_SIZE sizeof(struct pmap) -kmutex_t pmap_pvlist_mutex __aligned(COHERENCY_UNIT); +#ifndef PMAP_SEGTAB_ALIGN +#define PMAP_SEGTAB_ALIGN /* nothing */ +#endif +#ifdef _LP64 +pmap_segtab_t pmap_kstart_segtab PMAP_SEGTAB_ALIGN; /* first mid-level segtab for kernel */ +#endif +pmap_segtab_t pmap_kern_segtab PMAP_SEGTAB_ALIGN = { /* top level segtab for kernel */ +#ifdef _LP64 + .seg_seg[(VM_MIN_KERNEL_ADDRESS & XSEGOFSET) >> SEGSHIFT] = _kstart_segtab, #endif +}; struct pmap_kernel kernel_pmap_store = { .kernel_pmap = { .pm_count = 1, - .pm_segtab = PMAP_INVALID_SEGTAB_ADDRESS, + .pm_segtab = _kern_segtab, .pm_minaddr = VM_MIN_KERNEL_ADDRESS, .pm_maxaddr = VM_MAX_KERNEL_ADDRESS, }, @@ -211,7 +211,7 @@ struct pmap_kernel kernel_pmap_store = { struct pmap * const kernel_pmap_ptr = _pmap_store.kernel_pmap; -struct pmap_limits pmap_limits = { +struct pmap_limits pmap_limits = { /* VA and PA limits */ .virtual_start = VM_MIN_KERNEL_ADDRESS, }; @@ -231,23 +231,24 @@ struct pool pmap_pv_pool; #ifndef PMAP_PV_LOWAT #define PMAP_PV_LOWAT 16 #endif -int pmap_pv_lowat = PMAP_PV_LOWAT; +int pmap_pv_lowat = PMAP_PV_LOWAT; -bool pmap_initialized = false; +bool pmap_initialized = false; #define PMAP_PAGE_COLOROK_P(a, b) \ int)(a) ^ (int)(b)) & pmap_page_colormask) == 0) -u_int pmap_page_colormask; +u_int pmap_page_colormask; -#define PAGE_IS_MANAGED(pa) \ - (pmap_initialized == true && vm_physseg_find(atop(pa), NULL) != -1) +#define PAGE_IS_MANAGED(pa) (pmap_initialized && uvm_pageismanaged(pa)) #define PMAP_IS_ACTIVE(pm) \ ((pm) == pmap_kernel() || \ (pm) == curlwp->l_proc->p_vmspace->vm_map.pmap) /* Forward function declarations */ +void pmap_page_remove(struct vm_page *); +static void pmap_pvlist_check(struct vm_page_md *); void pmap_remove_pv(pmap_t, vaddr_t, struct vm_page *, bool); -void
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: martin Date: Mon Jul 11 15:51:01 UTC 2016 Modified Files: src/sys/arch/arm/arm32: kobj_machdep.c Log Message: kobj_machdep() is now called multiple times for the same module. Only do arm-BE8 symbol fixup when called for the text segment. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm32/kobj_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/arm/arm32/kobj_machdep.c diff -u src/sys/arch/arm/arm32/kobj_machdep.c:1.10 src/sys/arch/arm/arm32/kobj_machdep.c:1.11 --- src/sys/arch/arm/arm32/kobj_machdep.c:1.10 Fri Nov 7 21:28:32 2014 +++ src/sys/arch/arm/arm32/kobj_machdep.c Mon Jul 11 15:51:01 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.10 2014/11/07 21:28:32 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.11 2016/07/11 15:51:01 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.10 2014/11/07 21:28:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.11 2016/07/11 15:51:01 martin Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -399,7 +399,7 @@ kobj_machdep(kobj_t ko, void *base, size if (load) { #if __ARMEB__ - if (CPU_IS_ARMV7_P()) + if (CPU_IS_ARMV7_P() && base == (void*)ko->ko_text_address) kobj_be8_fixup(ko); #endif #ifndef _RUMPKERNEL
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: kiyohara Date: Mon Jul 11 14:53:05 UTC 2016 Modified Files: src/sys/arch/arm/omap: omap2_gpio.c Log Message: Support OMAP 4430. tested on Gumstix DuoVero. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/omap/omap2_gpio.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/omap2_gpio.c diff -u src/sys/arch/arm/omap/omap2_gpio.c:1.17 src/sys/arch/arm/omap/omap2_gpio.c:1.18 --- src/sys/arch/arm/omap/omap2_gpio.c:1.17 Sat Jul 9 15:04:06 2016 +++ src/sys/arch/arm/omap/omap2_gpio.c Mon Jul 11 14:53:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_gpio.c,v 1.17 2016/07/09 15:04:06 kiyohara Exp $ */ +/* $NetBSD: omap2_gpio.c,v 1.18 2016/07/11 14:53:05 kiyohara Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.17 2016/07/09 15:04:06 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.18 2016/07/11 14:53:05 kiyohara Exp $"); #define _INTR_PRIVATE @@ -61,8 +61,11 @@ __KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c #endif static void gpio_pic_block_irqs(struct pic_softc *, size_t, uint32_t); +static void gpio_pic_block_irqs2(struct pic_softc *, size_t, uint32_t); static void gpio_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); +static void gpio_pic_unblock_irqs2(struct pic_softc *, size_t, uint32_t); static int gpio_pic_find_pending_irqs(struct pic_softc *); +static int gpio_pic_find_pending_irqs2(struct pic_softc *); static void gpio_pic_establish_irq(struct pic_softc *, struct intrsource *); const struct pic_ops gpio_pic_ops = { @@ -71,6 +74,12 @@ const struct pic_ops gpio_pic_ops = { .pic_find_pending_irqs = gpio_pic_find_pending_irqs, .pic_establish_irq = gpio_pic_establish_irq, }; +const struct pic_ops gpio_pic_ops2 = { + .pic_block_irqs = gpio_pic_block_irqs2, + .pic_unblock_irqs = gpio_pic_unblock_irqs2, + .pic_find_pending_irqs = gpio_pic_find_pending_irqs2, + .pic_establish_irq = gpio_pic_establish_irq, +}; struct gpio_softc { device_t gpio_dev; @@ -78,6 +87,7 @@ struct gpio_softc { struct intrsource *gpio_is; bus_space_tag_t gpio_memt; bus_space_handle_t gpio_memh; + bus_space_handle_t gpio_memh2; uint32_t gpio_enable_mask; uint32_t gpio_edge_mask; uint32_t gpio_edge_falling_mask; @@ -100,6 +110,10 @@ struct gpio_softc { bus_space_read_4((gpio)->gpio_memt, (gpio)->gpio_memh, (reg)) #define GPIO_WRITE(gpio, reg, val) \ bus_space_write_4((gpio)->gpio_memt, (gpio)->gpio_memh, (reg), (val)) +#define GPIO_READ2(gpio, reg) \ + bus_space_read_4((gpio)->gpio_memt, (gpio)->gpio_memh2, (reg)) +#define GPIO_WRITE2(gpio, reg, val) \ + bus_space_write_4((gpio)->gpio_memt, (gpio)->gpio_memh2, (reg), (val)) void gpio_pic_unblock_irqs(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask) @@ -119,6 +133,22 @@ gpio_pic_unblock_irqs(struct pic_softc * } void +gpio_pic_unblock_irqs2(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask) +{ + struct gpio_softc * const gpio = PIC_TO_SOFTC(pic); + KASSERT(irq_base == 0); + + /* + * If this a level source, ack it now. If it's still asserted + * it'll come back. + */ + GPIO_WRITE2(gpio, GPIO_IRQSTATUS_SET_0, irq_mask); + if (irq_mask & gpio->gpio_level_mask) + GPIO_WRITE2(gpio, GPIO_IRQSTATUS_0, + irq_mask & gpio->gpio_level_mask); +} + +void gpio_pic_block_irqs(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask) { struct gpio_softc * const gpio = PIC_TO_SOFTC(pic); @@ -135,6 +165,22 @@ gpio_pic_block_irqs(struct pic_softc *pi irq_mask & gpio->gpio_edge_mask); } +void +gpio_pic_block_irqs2(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask) +{ + struct gpio_softc * const gpio = PIC_TO_SOFTC(pic); + KASSERT(irq_base == 0); + + GPIO_WRITE2(gpio, GPIO_IRQSTATUS_CLR_0, irq_mask); + /* + * If any of the sources are edge triggered, ack them now so + * we won't lose them. + */ + if (irq_mask & gpio->gpio_edge_mask) + GPIO_WRITE2(gpio, GPIO_IRQSTATUS_0, + irq_mask & gpio->gpio_edge_mask); +} + int gpio_pic_find_pending_irqs(struct pic_softc *pic) { @@ -155,6 +201,24 @@ gpio_pic_find_pending_irqs(struct pic_so return 1; } +int +gpio_pic_find_pending_irqs2(struct pic_softc *pic) +{ + struct gpio_softc * const gpio = PIC_TO_SOFTC(pic); + uint32_t pending; + + pending = GPIO_READ2(gpio, GPIO_IRQSTATUS_0); + if (pending == 0) + return 0; + + /* + * Now find all the pending bits and mark them as pending. + */ + (void) pic_mark_pending_sources(>gpio_pic, 0, pending); + + return 1; +} + void gpio_pic_establish_irq(struct pic_softc *pic, struct intrsource *is) { @@ -170,9 +234,14 @@ gpio_pic_establish_irq(struct pic_softc /* * Make sure the irq isn't enabled and not asserting. */ +#if defined(OMAP_4430) ||
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Mon Jul 11 14:52:54 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: KNF and simplify. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amd64/amd64/locore.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/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.106 src/sys/arch/amd64/amd64/locore.S:1.107 --- src/sys/arch/amd64/amd64/locore.S:1.106 Sat Jul 9 06:58:06 2016 +++ src/sys/arch/amd64/amd64/locore.S Mon Jul 11 14:52:54 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.106 2016/07/09 06:58:06 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.107 2016/07/11 14:52:54 maxv Exp $ */ /* * Copyright-o-rama! @@ -985,10 +985,9 @@ longmode_hi: movq %rsi,%rdi addq $USPACE,%rdi subq $KERNBASE,%rdi /* init_x86_64 wants a physical address */ - #endif /* XEN */ - call _C_LABEL(init_x86_64) + call _C_LABEL(init_x86_64) call _C_LABEL(main) END(start) @@ -1175,9 +1174,10 @@ skip_CR0: /* The 32bit LWPs are handled differently. */ testl $PCB_COMPAT32,PCB_FLAGS(%r14) - jne 32f + jne lwp_64bit - /* Zero out %fs/%gs registers and GDT descriptors. */ +lwp_32bit: + /* Zero out %fs/%gs registers. */ xorq %rax,%rax movw %ax,%fs CLI(cx) @@ -1186,6 +1186,7 @@ skip_CR0: SWAPGS STI(cx) + /* Zero out GDT descriptors. */ movq CPUVAR(GDT),%rcx movq %rax,(GUFS_SEL*8)(%rcx) movq %rax,(GUGS_SEL*8)(%rcx) @@ -1199,9 +1200,10 @@ skip_CR0: movl PCB_GS(%r14),%eax movl 4+PCB_GS(%r14),%edx wrmsr + jmp switch_return -32: +lwp_64bit: /* Reload %fs/%gs GDT descriptors. */ movq CPUVAR(GDT),%rcx movq PCB_FS(%r14),%rax @@ -1259,14 +1261,16 @@ IDTVEC_END(syscall32) IDTVEC(syscall) #ifndef XEN /* - * The user %rip is in %rcx and the user %flags in %r11. - * The kernel %cs and %ss are loaded, but nothing else is. - * The 'swapgs' gives us access to cpu-specific memory where - * we can save a user register and then read the lwps - * kernel stack pointer, - * This code doesn't seem to set %ds, this may not matter since it - * is ignored in 64bit mode, OTOH the syscall instruction sets %ss - * and that is ignored as well. + * The user %rip is in %rcx and the user %flags in %r11. The kernel %cs + * and %ss are loaded, but nothing else is. + * + * The 'swapgs' instruction gives us access to cpu-specific memory where + * we can save a user register and then read the LWP's kernel stack + * pointer. + * + * This code doesn't seem to set %ds, this may not matter since it is + * ignored in 64bit mode, OTOH the syscall instruction sets %ss and that + * is ignored as well. */ swapgs movq %r15,CPUVAR(SCRATCH) @@ -1276,19 +1280,19 @@ IDTVEC(syscall) /* Make stack look like an 'int nn' frame */ #define SP(x) (x)-(TF_SS+8)(%r15) - movq $(LSEL(LUDATA_SEL, SEL_UPL)), SP(TF_SS) /* user %ss */ - movq %rsp, SP(TF_RSP) /* User space rsp */ + movq $(LSEL(LUDATA_SEL, SEL_UPL)),SP(TF_SS) /* user %ss */ + movq %rsp,SP(TF_RSP) /* User space rsp */ - movq %r11, SP(TF_RFLAGS) /* old rflags from syscall insn */ - movq $(LSEL(LUCODE_SEL, SEL_UPL)), SP(TF_CS) - movq %rcx, SP(TF_RIP) /* syscall saves rip in rcx */ + movq %r11,SP(TF_RFLAGS) /* old rflags from syscall insn */ + movq $(LSEL(LUCODE_SEL, SEL_UPL)),SP(TF_CS) + movq %rcx,SP(TF_RIP) /* syscall saves rip in rcx */ leaq SP(0),%rsp /* %rsp now valid after frame */ movq CPUVAR(SCRATCH),%r15 #undef SP movq $2,TF_ERR(%rsp) /* syscall instruction size */ - movq $T_ASTFLT, TF_TRAPNO(%rsp) + movq $T_ASTFLT,TF_TRAPNO(%rsp) movw %es,TF_ES(%rsp) sti @@ -1328,27 +1332,29 @@ do_syscall: */ CLI(si) /* Check for ASTs on exit to user mode. */ - movl L_MD_ASTPENDING(%r14), %eax - orl CPUVAR(WANT_PMAPLOAD), %eax + movl L_MD_ASTPENDING(%r14),%eax + orl CPUVAR(WANT_PMAPLOAD),%eax jnz 9f + #ifdef DIAGNOSTIC cmpl $IPL_NONE,CPUVAR(ILEVEL) - jne 3f + jne spl_error #endif - testl $(MDL_IRET | MDL_COMPAT32), L_MD_FLAGS(%r14) + + testl $(MDL_IRET|MDL_COMPAT32),L_MD_FLAGS(%r14) INTR_RESTORE_GPRS movw TF_ES(%rsp),%es SWAPGS jnz 2f #ifndef XEN - movq TF_RIP(%rsp), %rcx /* %rip for sysret */ - movq TF_RFLAGS(%rsp), %r11 /* %flags for sysret */ - movw TF_DS(%rsp), %ds - movq TF_RSP(%rsp), %rsp + movq TF_RIP(%rsp),%rcx /* %rip for sysret */ + movq TF_RFLAGS(%rsp),%r11 /* %flags for sysret */ + movw TF_DS(%rsp),%ds + movq TF_RSP(%rsp),%rsp sysretq #else - movw TF_DS(%rsp), %ds - addq $TF_RIP, %rsp + movw TF_DS(%rsp),%ds + addq $TF_RIP,%rsp pushq $256 /* VGCF_IN_SYSCALL */ jmp HYPERVISOR_iret #endif @@ -1360,13 +1366,14 @@ do_syscall: * then a SIGSEGV will be signalled. */ 2: - movw TF_DS(%rsp), %ds - addq $TF_RIP, %rsp + movw TF_DS(%rsp),%ds + addq $TF_RIP,%rsp iretq -/* Report SPL error */ #ifdef DIAGNOSTIC -3: movabsq $4f, %rdi + /* Report SPL error */ +spl_error: + movabsq $4f,%rdi
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: kiyohara Date: Mon Jul 11 14:51:11 UTC 2016 Modified Files: src/sys/arch/arm/omap: omap2_reg.h Log Message: Add more GPIO registers. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/omap/omap2_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.32 src/sys/arch/arm/omap/omap2_reg.h:1.33 --- src/sys/arch/arm/omap/omap2_reg.h:1.32 Sun Jul 3 12:27:04 2016 +++ src/sys/arch/arm/omap/omap2_reg.h Mon Jul 11 14:51:11 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.32 2016/07/03 12:27:04 kiyohara Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.33 2016/07/11 14:51:11 kiyohara Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -789,6 +789,23 @@ #define GPIO5_BASE_TI_DM37XX 0x49056000 #define GPIO6_BASE_TI_DM37XX 0x49058000 +#define GPIO_SIZE2 0x100 + +#define GPIO_REVISION 0x000 +#define GPIO_SYSCONFIG 0x010 +#define GPIO_EOI 0x020 /* AM33xx */ +#define GPIO_IRQSTATUS_RAW_0 0x024 +#define GPIO_IRQSTATUS_RAW_1 0x028 +#define GPIO_IRQSTATUS_0 0x02c +#define GPIO_IRQSTATUS_1 0x030 +#define GPIO_IRQSTATUS_SET_0 0x034 +#define GPIO_IRQSTATUS_SET_1 0x038 +#define GPIO_IRQSTATUS_CLR_0 0x03c +#define GPIO_IRQSTATUS_CLR_1 0x040 +#define GPIO_IRQWAKEN_0 0x044 +#define GPIO_IRQWAKEN_1 0x048 +#define GPIO_SYSSTATUS 0x114 + #define GPIO_IRQSTATUS1 0x018 #define GPIO_IRQENABLE1 0x01c #define GPIO_WAKEUPENABLE 0x020
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: kiyohara Date: Mon Jul 11 14:46:33 UTC 2016 Modified Files: src/sys/arch/arm/omap: tiotg.c Log Message: s/^ +/ / To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/tiotg.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/tiotg.c diff -u src/sys/arch/arm/omap/tiotg.c:1.4 src/sys/arch/arm/omap/tiotg.c:1.5 --- src/sys/arch/arm/omap/tiotg.c:1.4 Mon Jul 4 15:35:55 2016 +++ src/sys/arch/arm/omap/tiotg.c Mon Jul 11 14:46:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: tiotg.c,v 1.4 2016/07/04 15:35:55 kiyohara Exp $ */ +/* $NetBSD: tiotg.c,v 1.5 2016/07/11 14:46:33 kiyohara Exp $ */ /* * Copyright (c) 2013 Manuel Bouyer. All rights reserved. * @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.4 2016/07/04 15:35:55 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.5 2016/07/11 14:46:33 kiyohara Exp $"); #include "opt_omap.h" #include "locators.h" @@ -133,14 +133,14 @@ tiotg_match(device_t parent, cfdata_t ma if (mb->mb_iobase == MAINBUSCF_BASE_DEFAULT || mb->mb_iosize == MAINBUSCF_SIZE_DEFAULT || mb->mb_intrbase == MAINBUSCF_INTRBASE_DEFAULT) -return 0; -return 1; + return 0; + return 1; } static void tiotg_attach(device_t parent, device_t self, void *aux) { - struct tiotg_softc *sc = device_private(self); + struct tiotg_softc *sc = device_private(self); struct mainbus_attach_args *mb = aux; uint32_t val; @@ -157,7 +157,7 @@ tiotg_attach(device_t parent, device_t s sc->sc_intrbase = mb->mb_intrbase; sc->sc_ih = intr_establish(mb->mb_intrbase, IPL_USB, IST_LEVEL, tiotg_intr, sc); -KASSERT(sc->sc_ih != NULL); + KASSERT(sc->sc_ih != NULL); aprint_normal(": TI dual-port USB controller"); /* XXX this looks wrong */ prcm_write_4(AM335X_PRCM_CM_WKUP, CM_WKUP_CM_CLKDCOLDO_DPLL_PER,
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Mon Jul 11 14:44:49 UTC 2016 Modified Files: src/sys/dev/i2c: dbcool.c Log Message: Fix compile error. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/i2c/dbcool.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/i2c/dbcool.c diff -u src/sys/dev/i2c/dbcool.c:1.45 src/sys/dev/i2c/dbcool.c:1.46 --- src/sys/dev/i2c/dbcool.c:1.45 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/i2c/dbcool.c Mon Jul 11 14:44:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dbcool.c,v 1.45 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: dbcool.c,v 1.46 2016/07/11 14:44:49 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.45 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.46 2016/07/11 14:44:49 msaitoh Exp $"); #include #include @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1 /* Config interface */ static int dbcool_match(device_t, cfdata_t, void *); -static int dbcool_attach(device_t, device_t, void *); +static void dbcool_attach(device_t, device_t, void *); static int dbcool_detach(device_t, int); /* Device attributes */
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: kiyohara Date: Mon Jul 11 14:35:00 UTC 2016 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Add Cortex-A9 r1. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 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.113 src/sys/arch/arm/arm32/cpu.c:1.114 --- src/sys/arch/arm/arm32/cpu.c:1.113 Thu Mar 3 17:01:31 2016 +++ src/sys/arch/arm/arm32/cpu.c Mon Jul 11 14:35:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.113 2016/03/03 17:01:31 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.114 2016/07/11 14:35:00 kiyohara Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.113 2016/03/03 17:01:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.114 2016/07/11 14:35:00 kiyohara Exp $"); #include #include @@ -501,6 +501,8 @@ const struct cpuidtab cpuids[] = { pN_steppings, "7A" }, { CPU_ID_CORTEXA8R3, CPU_CLASS_CORTEX, "Cortex-A8 r3", pN_steppings, "7A" }, + { CPU_ID_CORTEXA9R1, CPU_CLASS_CORTEX, "Cortex-A9 r1", + pN_steppings, "7A" }, { CPU_ID_CORTEXA9R2, CPU_CLASS_CORTEX, "Cortex-A9 r2", pN_steppings, "7A" }, { CPU_ID_CORTEXA9R3, CPU_CLASS_CORTEX, "Cortex-A9 r3",
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Mon Jul 11 14:27:03 UTC 2016 Modified Files: src/sys/arch/mips/mips: locore_octeon.S Log Message: Use the correct register (s0) for the cpu number to copy to the second argument (a1) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/locore_octeon.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/locore_octeon.S diff -u src/sys/arch/mips/mips/locore_octeon.S:1.7 src/sys/arch/mips/mips/locore_octeon.S:1.8 --- src/sys/arch/mips/mips/locore_octeon.S:1.7 Wed Jun 10 22:31:00 2015 +++ src/sys/arch/mips/mips/locore_octeon.S Mon Jul 11 14:27:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_octeon.S,v 1.7 2015/06/10 22:31:00 matt Exp $ */ +/* $NetBSD: locore_octeon.S,v 1.8 2016/07/11 14:27:03 skrll Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -27,7 +27,7 @@ */ #include -RCSID("$NetBSD: locore_octeon.S,v 1.7 2015/06/10 22:31:00 matt Exp $") +RCSID("$NetBSD: locore_octeon.S,v 1.8 2016/07/11 14:27:03 skrll Exp $") #include "cpunode.h" /* for NWDOG */ #include "opt_cputype.h" @@ -143,7 +143,7 @@ NESTED_NOPROFILE(octeon_cpu_spinup, 0, r beqz a0, 3b # loop until not NULL nop jal _C_LABEL(kcpuset_atomic_set) - move a1, s1 # pass it our cpu number + move a1, s0 # pass it our cpu number // Wait until cpuid_infos[cpunum] is not NULL. PTR_LA a1, _C_LABEL(cpuid_infos)
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Mon Jul 11 14:18:16 UTC 2016 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: KNF and simplify a little. To generate a diff of this commit: cvs rdiff -u -r1.210 -r1.211 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.210 src/sys/arch/x86/x86/pmap.c:1.211 --- src/sys/arch/x86/x86/pmap.c:1.210 Sat Jul 9 09:33:21 2016 +++ src/sys/arch/x86/x86/pmap.c Mon Jul 11 14:18:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.210 2016/07/09 09:33:21 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.211 2016/07/11 14:18:16 maxv Exp $ */ /*- * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.210 2016/07/09 09:33:21 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.211 2016/07/11 14:18:16 maxv Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -1656,7 +1656,6 @@ pmap_prealloc_lowmem_ptps(void) HYPERVISOR_update_va_mapping (newp + KERNBASE, xpmap_ptom_masked(newp) | PG_u | PG_V, UVMF_INVLPG); - if (level == PTP_LEVELS) { /* Top level pde is per-cpu */ pd_entry_t *kpm_pdir; /* Reach it via recursive mapping */ @@ -4305,7 +4304,6 @@ pmap_alloc_level(pd_entry_t * const *pde long *needed_ptps) { unsigned long i; - vaddr_t va; paddr_t pa; unsigned long index, endindex; int level; @@ -4319,20 +4317,18 @@ pmap_alloc_level(pd_entry_t * const *pde pdep = pmap_kernel()->pm_pdir; else pdep = pdes[level - 2]; - va = kva; index = pl_i_roundup(kva, level); endindex = index + needed_ptps[level - 1] - 1; - for (i = index; i <= endindex; i++) { pt_entry_t pte; KASSERT(!pmap_valid_entry(pdep[i])); pa = pmap_get_physpage(); pte = pmap_pa2pte(pa) | PG_k | PG_V | PG_RW; -#ifdef XEN pmap_pte_set([i], pte); -#if defined(PAE) || defined(__x86_64__) + +#if defined(XEN) && (defined(PAE) || defined(__x86_64__)) if (level == PTP_LEVELS && i >= PDIR_SLOT_KERN) { if (__predict_true( cpu_info_primary.ci_flags & CPUF_PRESENT)) { @@ -4354,14 +4350,11 @@ pmap_alloc_level(pd_entry_t * const *pde pmap_pte_set(cpu_pdep, pte); } } -#endif /* PAE || __x86_64__ */ -#else /* XEN */ - pdep[i] = pte; -#endif /* XEN */ +#endif /* XEN && (PAE || __x86_64__) */ + KASSERT(level != PTP_LEVELS || nkptp[level - 1] + pl_i(VM_MIN_KERNEL_ADDRESS, level) == i); nkptp[level - 1]++; - va += nbpd[level - 1]; } pmap_pte_flush(); } @@ -4403,16 +4396,11 @@ pmap_growkernel(vaddr_t maxkvaddr) old = nkptp[PTP_LEVELS - 1]; #endif - /* - * This loop could be optimized more, but pmap_growkernel() - * is called infrequently. - */ + /* Initialize needed_kptp. */ for (i = PTP_LEVELS - 1; i >= 1; i--) { target_nptp = pl_i_roundup(maxkvaddr, i + 1) - pl_i_roundup(VM_MIN_KERNEL_ADDRESS, i + 1); - /* - * XXX only need to check toplevel. - */ + if (target_nptp > nkptpmax[i]) panic("out of KVA space"); KASSERT(target_nptp >= nkptp[i]); @@ -4422,8 +4410,7 @@ pmap_growkernel(vaddr_t maxkvaddr) pmap_alloc_level(normal_pdes, pmap_maxkvaddr, PTP_LEVELS, needed_kptp); /* - * If the number of top level entries changed, update all - * pmaps. + * If the number of top level entries changed, update all pmaps. */ if (needed_kptp[PTP_LEVELS - 1] != 0) { #ifdef XEN @@ -4433,7 +4420,7 @@ pmap_growkernel(vaddr_t maxkvaddr) mutex_enter(_lock); LIST_FOREACH(pm, , pm_list) { int pdkidx; - for (pdkidx = PDIR_SLOT_KERN + old; + for (pdkidx = PDIR_SLOT_KERN + old; pdkidx < PDIR_SLOT_KERN + nkptp[PTP_LEVELS - 1]; pdkidx++) { pmap_pte_set(>pm_pdir[pdkidx], @@ -4449,8 +4436,8 @@ pmap_growkernel(vaddr_t maxkvaddr) mutex_enter(_lock); LIST_FOREACH(pm, , pm_list) { memcpy(>pm_pdir[PDIR_SLOT_KERN + old], - >pm_pdir[PDIR_SLOT_KERN + old], - newpdes * sizeof (pd_entry_t)); + >pm_pdir[PDIR_SLOT_KERN + old], + newpdes * sizeof (pd_entry_t)); } mutex_exit(_lock); #endif
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: msaitoh Date: Mon Jul 11 11:26:46 UTC 2016 Modified Files: src/sys/arch/i386/conf: ALL Log Message: Add tcpcib, gpioiic, gpiopwm and bwi into i386/conf/ALL. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/sys/arch/i386/conf/ALL 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/ALL diff -u src/sys/arch/i386/conf/ALL:1.398 src/sys/arch/i386/conf/ALL:1.399 --- src/sys/arch/i386/conf/ALL:1.398 Wed May 11 02:09:10 2016 +++ src/sys/arch/i386/conf/ALL Mon Jul 11 11:26:46 2016 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.398 2016/05/11 02:09:10 riastradh Exp $ +# $NetBSD: ALL,v 1.399 2016/07/11 11:26:46 msaitoh Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.398 $" +#ident "ALL-$Revision: 1.399 $" maxusers 64 # estimated number of users @@ -488,6 +488,8 @@ ichlpcib* at pci? dev ? function ? # Int hpet0 at ichlpcib? # High Precision Event Timer fwhrng* at ichlpcib? # Intel 82802 FWH Random Number Generator tco* at ichlpcib? # TCO watchdog timer +tcpcib* at pci? dev ? function ? # Intel Atom E6xx PCI-LPC +hpet* at tcpcib? gcscpcib* at pci? dev ? function ? # AMD CS5535/CS5536 PCI-ISA w/ gpio* at gcscpcib? # timecounter, watchdog and GPIO piixpcib* at pci? dev ? function ? # Intel PIIX4 PCI-ISA w/ SpeedStep @@ -788,9 +790,17 @@ onewire* at gpioow? # 1-Wire devices owtemp* at onewire? # Temperature sensors +# i2c support +gpioiic* at gpio? offset ? mask ? flag 0x00 # flag 0x01 reverses + # SCA and SCL signals +iic* at gpioiic? + # Keylock support gpiolock* at gpio? +# Software pulsing GPIO pins +gpiopwm* at gpio? + # Soekris 6501 GPIO/LED driver (provides gpiobus, needs gpio) soekrisgpio0 at isa? port 0x680 @@ -1145,6 +1155,7 @@ we1 at isa? port 0x300 iomem 0xcc000 irq ath* at cardbus? function ? # Atheros 5210/5211/5212 802.11 athn* at cardbus? function ? # Atheros AR9k (802.11a/g/n) atw* at cardbus? function ? # ADMtek ADM8211 (802.11) +bwi* at cardbus? function ? # Broadcom BCM43xx wireless ex* at cardbus? function ? # 3Com 3c575TX fxp* at cardbus? function ? # Intel i8255x ral* at cardbus? function ? # Ralink Technology RT25x0 802.11a/b/g
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: msaitoh Date: Mon Jul 11 11:25:54 UTC 2016 Modified Files: src/sys/arch/amd64/conf: ALL Log Message: Add gpioiic into amd64/conf/ALL To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amd64/conf/ALL 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/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.35 src/sys/arch/amd64/conf/ALL:1.36 --- src/sys/arch/amd64/conf/ALL:1.35 Sun May 8 07:41:37 2016 +++ src/sys/arch/amd64/conf/ALL Mon Jul 11 11:25:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.35 2016/05/08 07:41:37 skrll Exp $ +# $NetBSD: ALL,v 1.36 2016/07/11 11:25:54 msaitoh Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.35 $" +#ident "ALL-$Revision: 1.36 $" maxusers 64 # estimated number of users @@ -689,6 +689,10 @@ onewire* at gpioow? # 1-Wire devices owtemp* at onewire? # Temperature sensors +# I2C support +gpioiic* at gpio? +iic* at gpioiic? + # Keylock support gpiolock* at gpio?
CVS commit: src/sys/dev/dec
Module Name:src Committed By: skrll Date: Mon Jul 11 10:55:35 UTC 2016 Modified Files: src/sys/dev/dec: lk201_ws.c Log Message: Don't use a callout unnecessarily - especially not this early To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/dec/lk201_ws.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/dec/lk201_ws.c diff -u src/sys/dev/dec/lk201_ws.c:1.9 src/sys/dev/dec/lk201_ws.c:1.10 --- src/sys/dev/dec/lk201_ws.c:1.9 Fri Jan 2 21:32:26 2015 +++ src/sys/dev/dec/lk201_ws.c Mon Jul 11 10:55:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lk201_ws.c,v 1.9 2015/01/02 21:32:26 jklos Exp $ */ +/* $NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.9 2015/01/02 21:32:26 jklos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $"); #include #include @@ -43,8 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v void lk201_identify(void *); -static callout_t lkkbd_id; - static const char *lkkbd_descr[] = { "no keyboard", "LK-201 keyboard", @@ -82,20 +80,6 @@ lk201_init(struct lk201_state *lks) send(lks, LK_LED_ALL); lks->leds_state = 0; - callout_init(_id, 0); - callout_setfunc(_id, lk201_identify, lks); - callout_schedule(_id, 0); - - return (0); -} - -void -lk201_identify(void *v) -{ - struct lk201_state *lks = v; - int i; - - callout_destroy(_id); /* * Swallow all the keyboard acknowledges from lk201_init(). * There should be 14 of them - one per LK_CMD_MODE command. @@ -133,6 +117,8 @@ lk201_identify(void *v) lks->waitack = 0; printf("lkkbd0: %s\n", lkkbd_descr[lks->kbdtype]); + + return 0; } int
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jul 11 10:47:52 UTC 2016 Modified Files: src/share/man/man9: pci_msi.9 Log Message: Bump date for function prototype change. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/pci_msi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pci_msi.9 diff -u src/share/man/man9/pci_msi.9:1.8 src/share/man/man9/pci_msi.9:1.9 --- src/share/man/man9/pci_msi.9:1.8 Mon Jul 11 06:14:51 2016 +++ src/share/man/man9/pci_msi.9 Mon Jul 11 10:47:52 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_msi.9,v 1.8 2016/07/11 06:14:51 knakahara Exp $ +.\" $NetBSD: pci_msi.9,v 1.9 2016/07/11 10:47:52 wiz Exp $ .\" .\" Copyright (c) 2015 Internet Initiative Japan Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 13, 2015 +.Dd July 11, 2016 .Dt PCI_MSI 9 .Os .Sh NAME
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Mon Jul 11 10:40:40 UTC 2016 Modified Files: src/doc [netbsd-7]: CHANGES-7.1 Log Message: Tickets #1201 - #1203 To generate a diff of this commit: cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-7.1 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.1 diff -u src/doc/CHANGES-7.1:1.1.2.97 src/doc/CHANGES-7.1:1.1.2.98 --- src/doc/CHANGES-7.1:1.1.2.97 Sun Jul 10 10:42:26 2016 +++ src/doc/CHANGES-7.1 Mon Jul 11 10:40:40 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1,v 1.1.2.97 2016/07/10 10:42:26 martin Exp $ +# $NetBSD: CHANGES-7.1,v 1.1.2.98 2016/07/11 10:40:40 martin Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1 release: @@ -4985,3 +4985,22 @@ sys/arch/mips/mips/pmap.c 1.221-1.223 Various fixes to MIPS pmap. [skrll, ticket #1200] +external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c 1.5 +external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h 1.2 + + Avoid legacy VGA I/O port access on MIPS. + This fixes Xorg on the Lemote YeeLoong netbook. + [jmcneill, ticket #1201] + +sys/arch/evbmips/loongson/yeeloong_machdep.c 1.8 + + The version of PMON on my 8089B (LM8089-1.4.9a) configures OHCI + but doesn't enable memory space access. Enable it before the ohci + driver attaches to allow low- and full-speed devices to work. + [jmcneill, ticket #1202] + +sys/dev/pci/lynxfb.c1.5 + + fix inverted screen blanking logic + [jmcneill, ticket #1203] +
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: martin Date: Mon Jul 11 10:39:42 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-7]: lynxfb.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1203): sys/dev/pci/lynxfb.c: revision 1.5 fix inverted screen blanking logic To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/dev/pci/lynxfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/lynxfb.c diff -u src/sys/dev/pci/lynxfb.c:1.4 src/sys/dev/pci/lynxfb.c:1.4.16.1 --- src/sys/dev/pci/lynxfb.c:1.4 Wed Mar 14 13:41:07 2012 +++ src/sys/dev/pci/lynxfb.c Mon Jul 11 10:39:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $ */ +/* $NetBSD: lynxfb.c,v 1.4.16.1 2016/07/11 10:39:42 martin Exp $ */ /* $OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $ */ /* @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.4.16.1 2016/07/11 10:39:42 martin Exp $"); #include "opt_wsemul.h" @@ -824,11 +824,11 @@ lynxfb_vcons_eraserows(void *cookie, int } static void -lynxfb_blank(struct lynxfb *fb, int blank) +lynxfb_blank(struct lynxfb *fb, int enable) { - fb->blank = blank; - if (!blank) { + fb->blank = !enable; + if (enable) { lynxfb_vgats_write(fb, 0x31, lynxfb_vgats_read(fb, 0x31) | 0x01); } else {
CVS commit: [netbsd-7] src/sys/arch/evbmips/loongson
Module Name:src Committed By: martin Date: Mon Jul 11 10:37:51 UTC 2016 Modified Files: src/sys/arch/evbmips/loongson [netbsd-7]: yeeloong_machdep.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1202): sys/arch/evbmips/loongson/yeeloong_machdep.c: revision 1.8 The version of PMON on my 8089B (LM8089-1.4.9a) configures OHCI but doesn't enable memory space access. Enable it before the ohci driver attaches to allow low- and full-speed devices to work. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/arch/evbmips/loongson/yeeloong_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/evbmips/loongson/yeeloong_machdep.c diff -u src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6 src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6.4.1 --- src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6 Sat Mar 29 19:28:28 2014 +++ src/sys/arch/evbmips/loongson/yeeloong_machdep.c Mon Jul 11 10:37:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $ */ +/* $NetBSD: yeeloong_machdep.c,v 1.6.4.1 2016/07/11 10:37:51 martin Exp $ */ /* $OpenBSD: yeeloong_machdep.c,v 1.16 2011/04/15 20:40:06 deraadt Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.6.4.1 2016/07/11 10:37:51 martin Exp $"); #include #include @@ -558,6 +558,18 @@ lemote_device_register(device_t dev, voi if (device_class(dev) != bootdev_class) return; + /* OHCI memory space access may not be enabled by the BIOS */ + if (device_is_a(dev, "ohci")) { + struct pci_attach_args *pa = aux; + pcireg_t csr = pci_conf_read(pa->pa_pc, pa->pa_tag, + PCI_COMMAND_STATUS_REG); + if ((csr & PCI_COMMAND_MEM_ENABLE) == 0) { + csr |= PCI_COMMAND_MEM_ENABLE; + pci_conf_write(pa->pa_pc, pa->pa_tag, + PCI_COMMAND_STATUS_REG, csr); + } + } + /* * The device numbering must match. There's no way * pmon tells us more info. Depending on the usb slot
CVS commit: [netbsd-7] xsrc/external/mit
Module Name:xsrc Committed By: martin Date: Mon Jul 11 10:18:49 UTC 2016 Modified Files: xsrc/external/mit/xf86-video-siliconmotion/dist/src [netbsd-7]: smi_driver.c xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw [netbsd-7]: vgaHW.h Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1201): external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c: revision 1.5 external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h: revision 1.2 Avoid legacy VGA I/O port access on MIPS. Xorg converts the I/O port address to a pointer and dereferences it, and then seg faults. This fixes Xorg on my Lemote YeeLoong netbook. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 \ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.10.1 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.3 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.3.4.1 --- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.3 Mon Jun 3 08:50:48 2013 +++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c Mon Jul 11 10:18:49 2016 @@ -2011,6 +2011,7 @@ SMI_EnableVideo(ScrnInfoPtr pScrn) void SMI_EnableMmio(ScrnInfoPtr pScrn) { +#if !defined(__mips__) SMIPtr pSmi = SMIPTR(pScrn); ENTER(); @@ -2039,11 +2040,13 @@ SMI_EnableMmio(ScrnInfoPtr pScrn) } LEAVE(); +#endif } void SMI_DisableMmio(ScrnInfoPtr pScrn) { +#if !defined(__mips__) SMIPtr pSmi = SMIPTR(pScrn); ENTER(); @@ -2063,6 +2066,7 @@ SMI_DisableMmio(ScrnInfoPtr pScrn) } LEAVE(); +#endif } static void Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.3.10.1 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.3 Tue Nov 23 05:21:46 2010 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h Mon Jul 11 10:18:49 2016 @@ -174,7 +174,7 @@ typedef struct _vgaHWRec { #define BITS_PER_GUN 6 #define COLORMAP_SIZE 256 -#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__) +#if defined(__powerpc__) || defined(__arm__) || defined(__mips__) || defined(__s390__) || defined(__nds32__) #define DACDelay(hw) /* No legacy VGA support */ #else #define DACDelay(hw) \
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: knakahara Date: Mon Jul 11 09:42:20 UTC 2016 Modified Files: src/sys/arch/x86/x86: intr.c Log Message: strncpy should use destination buf length instead of source buf length. pointed out by nonaka@n.o. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.92 src/sys/arch/x86/x86/intr.c:1.93 --- src/sys/arch/x86/x86/intr.c:1.92 Mon Jun 20 08:14:06 2016 +++ src/sys/arch/x86/x86/intr.c Mon Jul 11 09:42:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.92 2016/06/20 08:14:06 hannken Exp $ */ +/* $NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.92 2016/06/20 08:14:06 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -2103,7 +2103,7 @@ interrupt_get_devname(const char *intrid } slot = ih->ih_slot; isp = ih->ih_cpu->ci_isources[slot]; - strncpy(buf, isp->is_xname, INTRDEVNAMEBUF); + strncpy(buf, isp->is_xname, len); out: mutex_exit(_lock);
CVS commit: src/sys/arch/mips/cavium
Module Name:src Committed By: skrll Date: Mon Jul 11 08:09:15 UTC 2016 Modified Files: src/sys/arch/mips/cavium: octeon_cpunode.c Log Message: Fix an aprint_normal To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/cavium/octeon_cpunode.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/cavium/octeon_cpunode.c diff -u src/sys/arch/mips/cavium/octeon_cpunode.c:1.5 src/sys/arch/mips/cavium/octeon_cpunode.c:1.6 --- src/sys/arch/mips/cavium/octeon_cpunode.c:1.5 Wed Jun 10 22:31:00 2015 +++ src/sys/arch/mips/cavium/octeon_cpunode.c Mon Jul 11 08:09:15 2016 @@ -453,7 +453,7 @@ wdog_cpunode_attach(device_t parent, dev for (CPU_INFO_FOREACH(cii, ci)) { } -aprint_normal(": default period is %u seconds%s\n", +aprint_normal(": default period is %u second%s\n", sc->sc_wdog_period, sc->sc_wdog_period == 1 ? "" : "s"); if (sysmon_wdog_register(>sc_smw) != 0) {
CVS commit: src/sys/kern
Module Name:src Committed By: msaitoh Date: Mon Jul 11 07:42:13 UTC 2016 Modified Files: src/sys/kern: subr_autoconf.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/kern/subr_autoconf.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/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.242 src/sys/kern/subr_autoconf.c:1.243 --- src/sys/kern/subr_autoconf.c:1.242 Sun Jun 19 09:35:06 2016 +++ src/sys/kern/subr_autoconf.c Mon Jul 11 07:42:13 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.242 2016/06/19 09:35:06 bouyer Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.243 2016/07/11 07:42:13 msaitoh Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.242 2016/06/19 09:35:06 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.243 2016/07/11 07:42:13 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -856,7 +856,7 @@ rescan_with_cfdata(const struct cfdata * device_t d; const struct cfdata *cf1; deviter_t di; - + /* * "alldevs" is likely longer than a modules's cfdata, so make it @@ -1375,11 +1375,13 @@ config_devalloc(const device_t parent, c ca->ca_devsize, sizeof(struct device)); /* get memory for all device vars */ - KASSERT((ca->ca_flags & DVF_PRIV_ALLOC) || ca->ca_devsize >= sizeof(struct device)); + KASSERT((ca->ca_flags & DVF_PRIV_ALLOC) + || ca->ca_devsize >= sizeof(struct device)); if (ca->ca_devsize > 0) { dev_private = kmem_zalloc(ca->ca_devsize, KM_SLEEP); if (dev_private == NULL) - panic("config_devalloc: memory allocation for device softc failed"); + panic("config_devalloc: memory allocation for device " + "softc failed"); } else { KASSERT(ca->ca_flags & DVF_PRIV_ALLOC); dev_private = NULL; @@ -1571,8 +1573,10 @@ config_attach_loc(device_t parent, cfdat aprint_naive("%s (root)", device_xname(dev)); aprint_normal("%s (root)", device_xname(dev)); } else { - aprint_naive("%s at %s", device_xname(dev), device_xname(parent)); - aprint_normal("%s at %s", device_xname(dev), device_xname(parent)); + aprint_naive("%s at %s", device_xname(dev), + device_xname(parent)); + aprint_normal("%s at %s", device_xname(dev), + device_xname(parent)); if (print) (void) (*print)(aux, NULL); } @@ -1600,7 +1604,8 @@ config_attach_loc(device_t parent, cfdat (*dev->dv_cfattach->ca_attach)(parent, dev, aux); if (!device_pmf_is_registered(dev)) - aprint_debug_dev(dev, "WARNING: power management not supported\n"); + aprint_debug_dev(dev, "WARNING: power management not " + "supported\n"); config_process_deferred(_config_queue, dev); @@ -1782,7 +1787,8 @@ config_detach(device_t dev, int flags) d = TAILQ_NEXT(d, dv_list)) { if (d->dv_parent == dev && d->dv_del_gen == 0) { printf("config_detach: detached device %s" - " has children %s\n", device_xname(dev), device_xname(d)); + " has children %s\n", device_xname(dev), + device_xname(d)); panic("config_detach"); } } @@ -2044,8 +2050,7 @@ config_mountroot(device_t dev, void (*fu * Process a deferred configuration queue. */ static void -config_process_deferred(struct deferred_config_head *queue, -device_t parent) +config_process_deferred(struct deferred_config_head *queue, device_t parent) { struct deferred_config *dc, *ndc; @@ -2213,7 +2218,7 @@ config_alldevs_enter(struct alldevs_fora TAILQ_INIT(>af_garbage); mutex_enter(_mtx); config_collect_garbage(>af_garbage); -} +} static void config_alldevs_exit(struct alldevs_foray *af) @@ -2410,9 +2415,9 @@ pmflock_debug(device_t dev, const char * { device_lock_t dvl = device_getlock(dev); - aprint_debug_dev(dev, "%s.%d, %s dvl_nlock %d dvl_nwait %d dv_flags %x\n", - func, line, curlwp_name(), dvl->dvl_nlock, dvl->dvl_nwait, - dev->dv_flags); + aprint_debug_dev(dev, + "%s.%d, %s dvl_nlock %d dvl_nwait %d dv_flags %x\n", func, line, + curlwp_name(), dvl->dvl_nlock, dvl->dvl_nwait, dev->dv_flags); } static bool
CVS commit: src/sys/dev/isa
Module Name:src Committed By: msaitoh Date: Mon Jul 11 07:11:08 UTC 2016 Modified Files: src/sys/dev/isa: if_eg.c Log Message: - Use aprint*() instead of printf() in the attach function. - KNF. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/dev/isa/if_eg.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/isa/if_eg.c diff -u src/sys/dev/isa/if_eg.c:1.90 src/sys/dev/isa/if_eg.c:1.91 --- src/sys/dev/isa/if_eg.c:1.90 Fri Jun 10 13:27:14 2016 +++ src/sys/dev/isa/if_eg.c Mon Jul 11 07:11:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.90 2016/06/10 13:27:14 ozaki-r Exp $ */ +/* $NetBSD: if_eg.c,v 1.91 2016/07/11 07:11:08 msaitoh Exp $ */ /* * Copyright (c) 1993 Dean Huxley@@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.90 2016/06/10 13:27:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.91 2016/07/11 07:11:08 msaitoh Exp $"); #include "opt_inet.h" @@ -427,17 +427,18 @@ egattach(device_t parent, device_t self, } memcpy(myaddr, >eg_pcb[2], ETHER_ADDR_LEN); - printf("%s: ROM v%d.%02d %dk address %s\n", device_xname(self), + aprint_normal_dev(self, "ROM v%d.%02d %dk address %s\n", sc->eg_rom_major, sc->eg_rom_minor, sc->eg_ram, ether_sprintf(myaddr)); sc->eg_pcb[0] = EG_CMD_SETEADDR; /* Set station address */ if (egwritePCB(iot, ioh, sc->eg_pcb) != 0) { - printf("%s: can't send Set Station Address\n", device_xname(self)); + aprint_error_dev(self, "can't send Set Station Address\n"); return; } if (egreadPCB(iot, ioh, sc->eg_pcb) != 0) { - aprint_error_dev(self, "can't read Set Station Address status\n"); + aprint_error_dev(self, + "can't read Set Station Address status\n"); egprintpcb(sc->eg_pcb); return; } @@ -491,10 +492,11 @@ eginit(struct eg_softc *sc) aprint_error_dev(sc->sc_dev, "can't send Configure 82586\n"); if (egreadPCB(iot, ioh, sc->eg_pcb) != 0) { - aprint_error_dev(sc->sc_dev, "can't read Configure 82586 status\n"); + aprint_error_dev(sc->sc_dev, + "can't read Configure 82586 status\n"); egprintpcb(sc->eg_pcb); } else if (sc->eg_pcb[2] != 0 || sc->eg_pcb[3] != 0) - aprint_error_dev(sc->sc_dev, "configure card command failed\n"); + aprint_error_dev(sc->sc_dev,"configure card command failed\n"); if (sc->eg_inbuf == NULL) { sc->eg_inbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT); @@ -508,7 +510,7 @@ eginit(struct eg_softc *sc) if (sc->eg_outbuf == NULL) { sc->eg_outbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT); if (sc->eg_outbuf == NULL) { - aprint_error_dev(sc->sc_dev, "can't allocate outbuf\n"); + aprint_error_dev(sc->sc_dev,"can't allocate outbuf\n"); panic("eginit"); } } @@ -588,7 +590,8 @@ loop: sc->eg_pcb[6] = len; /* length of packet */ sc->eg_pcb[7] = len >> 8; if (egwritePCB(iot, ioh, sc->eg_pcb) != 0) { - aprint_error_dev(sc->sc_dev, "can't send Send Packet command\n"); + aprint_error_dev(sc->sc_dev, + "can't send Send Packet command\n"); ifp->if_oerrors++; ifp->if_flags &= ~IFF_OACTIVE; m_freem(m0); @@ -710,7 +713,8 @@ egread(struct eg_softc *sc, void *buf, i if (len <= sizeof(struct ether_header) || len > ETHER_MAX_LEN) { - aprint_error_dev(sc->sc_dev, "invalid packet size %d; dropping\n", len); + aprint_error_dev(sc->sc_dev, + "invalid packet size %d; dropping\n", len); ifp->if_ierrors++; return; }
CVS commit: src
Module Name:src Committed By: knakahara Date: Mon Jul 11 06:14:51 UTC 2016 Modified Files: src/share/man/man9: pci_msi.9 src/sys/arch/x86/include: pci_machdep_common.h src/sys/arch/x86/pci: pci_intr_machdep.c src/sys/dev/pci: if_bge.c if_wm.c ismt.c nvme_pci.c pci_stub.c pcivar.h virtio.c src/sys/dev/pci/ixgbe: ixgbe.c Log Message: pci_intr_type() is required pci_chipset_tag_t argument by other than x86. pointed out by nonaka@n.o. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/pci_msi.9 cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/include/pci_machdep_common.h cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/pci/pci_intr_machdep.c cvs rdiff -u -r1.297 -r1.298 src/sys/dev/pci/if_bge.c cvs rdiff -u -r1.415 -r1.416 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ismt.c src/sys/dev/pci/nvme_pci.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/pci_stub.c cvs rdiff -u -r1.107 -r1.108 src/sys/dev/pci/pcivar.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/virtio.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pci_msi.9 diff -u src/share/man/man9/pci_msi.9:1.7 src/share/man/man9/pci_msi.9:1.8 --- src/share/man/man9/pci_msi.9:1.7 Thu Aug 13 05:01:04 2015 +++ src/share/man/man9/pci_msi.9 Mon Jul 11 06:14:51 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_msi.9,v 1.7 2015/08/13 05:01:04 msaitoh Exp $ +.\" $NetBSD: pci_msi.9,v 1.8 2016/07/11 06:14:51 knakahara Exp $ .\" .\" Copyright (c) 2015 Internet Initiative Japan Inc. .\" All rights reserved. @@ -75,7 +75,8 @@ .Fn pci_intr_release "pci_chipset_tag_t pc" \ "pci_intr_handle_t *pih" "int count" .Ft pci_intr_type_t -.Fn pci_intr_type "pci_intr_handle_t ih" +.Fn pci_intr_type "pci_chipset_tag_t pc" \ +"pci_intr_handle_t ih" .Sh DESCRIPTION The .Nm Index: src/sys/arch/x86/include/pci_machdep_common.h diff -u src/sys/arch/x86/include/pci_machdep_common.h:1.22 src/sys/arch/x86/include/pci_machdep_common.h:1.23 --- src/sys/arch/x86/include/pci_machdep_common.h:1.22 Thu Oct 22 09:45:32 2015 +++ src/sys/arch/x86/include/pci_machdep_common.h Mon Jul 11 06:14:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep_common.h,v 1.22 2015/10/22 09:45:32 knakahara Exp $ */ +/* $NetBSD: pci_machdep_common.h,v 1.23 2016/07/11 06:14:51 knakahara Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -127,7 +127,7 @@ typedef enum { PCI_INTR_TYPE_SIZE, } pci_intr_type_t; -pci_intr_type_t pci_intr_type(pci_intr_handle_t); +pci_intr_type_t pci_intr_type(pci_chipset_tag_t, pci_intr_handle_t); /* * Wrapper function for generally unitied allocation to fallback MSI-X/MSI/INTx * automatically. Index: src/sys/arch/x86/pci/pci_intr_machdep.c diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.37 src/sys/arch/x86/pci/pci_intr_machdep.c:1.38 --- src/sys/arch/x86/pci/pci_intr_machdep.c:1.37 Mon Aug 17 06:16:03 2015 +++ src/sys/arch/x86/pci/pci_intr_machdep.c Mon Jul 11 06:14:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.37 2015/08/17 06:16:03 knakahara Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.38 2016/07/11 06:14:51 knakahara Exp $ */ /*- * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.37 2015/08/17 06:16:03 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.38 2016/07/11 06:14:51 knakahara Exp $"); #include #include @@ -352,7 +352,7 @@ pci_intr_disestablish(pci_chipset_tag_t #if NIOAPIC > 0 pci_intr_type_t -pci_intr_type(pci_intr_handle_t ih) +pci_intr_type(pci_chipset_tag_t pc, pci_intr_handle_t ih) { if (INT_VIA_MSI(ih)) { Index: src/sys/dev/pci/if_bge.c diff -u src/sys/dev/pci/if_bge.c:1.297 src/sys/dev/pci/if_bge.c:1.298 --- src/sys/dev/pci/if_bge.c:1.297 Fri Jun 10 13:27:14 2016 +++ src/sys/dev/pci/if_bge.c Mon Jul 11 06:14:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.297 2016/06/10 13:27:14 ozaki-r Exp $ */ +/* $NetBSD: if_bge.c,v 1.298 2016/07/11 06:14:51 knakahara Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.297 2016/06/10 13:27:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.298 2016/07/11 06:14:51 knakahara Exp $"); #include #include @@ -3744,7 +3744,7 @@ alloc_retry: sc->bge_intrhand = pci_intr_establish(pc, sc->bge_pihp[0], IPL_NET, bge_intr, sc); if (sc->bge_intrhand == NULL) { - intr_type = pci_intr_type(sc->bge_pihp[0]); + intr_type = pci_intr_type(pc, sc->bge_pihp[0]); aprint_error_dev(sc->bge_dev,"unable to establish %s\n", (intr_type == PCI_INTR_TYPE_MSI) ? "MSI" : "INTx"); pci_intr_release(pc, sc->bge_pihp, 1); Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.415