CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sun Mar 4 08:04:59 UTC 2018 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Less ifdefs -> more readable. NFC intended To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/arm/arm32/bus_dma.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/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.105 src/sys/arch/arm/arm32/bus_dma.c:1.106 --- src/sys/arch/arm/arm32/bus_dma.c:1.105 Sat Mar 3 18:14:27 2018 +++ src/sys/arch/arm/arm32/bus_dma.c Sun Mar 4 08:04:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.105 2018/03/03 18:14:27 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.106 2018/03/04 08:04:59 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_arm_bus_space.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.105 2018/03/03 18:14:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.106 2018/03/04 08:04:59 skrll Exp $"); #include #include @@ -793,6 +793,17 @@ static void _bus_dmamap_sync_segment(vaddr_t va, paddr_t pa, vsize_t len, int ops, bool readonly_p) { + +#ifdef ARM_MMU_EXTENDED + /* + * No optimisations are available for readonly mbufs on armv6+, so + * assume it's not readonly from here on. + * + * See the comment in _bus_dmamap_sync_mbuf + */ + readonly_p = false; +#endif + KASSERTMSG((va & PAGE_MASK) == (pa & PAGE_MASK), "va %#lx pa %#lx", va, pa); #if 0 @@ -802,19 +813,13 @@ _bus_dmamap_sync_segment(vaddr_t va, pad switch (ops) { case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE: -#ifdef ARM_MMU_EXTENDED - (void)readonly_p; -#else if (!readonly_p) { -#endif STAT_INCR(sync_prereadwrite); cpu_dcache_wbinv_range(va, len); cpu_sdcache_wbinv_range(va, pa, len); break; -#ifndef ARM_MMU_EXTENDED } /* FALLTHROUGH */ -#endif case BUS_DMASYNC_PREREAD: { const size_t line_size = arm_dcache_align;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 10:26:10 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: dedup code around pmap_reactivate() - do the actual TLB flush also To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 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.283 src/sys/arch/x86/x86/pmap.c:1.284 --- src/sys/arch/x86/x86/pmap.c:1.283 Sun Mar 4 10:13:09 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 10:26:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.283 2018/03/04 10:13:09 jdolecek Exp $ */ +/* $NetBSD: pmap.c,v 1.284 2018/03/04 10:26:10 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.283 2018/03/04 10:13:09 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.284 2018/03/04 10:26:10 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -581,7 +581,7 @@ static void pmap_remove_ptes(struct pmap static paddr_t pmap_get_physpage(void); static void pmap_alloc_level(struct pmap *, vaddr_t, long *); -static bool pmap_reactivate(struct pmap *); +static void pmap_reactivate(struct pmap *); /* * p m a p h e l p e r f u n c t i o n s @@ -757,11 +757,7 @@ pmap_map_ptes(struct pmap *pmap, struct * often the case during exit(), when we have switched * to the kernel pmap in order to destroy a user pmap. */ - if (!pmap_reactivate(pmap)) { - u_int gen = uvm_emap_gen_return(); - tlbflush(); - uvm_emap_update(gen); - } + pmap_reactivate(pmap); } else { /* * Toss current pmap from CPU, but keep a reference to it. @@ -2877,12 +2873,11 @@ pmap_activate(struct lwp *l) * => Must be called with kernel preemption disabled. */ -static bool +static void pmap_reactivate(struct pmap *pmap) { struct cpu_info * const ci = curcpu(); const cpuid_t cid = cpu_index(ci); - bool result; KASSERT(kpreempt_disabled()); #if defined(XEN) && defined(__x86_64__) @@ -2908,13 +2903,17 @@ pmap_reactivate(struct pmap *pmap) if (kcpuset_isset(pmap->pm_cpus, cid)) { /* We have the reference, state is valid. */ - result = true; } else { - /* Must reload the TLB. */ + /* + * Must reload the TLB, pmap has been changed during + * deactivated. + */ kcpuset_atomic_set(pmap->pm_cpus, cid); - result = false; + + u_int gen = uvm_emap_gen_return(); + tlbflush(); + uvm_emap_update(gen); } - return result; } /* @@ -2964,18 +2963,7 @@ pmap_load(void) pcb = lwp_getpcb(l); if (pmap == oldpmap) { - if (!pmap_reactivate(pmap)) { - u_int gen = uvm_emap_gen_return(); - - /* - * pmap has been changed during deactivated. - * our tlb may be stale. - */ - - tlbflush(); - uvm_emap_update(gen); - } - + pmap_reactivate(pmap); ci->ci_want_pmapload = 0; kpreempt_enable(); return;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Sun Mar 4 13:11:51 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: apply some updates and recommended corrections to pcidevs descriptions PR kern/45733 by Greg A.Woods To generate a diff of this commit: cvs rdiff -u -r1.1317 -r1.1318 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1317 src/sys/dev/pci/pcidevs:1.1318 --- src/sys/dev/pci/pcidevs:1.1317 Fri Mar 2 06:40:31 2018 +++ src/sys/dev/pci/pcidevs Sun Mar 4 13:11:51 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1317 2018/03/02 06:40:31 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1318 2018/03/04 13:11:51 jdolecek Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2750,29 +2750,29 @@ product INTEL CORE_HB 0x0048 Core Host product INTEL CORE_PCIE_2 0x0049 Core PCIe Root Port product INTEL IRONLAKE_MA_HB 0x0062 Iron Lake Host Bridge product INTEL IRONLAKE_MC2_HB 0x006a Iron Lake Host Bridge -product INTEL WIFI_LINK_6005_2X2_1 0x0082 Centrino Advanced-N 6205 +product INTEL WIFI_LINK_6005_2X2_1 0x0082 Centrino Advanced-N 6205 WiFi product INTEL WIFI_LINK_1000_1 0x0083 WiFi Link 1000 product INTEL WIFI_LINK_1000_2 0x0084 WiFi Link 1000 -product INTEL WIFI_LINK_6005_2X2_2 0x0085 Centrino Advanced-N 6205 -product INTEL WIFI_LINK_6050_2X2_1 0x0087 Centrino Advanced-N 6250 -product INTEL WIFI_LINK_6050_2X2_2 0x0089 Centrino Advanced-N 6250 +product INTEL WIFI_LINK_6005_2X2_2 0x0085 Centrino Advanced-N 6205 WiFi +product INTEL WIFI_LINK_6050_2X2_1 0x0087 Centrino Advanced-N 6250 WiFi +product INTEL WIFI_LINK_6050_2X2_2 0x0089 Centrino Advanced-N 6250 WiFi product INTEL WIFI_LINK_1030_1 0x008a Centrino Wireless-N 1030 product INTEL WIFI_LINK_1030_2 0x008b Centrino Wireless-N 1030 product INTEL WIFI_LINK_6230_1 0x0090 Centrino Advanced-N 6230 product INTEL WIFI_LINK_6230_2 0x0091 Centrino Advanced-N 6230 -product INTEL SANDYBRIDGE_HB 0x0100 Sandy Bridge Host Bridge -product INTEL SANDYBRIDGE_PCIE 0x0101 Sandy Bridge PCIe Root port -product INTEL SANDYBRIDGE_IGD 0x0102 Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_M_HB 0x0104 Sandy Bridge Host Bridge -product INTEL SANDYBRIDGE_PCIE_1 0x0105 Sandy Bridge PCIe Root port -product INTEL SANDYBRIDGE_M_IGD 0x0106 Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_S_HB 0x0108 Sandy Bridge Host Bridge -product INTEL SANDYBRIDGE_PCIE_2 0x0109 Sandy Bridge PCIe Root port -product INTEL SANDYBRIDGE_S_IGD 0x010A Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_IGD_1 0x0112 Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_M_IGD_1 0x0116 Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_IGD_2 0x0122 Sandy Bridge Integrated Graphics Device -product INTEL SANDYBRIDGE_M_IGD_2 0x0126 Sandy Bridge Integrated Graphics Device +product INTEL SANDYBRIDGE_HB 0x0100 Sandy Bridge (desktop) Host Bridge +product INTEL SANDYBRIDGE_PCIE 0x0101 Sandy Bridge (desktop) PCIe Root port +product INTEL SANDYBRIDGE_IGD 0x0102 Sandy Bridge (desktop) GI1 Integrated Graphics Device +product INTEL SANDYBRIDGE_M_HB 0x0104 Sandy Bridge (mobile) Host Bridge +product INTEL SANDYBRIDGE_PCIE_1 0x0105 Sandy Bridge (mobile) PCIe Root port +product INTEL SANDYBRIDGE_M_IGD 0x0106 Sandy Bridge (mobile) GT1 Integrated Graphics Device +product INTEL SANDYBRIDGE_S_HB 0x0108 Sandy Bridge (server) Host Bridge +product INTEL SANDYBRIDGE_PCIE_2 0x0109 Sandy Bridge (server) PCIe Root port +product INTEL SANDYBRIDGE_S_IGD 0x010A Sandy Bridge (server) GT1 Integrated Graphics Device +product INTEL SANDYBRIDGE_IGD_1 0x0112 Sandy Bridge GT2 Integrated Graphics Device +product INTEL SANDYBRIDGE_M_IGD_1 0x0116 Sandy Bridge (mobile) GT2 Integrated Graphics Device +product INTEL SANDYBRIDGE_IGD_2 0x0122 Sandy Bridge (desktop) GT2+ Integrated Graphics Device +product INTEL SANDYBRIDGE_M_IGD_2 0x0126 Sandy Bridge (mobile) GT2+ Integrated Graphics Device product INTEL IVYBRIDGE_HB 0x0150 Ivy Bridge Host Bridge product INTEL IVYBRIDGE_PCIE 0x0151 Ivy Bridge PCI Express Root Port product INTEL IVYBRIDGE_IGD 0x0152 Ivy Bridge Integrated Graphics Device @@ -3429,31 +3429,31 @@ product INTEL 82845_HB 0x1a30 82845 Hos product INTEL 82845_AGP 0x1a31 82845 AGP product INTEL 5000_DMA 0x1a38 5000 Series Chipset DMA Engine product INTEL 82597EX_SR 0x1a48 PRO/10GbE SR Server Adapter -product INTEL 6SERIES_SATA_1 0x1c00 6 Series SATA -product INTEL 6SERIES_SATA_2 0x1c01 6 Series SATA -product INTEL 6SERIES_AHCI_1 0x1c02 6 Series AHCI -product INTEL 6SERIES_AHCI_2 0x1c03 6 Series AHCI -product INTEL 6SERIES_RAID_1 0x1c04 6 Series RAID -product INTEL 6SERIES_RAID_2 0x1c05 6 Series RAID -product INTEL 6SERIES_RAID_3 0x1c06 6 Series RAID -product INTEL 6SERIES_SATA_3 0x1c08 6 Series SATA -product INTEL 6SERIES_SATA_4 0x1c09 6
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 10:02:10 UTC 2018 Modified Files: src/sys/arch/x86/x86: mtrr_i686.c Log Message: use tlbflush() instead of writing to %cr3, so it's more clear what code does To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/mtrr_i686.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/mtrr_i686.c diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.29 src/sys/arch/x86/x86/mtrr_i686.c:1.30 --- src/sys/arch/x86/x86/mtrr_i686.c:1.29 Thu Jun 1 02:45:08 2017 +++ src/sys/arch/x86/x86/mtrr_i686.c Sun Mar 4 10:02:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr_i686.c,v 1.29 2017/06/01 02:45:08 chs Exp $ */ +/* $NetBSD: mtrr_i686.c,v 1.30 2018/03/04 10:02:10 jdolecek Exp $ */ /*- * Copyright (c) 2000, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.29 2017/06/01 02:45:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.30 2018/03/04 10:02:10 jdolecek Exp $"); #include "opt_multiprocessor.h" @@ -170,7 +170,7 @@ i686_mtrr_reload(int synch) * much. Need to change the prototypes of l/rcr0 too if you * want to correct it. */ uint32_t cr0; - vaddr_t cr3, cr4; + vaddr_t cr4; uint32_t origcr0; vaddr_t origcr4; @@ -221,8 +221,7 @@ i686_mtrr_reload(int synch) * to CR3) */ - cr3 = rcr3(); - lcr3(cr3); + tlbflush(); /* * 8. Disable all range registers (by clearing the E flag in @@ -262,7 +261,7 @@ i686_mtrr_reload(int synch) */ wbinvd(); - lcr3(cr3); + tlbflush(); /* * 12. Enter the normal cache mode to reenable caching (set the CD and
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 10:40:01 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: dedup pmap_pdirpa() KASSERT() in pmap_reactive(), pmap_load(), and pmap_deactivate() To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 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.284 src/sys/arch/x86/x86/pmap.c:1.285 --- src/sys/arch/x86/x86/pmap.c:1.284 Sun Mar 4 10:26:10 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 10:40:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.284 2018/03/04 10:26:10 jdolecek Exp $ */ +/* $NetBSD: pmap.c,v 1.285 2018/03/04 10:40:01 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.284 2018/03/04 10:26:10 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.285 2018/03/04 10:40:01 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2867,6 +2867,20 @@ pmap_activate(struct lwp *l) } } +#if defined(XEN) && defined(__x86_64__) +#define KASSERT_PDIRPA(pmap) \ + KASSERT(pmap_pdirpa(pmap, 0) == ci->ci_xen_current_user_pgd || \ + pmap == pmap_kernel()) +#elif defined(PAE) +#define KASSERT_PDIRPA(pmap) \ + KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(ci->ci_pae_l3_pdir[0])) +#elif !defined(XEN) +#define KASSERT_PDIRPA(pmap) \ + KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(rcr3())) +#else +#define KASSERT_PDIRPA(pmap) KASSERT(true) /* nothing to do */ +#endif + /* * pmap_reactivate: try to regain reference to the pmap. * @@ -2880,13 +2894,7 @@ pmap_reactivate(struct pmap *pmap) const cpuid_t cid = cpu_index(ci); KASSERT(kpreempt_disabled()); -#if defined(XEN) && defined(__x86_64__) - KASSERT(pmap_pdirpa(pmap, 0) == ci->ci_xen_current_user_pgd); -#elif defined(PAE) - KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(ci->ci_pae_l3_pdir[0])); -#elif !defined(XEN) - KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(rcr3())); -#endif + KASSERT_PDIRPA(pmap); /* * If we still have a lazy reference to this pmap, we can assume @@ -2979,14 +2987,7 @@ pmap_load(void) kcpuset_atomic_clear(oldpmap->pm_cpus, cid); kcpuset_atomic_clear(oldpmap->pm_kernel_cpus, cid); -#if defined(XEN) && defined(__x86_64__) - KASSERT(pmap_pdirpa(oldpmap, 0) == ci->ci_xen_current_user_pgd || - oldpmap == pmap_kernel()); -#elif defined(PAE) - KASSERT(pmap_pdirpa(oldpmap, 0) == pmap_pte2pa(ci->ci_pae_l3_pdir[0])); -#elif !defined(XEN) - KASSERT(pmap_pdirpa(oldpmap, 0) == pmap_pte2pa(rcr3())); -#endif + KASSERT_PDIRPA(oldpmap); KASSERT(!kcpuset_isset(pmap->pm_cpus, cid)); KASSERT(!kcpuset_isset(pmap->pm_kernel_cpus, cid)); @@ -3091,13 +3092,7 @@ pmap_deactivate(struct lwp *l) return; } -#if defined(XEN) && defined(__x86_64__) - KASSERT(pmap_pdirpa(pmap, 0) == ci->ci_xen_current_user_pgd); -#elif defined(PAE) - KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(ci->ci_pae_l3_pdir[0])); -#elif !defined(XEN) - KASSERT(pmap_pdirpa(pmap, 0) == pmap_pte2pa(rcr3())); -#endif + KASSERT_PDIRPA(pmap); KASSERT(ci->ci_pmap == pmap); /*
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 10:59:11 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: move DIAGNOSTIC code for checking in-use pmap from pmap_destroy() to a separate function for readability To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 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.285 src/sys/arch/x86/x86/pmap.c:1.286 --- src/sys/arch/x86/x86/pmap.c:1.285 Sun Mar 4 10:40:01 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 10:59:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.285 2018/03/04 10:40:01 jdolecek Exp $ */ +/* $NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.285 2018/03/04 10:40:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2544,6 +2544,36 @@ pmap_check_ptps(struct pmap *pmap) } } +static inline void +pmap_check_inuse(struct pmap *pmap) +{ +#ifdef DIAGNOSTIC + CPU_INFO_ITERATOR cii; + struct cpu_info *ci; + + for (CPU_INFO_FOREACH(cii, ci)) { + if (ci->ci_pmap == pmap) + panic("destroying pmap being used"); +#if defined(XEN) && defined(__x86_64__) + for (i = 0; i < PDIR_SLOT_PTE; i++) { + if (pmap->pm_pdir[i] != 0 && + ci->ci_kpm_pdir[i] == pmap->pm_pdir[i]) { +printf("pmap_destroy(%p) pmap_kernel %p " +"curcpu %d cpu %d ci_pmap %p " +"ci->ci_kpm_pdir[%d]=%" PRIx64 +" pmap->pm_pdir[%d]=%" PRIx64 "\n", +pmap, pmap_kernel(), curcpu()->ci_index, +ci->ci_index, ci->ci_pmap, +i, ci->ci_kpm_pdir[i], +i, pmap->pm_pdir[i]); +panic("%s: used pmap", __func__); + } + } +#endif + } +#endif /* DIAGNOSTIC */ +} + /* * pmap_destroy: drop reference count on pmap. free pmap if * reference count goes to zero. @@ -2582,31 +2612,7 @@ pmap_destroy(struct pmap *pmap) return; } -#ifdef DIAGNOSTIC - CPU_INFO_ITERATOR cii; - struct cpu_info *ci; - - for (CPU_INFO_FOREACH(cii, ci)) { - if (ci->ci_pmap == pmap) - panic("destroying pmap being used"); -#if defined(XEN) && defined(__x86_64__) - for (i = 0; i < PDIR_SLOT_PTE; i++) { - if (pmap->pm_pdir[i] != 0 && - ci->ci_kpm_pdir[i] == pmap->pm_pdir[i]) { -printf("pmap_destroy(%p) pmap_kernel %p " -"curcpu %d cpu %d ci_pmap %p " -"ci->ci_kpm_pdir[%d]=%" PRIx64 -" pmap->pm_pdir[%d]=%" PRIx64 "\n", -pmap, pmap_kernel(), curcpu()->ci_index, -ci->ci_index, ci->ci_pmap, -i, ci->ci_kpm_pdir[i], -i, pmap->pm_pdir[i]); -panic("%s: used pmap", __func__); - } - } -#endif - } -#endif /* DIAGNOSTIC */ + pmap_check_inuse(pmap); /* * Reference count is zero, free pmap resources and then free pmap.
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: christos Date: Sun Mar 4 15:51:15 UTC 2018 Modified Files: src/sys/arch/macppc/conf: files.macppc Log Message: remove 'define foo {}' for non-bus-like devices To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/arch/macppc/conf/files.macppc 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/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.107 src/sys/arch/macppc/conf/files.macppc:1.108 --- src/sys/arch/macppc/conf/files.macppc:1.107 Mon Feb 26 18:09:32 2018 +++ src/sys/arch/macppc/conf/files.macppc Sun Mar 4 10:51:15 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.107 2018/02/26 23:09:32 sevan Exp $ +# $NetBSD: files.macppc,v 1.108 2018/03/04 15:51:15 christos Exp $ # # macppc-specific configuration info @@ -285,7 +285,6 @@ defflag opt_macppc.h PB3400_CARDBUS_HACK file arch/macppc/macppc/rbus_machdep.c cardbus # Keywest I2C -define ki2c {} device ki2c: i2cbus, ki2c attach ki2c at obio, uni_n file arch/macppc/dev/ki2c.c ki2c @@ -297,7 +296,6 @@ file arch/macppc/dev/snapper.c snapper include "arch/powerpc/conf/majors.powerpc" -define deq {} device deq attach deq at iic file arch/macppc/dev/deq.cdeq
CVS commit: src/sys/arch/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 10:13:09 UTC 2018 Modified Files: src/sys/arch/x86/include: pmap.h src/sys/arch/x86/x86: pmap.c Log Message: drop pmap_update_2pg(), just call pmap_update_pg() separately for each To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/x86/include/pmap.h cvs rdiff -u -r1.282 -r1.283 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/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.75 src/sys/arch/x86/include/pmap.h:1.76 --- src/sys/arch/x86/include/pmap.h:1.75 Thu Jan 18 07:25:34 2018 +++ src/sys/arch/x86/include/pmap.h Sun Mar 4 10:13:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.75 2018/01/18 07:25:34 maxv Exp $ */ +/* $NetBSD: pmap.h,v 1.76 2018/03/04 10:13:08 jdolecek Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -398,17 +398,6 @@ pmap_update_pg(vaddr_t va) } /* - * pmap_update_2pg: flush two pages from the TLB - */ - -__inline static void __unused -pmap_update_2pg(vaddr_t va, vaddr_t vb) -{ - invlpg(va); - invlpg(vb); -} - -/* * pmap_page_protect: change the protection of all recorded mappings * of a managed page * Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.282 src/sys/arch/x86/x86/pmap.c:1.283 --- src/sys/arch/x86/x86/pmap.c:1.282 Thu Mar 1 16:55:01 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 10:13:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.282 2018/03/01 16:55:01 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.283 2018/03/04 10:13:09 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.282 2018/03/01 16:55:01 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.283 2018/03/04 10:13:09 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -3388,7 +3388,8 @@ pmap_copy_page(paddr_t srcpa, paddr_t ds pmap_pte_set(srcpte, pmap_pa2pte(srcpa) | pteflags); pmap_pte_set(dstpte, pmap_pa2pte(dstpa) | pteflags | PG_M); pmap_pte_flush(); - pmap_update_2pg(srcva, dstva); + pmap_update_pg(srcva); + pmap_update_pg(dstva); memcpy((void *)dstva, (void *)srcva, PAGE_SIZE);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 11:01:48 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: reduce intendation in pmap_activate(), NFCI To generate a diff of this commit: cvs rdiff -u -r1.286 -r1.287 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.286 src/sys/arch/x86/x86/pmap.c:1.287 --- src/sys/arch/x86/x86/pmap.c:1.286 Sun Mar 4 10:59:11 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 11:01:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $ */ +/* $NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2855,22 +2855,23 @@ pmap_activate(struct lwp *l) ci = curcpu(); - if (l == ci->ci_curlwp) { - KASSERT(ci->ci_want_pmapload == 0); - KASSERT(ci->ci_tlbstate != TLBSTATE_VALID); + if (l != ci->ci_curlwp) + return; - /* - * no need to switch to kernel vmspace because - * it's a subset of any vmspace. - */ + KASSERT(ci->ci_want_pmapload == 0); + KASSERT(ci->ci_tlbstate != TLBSTATE_VALID); - if (pmap == pmap_kernel()) { - ci->ci_want_pmapload = 0; - return; - } + /* + * no need to switch to kernel vmspace because + * it's a subset of any vmspace. + */ - ci->ci_want_pmapload = 1; + if (pmap == pmap_kernel()) { + ci->ci_want_pmapload = 0; + return; } + + ci->ci_want_pmapload = 1; } #if defined(XEN) && defined(__x86_64__)
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Sun Mar 4 18:07:34 UTC 2018 Modified Files: src/sys/sys: device_if.h Log Message: Since device.h now exposes uses of types defined here to _KMEMUSER the types better be defined for _KMEMUSER as well. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/device_if.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/device_if.h diff -u src/sys/sys/device_if.h:1.5 src/sys/sys/device_if.h:1.6 --- src/sys/sys/device_if.h:1.5 Wed Feb 24 22:38:10 2010 +++ src/sys/sys/device_if.h Sun Mar 4 18:07:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: device_if.h,v 1.5 2010/02/24 22:38:10 dyoung Exp $ */ +/* $NetBSD: device_if.h,v 1.6 2018/03/04 18:07:34 kre Exp $ */ #ifndef _SYS_DEVICE_IF_H #define _SYS_DEVICE_IF_H @@ -6,7 +6,7 @@ struct device; typedef struct device *device_t; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) typedef enum devact_level { DEVACT_LEVEL_CLASS = 0 , DEVACT_LEVEL_DRIVER = 1
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: scole Date: Sun Mar 4 16:34:20 UTC 2018 Modified Files: src/sys/dev/acpi: acpi.c Log Message: Use "#if NPCI > 0" instead of "#ifdef NPCI" for compiling kernels with acpi, without pci. To generate a diff of this commit: cvs rdiff -u -r1.267 -r1.268 src/sys/dev/acpi/acpi.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.267 src/sys/dev/acpi/acpi.c:1.268 --- src/sys/dev/acpi/acpi.c:1.267 Sat Mar 3 11:23:24 2018 +++ src/sys/dev/acpi/acpi.c Sun Mar 4 16:34:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.267 2018/03/03 11:23:24 maya Exp $ */ +/* $NetBSD: acpi.c,v 1.268 2018/03/04 16:34:20 scole Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.267 2018/03/03 11:23:24 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.268 2018/03/04 16:34:20 scole Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -488,7 +488,7 @@ acpi_attach(device_t parent, device_t se */ acpi_build_tree(sc); -#ifdef NPCI +#if NPCI > 0 /* * Probe MCFG table */
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64
Module Name:src Committed By: christos Date: Sun Mar 4 16:45:12 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: aesp8-ppc.S ghashp8-ppc.S ppccpuid.S Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: chacha-ppc.S chacha.inc poly1305-ppc.S poly1305-ppcfp.S poly1305.inc Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ghashp8-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/chacha-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/chacha.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/poly1305-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/poly1305-ppcfp.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/poly1305.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S:1.1 Sat Oct 15 08:19:02 2016 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/aesp8-ppc.S Sun Mar 4 11:45:12 2018 @@ -1868,3 +1868,1822 @@ _aesp8_ctr32_encrypt8x: .byte 0,12,0x04,0,0x80,6,6,0 .long 0 +.globl aes_p8_xts_encrypt +.type aes_p8_xts_encrypt,@function +.section ".opd","aw" +.align 3 +aes_p8_xts_encrypt: +.quad .aes_p8_xts_encrypt,.TOC.@tocbase,0 +.previous + +.align 5 +.aes_p8_xts_encrypt: + mr 10,3 + li 3,-1 + cmpldi 5,16 + bltlr + + lis 0,0xfff0 + mfspr 12,256 + li 11,0 + mtspr 256,0 + + vspltisb 9,0x07 + + + + + li 3,15 + lvx 8,0,8 + lvsl 5,0,8 + lvx 4,3,8 + + vperm 8,8,4,5 + + neg 11,10 + lvsr 5,0,11 + lvx 2,0,10 + addi 10,10,15 + + + cmpldi 7,0 + beq .Lxts_enc_no_key2 + + lvsl 7,0,7 + lwz 9,240(7) + srwi 9,9,1 + subi 9,9,1 + li 3,16 + + lvx 0,0,7 + lvx 1,3,7 + addi 3,3,16 + vperm 0,0,1,7 + vxor 8,8,0 + lvx 0,3,7 + addi 3,3,16 + mtctr 9 + +.Ltweak_xts_enc: + vperm 1,1,0,7 +.long 0x11080D08 + lvx 1,3,7 + addi 3,3,16 + vperm 0,0,1,7 +.long 0x11080508 + lvx 0,3,7 + addi 3,3,16 + bc 16,0,.Ltweak_xts_enc + + vperm 1,1,0,7 +.long 0x11080D08 + lvx 1,3,7 + vperm 0,0,1,7 +.long 0x11080509 + + li 8,0 + b .Lxts_enc + +.Lxts_enc_no_key2: + li 3,-16 + and 5,5,3 + + +.Lxts_enc: + lvx 4,0,10 + addi 10,10,16 + + lvsl 7,0,6 + lwz 9,240(6) + srwi 9,9,1 + subi 9,9,1 + li 3,16 + + vslb 10,9,9 + vor 10,10,9 + vspltisb 11,1 + vsldoi 10,10,11,15 + + cmpldi 5,96 + bge _aesp8_xts_encrypt6x + + andi. 7,5,15 + subic 0,5,32 + subi 7,7,16 + subfe 0,0,0 + and 0,0,7 + add 10,10,0 + + lvx 0,0,6 + lvx 1,3,6 + addi 3,3,16 + vperm 2,2,4,5 + vperm 0,0,1,7 + vxor 2,2,8 + vxor 2,2,0 + lvx 0,3,6 + addi 3,3,16 + mtctr 9 + b .Loop_xts_enc + +.align 5 +.Loop_xts_enc: + vperm 1,1,0,7 +.long 0x10420D08 + lvx 1,3,6 + addi 3,3,16 + vperm 0,0,1,7 +.long 0x10420508 + lvx 0,3,6 + addi 3,3,16 + bc 16,0,.Loop_xts_enc + + vperm 1,1,0,7 +.long 0x10420D08 + lvx 1,3,6 + li 3,16 + vperm 0,0,1,7 + vxor 0,0,8 +.long 0x10620509 + + + nop + +.long 0x7C602799 + addi 4,4,16 + + subic. 5,5,16 + beq .Lxts_enc_done + + vor 2,4,4 + lvx 4,0,10 + addi 10,10,16 + lvx 0,0,6 + lvx 1,3,6 + addi 3,3,16 + + subic 0,5,32 + subfe 0,0,0 + and 0,0,7 + add 10,10,0 + + vsrab 11,8,9 + vaddubm 8,8,8 + vsldoi 11,11,11,15 + vand 11,11,10 + vxor 8,8,11 + + vperm 2,2,4,5 + vperm 0,0,1,7 + vxor 2,2,8 + vxor 3,3,0 + vxor 2,2,0 + lvx 0,3,6 + addi 3,3,16 + + mtctr 9 + cmpldi 5,16 + bge .Loop_xts_enc + + vxor 3,3,8 + lvsr 5,0,5 + vxor 4,4,4 + vspltisb 11,-1 + vperm 4,4,11,5 + vsel 2,2,3,4 + + subi 11,4,17 + subi 4,4,16 + mtctr 5 + li 5,16 +.Loop_xts_enc_steal: + lbzu 0,1(11) + stb 0,16(11) + bc 16,0,.Loop_xts_enc_steal + + mtctr 9 + b .Loop_xts_enc + +.Lxts_enc_done: + cmpldi 8,0 + beq .Lxts_enc_ret + + vsrab 11,8,9 + vaddubm 8,8,8 + vsldoi 11,11,11,15 + vand 11,11,10 + vxor 8,8,11 + + +.long 0x7D004799 + +.Lxts_enc_ret: + mtspr 256,12 + li 3,0 + blr +.long 0 +.byte 0,12,0x04,0,0x80,6,6,0 +.long 0 + + +.globl aes_p8_xts_decrypt +.type aes_p8_xts_decrypt,@function +.section ".opd","aw" +.align 3 +aes_p8_xts_decrypt: +.quad .aes_p8_xts_decrypt,.TOC.@tocbase,0 +.previous + +.align 5 +.aes_p8_xts_decrypt: + mr 10,3 + li 3,-1 + cmpldi 5,16 + bltlr + + lis 0,0xfff8 + mfspr 12,256 + li 11,0 + mtspr 256,0 + + andi. 0,5,15 + neg 0,0 + andi. 0,0,16 + sub 5,5,0 + + vspltisb 9,0x07 + + + + + li 3,15 + lvx 8,0,8 + lvsl 5,0,8 + lvx 4,3,8 + + vperm 8,8,4,5 + + neg 11,10 + lvsr 5,0,11 + lvx 2,0,10 + addi
CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000
Module Name:src Committed By: christos Date: Sun Mar 4 16:44:11 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h Log Message: _LP64 64 bit types are "long" not "long long". To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.15 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.16 --- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.15 Thu Feb 22 17:20:44 2018 +++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Sun Mar 4 11:44:11 2018 @@ -422,7 +422,7 @@ extern int dot_symbols; #define INT32_TYPE "int" #undef INT64_TYPE -#define INT64_TYPE "long long int" +#define INT64_TYPE "long int" #undef UINT8_TYPE #define UINT8_TYPE "unsigned char" @@ -434,7 +434,7 @@ extern int dot_symbols; #define UINT32_TYPE "unsigned int" #undef UINT64_TYPE -#define UINT64_TYPE "long long unsigned int" +#define UINT64_TYPE "long unsigned int" #undef INT_FAST8_TYPE #define INT_FAST8_TYPE "int"
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Sun Mar 4 13:24:46 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.1310 -r1.1311 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1309 -r1.1310 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.1310 src/sys/dev/pci/pcidevs.h:1.1311 --- src/sys/dev/pci/pcidevs.h:1.1310 Sun Mar 4 13:13:18 2018 +++ src/sys/dev/pci/pcidevs.h Sun Mar 4 13:24:46 2018 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.1310 2018/03/04 13:13:18 jdolecek Exp $ */ +/* $NetBSD: pcidevs.h,v 1.1311 2018/03/04 13:24:46 jdolecek Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1318 2018/03/04 13:11:51 jdolecek Exp + * NetBSD: pcidevs,v 1.1319 2018/03/04 13:24:17 jdolecek Exp */ /* @@ -7079,7 +7079,7 @@ #define PCI_PRODUCT_VIATECH_VT3043 0x3043 /* VT3043 (Rhine) 10/100 Ethernet */ #define PCI_PRODUCT_VIATECH_VT6306 0x3044 /* VT6306 IEEE 1394 Host Controller */ #define PCI_PRODUCT_VIATECH_VT6105M 0x3053 /* VT6105M (Rhine III) 10/100 Ethernet */ -#define PCI_PRODUCT_VIATECH_VT82C686A_SMB 0x3057 /* VT82C686A SMBus Controller */ +#define PCI_PRODUCT_VIATECH_VT82C686A_PWR 0x3057 /* VT82C686A Power Management Controller */ #define PCI_PRODUCT_VIATECH_VT82C686A_AC97 0x3058 /* VT82C686A AC-97 Audio Controller */ #define PCI_PRODUCT_VIATECH_VT8233_AC97 0x3059 /* VT8233/VT8235 AC-97 Audio Controller */ #define PCI_PRODUCT_VIATECH_VT6102 0x3065 /* VT6102 (Rhine II) 10/100 Ethernet */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.1309 src/sys/dev/pci/pcidevs_data.h:1.1310 --- src/sys/dev/pci/pcidevs_data.h:1.1309 Sun Mar 4 13:13:18 2018 +++ src/sys/dev/pci/pcidevs_data.h Sun Mar 4 13:24:46 2018 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.1309 2018/03/04 13:13:18 jdolecek Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.1310 2018/03/04 13:24:46 jdolecek Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1318 2018/03/04 13:11:51 jdolecek Exp + * NetBSD: pcidevs,v 1.1319 2018/03/04 13:24:17 jdolecek Exp */ /* @@ -12316,8 +12316,8 @@ static const uint16_t pci_products[] = { 33537, 15562, 15567, 6807, 6309, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6105M, 33544, 33481, 31451, 5673, 5571, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C686A_SMB, - 33382, 8397, 6309, 0, + PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C686A_PWR, + 33382, 3749, 6932, 6309, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C686A_AC97, 33382, 21583, 6908, 6309, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8233_AC97, @@ -13261,7 +13261,7 @@ static const char pci_words[] = { "." "Barco\0" /* 1 refs @ 3727 */ "MicroUnity\0" /* 1 refs @ 3733 */ "Pure\0" /* 1 refs @ 3744 */ - "Power\0" /* 19 refs @ 3749 */ + "Power\0" /* 20 refs @ 3749 */ "InnoSys\0" /* 1 refs @ 3755 */ "Actel\0" /* 1 refs @ 3763 */ "Marvell\0" /* 2 refs @ 3769 */ @@ -13689,7 +13689,7 @@ static const char pci_words[] = { "." "M5453\0" /* 1 refs @ 6914 */ "M5455\0" /* 1 refs @ 6920 */ "M7101\0" /* 1 refs @ 6926 */ - "Management\0" /* 17 refs @ 6932 */ + "Management\0" /* 18 refs @ 6932 */ "AIC-1160\0" /* 1 refs @ 6943 */ "AIC-7850\0" /* 1 refs @ 6952 */ "AIC-7855\0" /* 1 refs @ 6961 */ @@ -13881,7 +13881,7 @@ static const char pci_words[] = { "." "Hub\0" /* 21 refs @ 8384 */ "7461\0" /* 1 refs @ 8388 */ "LPC\0" /* 147 refs @ 8393 */ - "SMBus\0" /* 72 refs @ 8397 */ + "SMBus\0" /* 71 refs @ 8397 */ "MC97\0" /* 1 refs @ 8403 */ "756b\0" /* 1 refs @ 8408 */ "SATA\0" /* 202 refs @ 8413 */
CVS commit: src/sys
Module Name:src Committed By: jdolecek Date: Sun Mar 4 13:24:17 UTC 2018 Modified Files: src/sys/arch/x86/pci: pcib.c src/sys/dev/pci: pcidevs viaenv.c Log Message: according to VT82C686A chip specs, the VIA Technologies device 0x3057 is more a Power Management controller, rename the pcidevs entry and device macro PR kern/31963 by Nicolas Joly To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/pcib.c cvs rdiff -u -r1.1318 -r1.1319 src/sys/dev/pci/pcidevs cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/viaenv.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/pci/pcib.c diff -u src/sys/arch/x86/pci/pcib.c:1.15 src/sys/arch/x86/pci/pcib.c:1.16 --- src/sys/arch/x86/pci/pcib.c:1.15 Fri Apr 6 20:38:52 2012 +++ src/sys/arch/x86/pci/pcib.c Sun Mar 4 13:24:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $ */ +/* $NetBSD: pcib.c,v 1.16 2018/03/04 13:24:17 jdolecek Exp $ */ /*- * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.16 2018/03/04 13:24:17 jdolecek Exp $"); #include #include @@ -143,10 +143,10 @@ pcibmatch(device_t parent, cfdata_t matc break; case PCI_VENDOR_VIATECH: switch (PCI_PRODUCT(pa->pa_id)) { - case PCI_PRODUCT_VIATECH_VT82C686A_SMB: + case PCI_PRODUCT_VIATECH_VT82C686A_PWR: /* - * The VIA VT82C686A SMBus Controller itself as - * ISA bridge, but it's wrong ! + * The VIA VT82C686A Power Management Controller + * identifies itself as ISA bridge, but it's wrong ! */ return (0); } Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1318 src/sys/dev/pci/pcidevs:1.1319 --- src/sys/dev/pci/pcidevs:1.1318 Sun Mar 4 13:11:51 2018 +++ src/sys/dev/pci/pcidevs Sun Mar 4 13:24:17 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1318 2018/03/04 13:11:51 jdolecek Exp $ +$NetBSD: pcidevs,v 1.1319 2018/03/04 13:24:17 jdolecek Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -7072,7 +7072,7 @@ product VIATECH VT82C586_PWR 0x3040 VT82 product VIATECH VT3043 0x3043 VT3043 (Rhine) 10/100 Ethernet product VIATECH VT6306 0x3044 VT6306 IEEE 1394 Host Controller product VIATECH VT6105M 0x3053 VT6105M (Rhine III) 10/100 Ethernet -product VIATECH VT82C686A_SMB 0x3057 VT82C686A SMBus Controller +product VIATECH VT82C686A_PWR 0x3057 VT82C686A Power Management Controller product VIATECH VT82C686A_AC97 0x3058 VT82C686A AC-97 Audio Controller product VIATECH VT8233_AC97 0x3059 VT8233/VT8235 AC-97 Audio Controller product VIATECH VT6102 0x3065 VT6102 (Rhine II) 10/100 Ethernet Index: src/sys/dev/pci/viaenv.c diff -u src/sys/dev/pci/viaenv.c:1.33 src/sys/dev/pci/viaenv.c:1.34 --- src/sys/dev/pci/viaenv.c:1.33 Mon Aug 11 06:02:38 2014 +++ src/sys/dev/pci/viaenv.c Sun Mar 4 13:24:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: viaenv.c,v 1.33 2014/08/11 06:02:38 ozaki-r Exp $ */ +/* $NetBSD: viaenv.c,v 1.34 2018/03/04 13:24:17 jdolecek Exp $ */ /* * Copyright (c) 2000 Johan Danielsson @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.33 2014/08/11 06:02:38 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.34 2018/03/04 13:24:17 jdolecek Exp $"); #include #include @@ -99,7 +99,7 @@ viaenv_match(device_t parent, cfdata_t m return 0; switch (PCI_PRODUCT(pa->pa_id)) { - case PCI_PRODUCT_VIATECH_VT82C686A_SMB: + case PCI_PRODUCT_VIATECH_VT82C686A_PWR: case PCI_PRODUCT_VIATECH_VT8231_PWR: return 1; default: @@ -284,7 +284,7 @@ viaenv_attach(device_t parent, device_t aprint_naive("\n"); aprint_normal(": VIA Technologies "); switch (PCI_PRODUCT(pa->pa_id)) { - case PCI_PRODUCT_VIATECH_VT82C686A_SMB: + case PCI_PRODUCT_VIATECH_VT82C686A_PWR: aprint_normal("VT82C686A Hardware Monitor\n"); break; case PCI_PRODUCT_VIATECH_VT8231_PWR:
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: christos Date: Sun Mar 4 15:25:15 UTC 2018 Modified Files: src/sys/arch/macppc/dev: obio.c Log Message: add braces. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/macppc/dev/obio.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/macppc/dev/obio.c diff -u src/sys/arch/macppc/dev/obio.c:1.41 src/sys/arch/macppc/dev/obio.c:1.42 --- src/sys/arch/macppc/dev/obio.c:1.41 Tue Nov 11 18:08:37 2014 +++ src/sys/arch/macppc/dev/obio.c Sun Mar 4 10:25:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.41 2014/11/11 23:08:37 macallan Exp $ */ +/* $NetBSD: obio.c,v 1.42 2018/03/04 15:25:15 christos Exp $ */ /*- * Copyright (C) 1998 Internet Research Institute, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.41 2014/11/11 23:08:37 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.42 2018/03/04 15:25:15 christos Exp $"); #include #include @@ -154,10 +154,11 @@ obio_attach(device_t parent, device_t se case PCI_PRODUCT_APPLE_PANGEA_MACIO: case PCI_PRODUCT_APPLE_INTREPID: node = pcidev_to_ofdev(pa->pa_pc, pa->pa_tag); - if (node == -1) + if (node == -1) { node = OF_finddevice("mac-io"); if (node == -1) node = OF_finddevice("/pci/mac-io"); + } break; case PCI_PRODUCT_APPLE_K2: case PCI_PRODUCT_APPLE_SHASTA:
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Sun Mar 4 21:41:48 UTC 2018 Modified Files: src/sys/arch/emips/ebus: dz_ebus.c flash_ebus.c icap_ebus.c src/sys/arch/macppc/dev: obio.c Log Message: avoid indentation issues. re-do previous in obio.c to avoid the does-nothing change, by fixing the intended indentation. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/emips/ebus/dz_ebus.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/emips/ebus/flash_ebus.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/emips/ebus/icap_ebus.c cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/obio.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/emips/ebus/dz_ebus.c diff -u src/sys/arch/emips/ebus/dz_ebus.c:1.8 src/sys/arch/emips/ebus/dz_ebus.c:1.9 --- src/sys/arch/emips/ebus/dz_ebus.c:1.8 Fri Jul 25 08:10:32 2014 +++ src/sys/arch/emips/ebus/dz_ebus.c Sun Mar 4 21:41:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dz_ebus.c,v 1.8 2014/07/25 08:10:32 dholland Exp $ */ +/* $NetBSD: dz_ebus.c,v 1.9 2018/03/04 21:41:48 mrg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.8 2014/07/25 08:10:32 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.9 2018/03/04 21:41:48 mrg Exp $"); #include "opt_ddb.h" @@ -167,15 +167,15 @@ dzopen(dev_t dev, int flag, int mode, st /* we have no modem control but..*/ if (dzmctl(sc, line, TIOCM_DTR, DMBIS) & TIOCM_CD) tp->t_state |= TS_CARR_ON; - s = spltty(); - while (!(flag & O_NONBLOCK) && !(tp->t_cflag & CLOCAL) && - !(tp->t_state & TS_CARR_ON)) { - tp->t_wopen++; - error = ttysleep(tp, >t_rawcv, true, 0); - tp->t_wopen--; - if (error) -break; - } + s = spltty(); + while (!(flag & O_NONBLOCK) && !(tp->t_cflag & CLOCAL) && + !(tp->t_state & TS_CARR_ON)) { + tp->t_wopen++; + error = ttysleep(tp, >t_rawcv, true, 0); + tp->t_wopen--; + if (error) + break; + } (void)splx(s); if (error) return error; Index: src/sys/arch/emips/ebus/flash_ebus.c diff -u src/sys/arch/emips/ebus/flash_ebus.c:1.19 src/sys/arch/emips/ebus/flash_ebus.c:1.20 --- src/sys/arch/emips/ebus/flash_ebus.c:1.19 Sun Nov 20 02:34:27 2016 +++ src/sys/arch/emips/ebus/flash_ebus.c Sun Mar 4 21:41:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: flash_ebus.c,v 1.19 2016/11/20 02:34:27 pgoyette Exp $ */ +/* $NetBSD: flash_ebus.c,v 1.20 2018/03/04 21:41:48 mrg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.19 2016/11/20 02:34:27 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.20 2018/03/04 21:41:48 mrg Exp $"); /* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device * Extended to include the Intel JS28F256P30T95. @@ -2075,8 +2075,8 @@ eflashperror(const struct eflash_softc * if (Status == 0) printf("error not notified"); -else -printf("status=x%x", Status); + else + printf("status=x%x", Status); printf(")\n"); } Index: src/sys/arch/emips/ebus/icap_ebus.c diff -u src/sys/arch/emips/ebus/icap_ebus.c:1.6 src/sys/arch/emips/ebus/icap_ebus.c:1.7 --- src/sys/arch/emips/ebus/icap_ebus.c:1.6 Fri Jul 25 08:10:32 2014 +++ src/sys/arch/emips/ebus/icap_ebus.c Sun Mar 4 21:41:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: icap_ebus.c,v 1.6 2014/07/25 08:10:32 dholland Exp $ */ +/* $NetBSD: icap_ebus.c,v 1.7 2018/03/04 21:41:48 mrg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: icap_ebus.c,v 1.6 2014/07/25 08:10:32 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icap_ebus.c,v 1.7 2018/03/04 21:41:48 mrg Exp $"); #include #include @@ -410,7 +410,7 @@ icap_ebus_intr(void *cookie, void *f) if (saf) icapstart(sc); - return (1); +return (1); } /* Index: src/sys/arch/macppc/dev/obio.c diff -u src/sys/arch/macppc/dev/obio.c:1.42 src/sys/arch/macppc/dev/obio.c:1.43 --- src/sys/arch/macppc/dev/obio.c:1.42 Sun Mar 4 15:25:15 2018 +++ src/sys/arch/macppc/dev/obio.c Sun Mar 4 21:41:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.42 2018/03/04 15:25:15 christos Exp $ */ +/* $NetBSD: obio.c,v 1.43 2018/03/04 21:41:48 mrg Exp $ */ /*- * Copyright (C) 1998 Internet Research Institute, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.42 2018/03/04 15:25:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.43 2018/03/04 21:41:48 mrg Exp $"); #include #include @@ -154,11 +154,10 @@ obio_attach(device_t parent, device_t se case PCI_PRODUCT_APPLE_PANGEA_MACIO: case PCI_PRODUCT_APPLE_INTREPID: node = pcidev_to_ofdev(pa->pa_pc, pa->pa_tag); - if (node == -1) { + if (node == -1) node =
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: mrg Date: Sun Mar 4 21:42:28 UTC 2018 Modified Files: src/sys/arch/sgimips/gio: grtwo.c Log Message: #if 0 grtwo_cursor_data[] to match the #if 0'd code that uses it. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/gio/grtwo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/grtwo.c diff -u src/sys/arch/sgimips/gio/grtwo.c:1.13 src/sys/arch/sgimips/gio/grtwo.c:1.14 --- src/sys/arch/sgimips/gio/grtwo.c:1.13 Sat Oct 27 17:18:09 2012 +++ src/sys/arch/sgimips/gio/grtwo.c Sun Mar 4 21:42:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: grtwo.c,v 1.13 2012/10/27 17:18:09 chs Exp $ */ +/* $NetBSD: grtwo.c,v 1.14 2018/03/04 21:42:28 mrg Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.13 2012/10/27 17:18:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.14 2018/03/04 21:42:28 mrg Exp $"); #include #include @@ -156,6 +156,7 @@ static int grtwo_is_console = 0; #define GR2_ATTR_BG(a) ((a) & 0xff) #define GR2_ATTR_FG(a) (((a) >> 8) & 0xff) +#if 0 static const u_int16_t grtwo_cursor_data[128] = { /* Bit 0 */ 0xff00, 0x, @@ -225,6 +226,7 @@ static const u_int16_t grtwo_cursor_data 0x, 0x, 0x, 0x, }; +#endif static const u_int8_t grtwo_defcmap[8 * 3] = { /* Normal colors */
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: mrg Date: Sun Mar 4 21:51:44 UTC 2018 Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c Log Message: avoid 32 bit only code in 64 bit mode. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.89 src/sys/arch/powerpc/oea/cpu_subr.c:1.90 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.89 Fri Feb 16 18:02:10 2018 +++ src/sys/arch/powerpc/oea/cpu_subr.c Sun Mar 4 21:51:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.89 2018/02/16 18:02:10 macallan Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.90 2018/03/04 21:51:44 mrg Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.89 2018/02/16 18:02:10 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.90 2018/03/04 21:51:44 mrg Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -533,6 +533,7 @@ cpu_setup(device_t self, struct cpu_info * Configure power-saving mode. */ switch (vers) { +#if !defined(_ARCH_PPC64) case MPC604: case MPC604e: case MPC604ev: @@ -582,6 +583,7 @@ cpu_setup(device_t self, struct cpu_info hid0 |= HID0_NAP | HID0_DPM; powersave = 1; break; +#endif case IBM970: case IBM970FX:
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Sun Mar 4 19:23:33 UTC 2018 Modified Files: src/sys/sys: pmf.h Log Message: device.h also now needs pmf_qual_t exposed for _KMEMUSERs To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/sys/pmf.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/pmf.h diff -u src/sys/sys/pmf.h:1.22 src/sys/sys/pmf.h:1.23 --- src/sys/sys/pmf.h:1.22 Thu Oct 5 01:26:53 2017 +++ src/sys/sys/pmf.h Sun Mar 4 19:23:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmf.h,v 1.22 2017/10/05 01:26:53 jmcneill Exp $ */ +/* $NetBSD: pmf.h,v 1.23 2018/03/04 19:23:33 kre Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill@@ -29,7 +29,7 @@ #ifndef _SYS_PMF_H #define _SYS_PMF_H -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) #include #include @@ -62,6 +62,9 @@ struct pmf_qual { }; typedef struct pmf_qual pmf_qual_t; +#endif + +#if defined(_KERNEL) extern const pmf_qual_t * const PMF_Q_NONE; extern const pmf_qual_t * const PMF_Q_SELF; extern const pmf_qual_t * const PMF_Q_DRVCTL;
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: dholland Date: Sun Mar 4 19:57:41 UTC 2018 Modified Files: src/usr.bin/ftp: main.c Log Message: Don't use the local username as the default anonftp password. once upon a time doing this was part of the social glue that held the community together, but that was a long time ago, and now it's just an information leak. proposed on tech-userlevel in 2008, then apparently forgotten :-| To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/usr.bin/ftp/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/main.c diff -u src/usr.bin/ftp/main.c:1.124 src/usr.bin/ftp/main.c:1.125 --- src/usr.bin/ftp/main.c:1.124 Sat Nov 25 15:39:17 2017 +++ src/usr.bin/ftp/main.c Sun Mar 4 19:57:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.124 2017/11/25 15:39:17 christos Exp $ */ +/* $NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $ */ /*- * Copyright (c) 1996-2015 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: main.c,v 1.124 2017/11/25 15:39:17 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $"); #endif #endif /* not lint */ @@ -464,7 +464,6 @@ main(int volatile argc, char **volatile if (localhome == NULL && !EMPTYSTRING(pw->pw_dir)) localhome = ftp_strdup(pw->pw_dir); localname = ftp_strdup(pw->pw_name); - anonuser = localname; } if (netrc[0] == '\0' && localhome != NULL) { if (strlcpy(netrc, localhome, sizeof(netrc)) >= sizeof(netrc) ||
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: mrg Date: Sun Mar 4 22:28:18 UTC 2018 Modified Files: src/sys/arch/amiga/dev: grf_et.c Log Message: avoid gcc 6 indentation issues. rewrite: if (vgar()); if (vgar()); if (vgar()); if (vgar()); as vgar(); vgar(); vgar(); vgar(); verified the ass output has the 4 reads (the macro uses a volatile pointer, so it should remain so too.) To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/grf_et.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/amiga/dev/grf_et.c diff -u src/sys/arch/amiga/dev/grf_et.c:1.33 src/sys/arch/amiga/dev/grf_et.c:1.34 --- src/sys/arch/amiga/dev/grf_et.c:1.33 Fri Nov 4 18:06:08 2016 +++ src/sys/arch/amiga/dev/grf_et.c Sun Mar 4 22:28:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_et.c,v 1.33 2016/11/04 18:06:08 phx Exp $ */ +/* $NetBSD: grf_et.c,v 1.34 2018/03/04 22:28:18 mrg Exp $ */ /* * Copyright (c) 1997 Klaus Burkert @@ -37,7 +37,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.33 2016/11/04 18:06:08 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.34 2018/03/04 22:28:18 mrg Exp $"); #include "grfet.h" #include "ite.h" @@ -1599,8 +1599,11 @@ et_getDACType(struct grf_softc *gp) /* check for Sierra SC 15025 */ /* We MUST do 4 HW reads to switch into command mode */ - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); - vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ vgaw(ba, VDAC_XINDEX, 9); check.cc[0] = vgar(ba, VDAC_XDATA); @@ -1611,12 +1614,18 @@ et_getDACType(struct grf_softc *gp) vgaw(ba, VDAC_XINDEX, 12); check.cc[3] = vgar(ba, VDAC_XDATA); - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); - vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ if (check.tt == 0x533ab141) { - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); - vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ /* switch to 8 bits per color */ vgaw(ba, VDAC_XINDEX, 8); @@ -1624,8 +1633,11 @@ et_getDACType(struct grf_softc *gp) /* do not shift color values */ etcmap_shift = 0; - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); - vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ vgaw(ba, VDAC_MASK, 0xff); return (SIERRA15025); @@ -1633,8 +1645,11 @@ et_getDACType(struct grf_softc *gp) /* check for MUSIC DAC */ - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); - vgaw(ba, VDAC_COMMAND, 0x02); /* set some strange MUSIC mode (???) */ + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgaw(ba, VDAC_COMMAND, 0x02); /* set some strange MUSIC mode (???) */ vgaw(ba, VDAC_XINDEX, 0x01); if (vgar(ba, VDAC_XDATA) == 0x01) { @@ -1646,10 +1661,16 @@ et_getDACType(struct grf_softc *gp) } /* check for AT ATT20c491 DAC (crest) */ - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); vgaw(ba, HDR, 0xff); vgaw(ba, VDAC_MASK, 0x01); - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); if (vgar(ba, HDR) == 0xff) { /* do not shift color values */ etcmap_shift = 0; @@ -1659,7 +1680,10 @@ et_getDACType(struct grf_softc *gp) } /* restore PowerUp settings (crest) */ - if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); if (vgar(ba, HDR)); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); + vgar(ba, HDR); vgaw(ba, HDR, 0x00); /*
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sun Mar 4 22:47:49 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch powerpc, mips and arm ports to GCC 6. all kernels that build with gcc 5 still build. several platforms tested in emulators and real hardware. To generate a diff of this commit: cvs rdiff -u -r1.1040 -r1.1041 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1040 src/share/mk/bsd.own.mk:1.1041 --- src/share/mk/bsd.own.mk:1.1040 Sun Mar 4 00:17:05 2018 +++ src/share/mk/bsd.own.mk Sun Mar 4 22:47:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1040 2018/03/04 00:17:05 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1041 2018/03/04 22:47:49 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -64,14 +64,18 @@ MKGCC?= no # # What GCC is used? # -.if ${MACHINE_CPU} == "aarch64" +.if \ +${MACHINE_CPU} == "aarch64" HAVE_GCC?= 0 .elif \ -${MACHINE_CPU} == "x86_64" || \ +${MACHINE_CPU} == "alpha" || \ ${MACHINE_CPU} == "hppa" || \ ${MACHINE_CPU} == "i386" || \ +${MACHINE_CPU} == "mips" || \ +${MACHINE_CPU} == "powerpc" || \ ${MACHINE_CPU} == "sparc" || \ -${MACHINE_CPU} == "sparc64" +${MACHINE_CPU} == "sparc64" || \ +${MACHINE_CPU} == "x86_64" HAVE_GCC?= 6 .else HAVE_GCC?= 5
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: kre Date: Sun Mar 4 23:07:58 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Declare our variables before using them, fixes DIAGNOSTIC amd64 XEN builds. To generate a diff of this commit: cvs rdiff -u -r1.287 -r1.288 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.287 src/sys/arch/x86/x86/pmap.c:1.288 --- src/sys/arch/x86/x86/pmap.c:1.287 Sun Mar 4 11:01:48 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 23:07:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $ */ +/* $NetBSD: pmap.c,v 1.288 2018/03/04 23:07:58 kre Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.288 2018/03/04 23:07:58 kre Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2550,6 +2550,9 @@ pmap_check_inuse(struct pmap *pmap) #ifdef DIAGNOSTIC CPU_INFO_ITERATOR cii; struct cpu_info *ci; +#if defined(XEN) && defined(__x86_64__) + int i; +#endif for (CPU_INFO_FOREACH(cii, ci)) { if (ci->ci_pmap == pmap)
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jdolecek Date: Sun Mar 4 23:25:35 UTC 2018 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: adjust the pmap_check_inuse() fix to avoid #ifdef To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 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.288 src/sys/arch/x86/x86/pmap.c:1.289 --- src/sys/arch/x86/x86/pmap.c:1.288 Sun Mar 4 23:07:58 2018 +++ src/sys/arch/x86/x86/pmap.c Sun Mar 4 23:25:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.288 2018/03/04 23:07:58 kre Exp $ */ +/* $NetBSD: pmap.c,v 1.289 2018/03/04 23:25:35 jdolecek Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.288 2018/03/04 23:07:58 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.289 2018/03/04 23:25:35 jdolecek Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2550,15 +2550,12 @@ pmap_check_inuse(struct pmap *pmap) #ifdef DIAGNOSTIC CPU_INFO_ITERATOR cii; struct cpu_info *ci; -#if defined(XEN) && defined(__x86_64__) - int i; -#endif for (CPU_INFO_FOREACH(cii, ci)) { if (ci->ci_pmap == pmap) panic("destroying pmap being used"); #if defined(XEN) && defined(__x86_64__) - for (i = 0; i < PDIR_SLOT_PTE; i++) { + for (int i = 0; i < PDIR_SLOT_PTE; i++) { if (pmap->pm_pdir[i] != 0 && ci->ci_kpm_pdir[i] == pmap->pm_pdir[i]) { printf("pmap_destroy(%p) pmap_kernel %p "
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Mar 4 23:47:56 UTC 2018 Modified Files: src/share/mk: bsd.x11.mk Log Message: last I checked powerpc64 was 64 bits, so it needs _XSERVER64.. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.124 src/share/mk/bsd.x11.mk:1.125 --- src/share/mk/bsd.x11.mk:1.124 Wed Dec 14 11:03:19 2016 +++ src/share/mk/bsd.x11.mk Sun Mar 4 18:47:55 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.124 2016/12/14 16:03:19 scole Exp $ +# $NetBSD: bsd.x11.mk,v 1.125 2018/03/04 23:47:55 christos Exp $ .include @@ -98,6 +98,7 @@ X11FLAGS.SERVER+= -DXINPUT -DXFreeXDGA - .if ${MACHINE_ARCH} == "alpha" || \ ${MACHINE_ARCH} == "ia64" || \ +${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "sparc64" || \ ${MACHINE_ARCH} == "x86_64" || \ ${MACHINE_CPU} == "aarch64"
CVS commit: src/distrib/notes/common
Module Name:src Committed By: eadler Date: Mon Mar 5 00:06:24 UTC 2018 Modified Files: src/distrib/notes/common: main Log Message: distrib: add myself ok pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.542 -r1.543 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.542 src/distrib/notes/common/main:1.543 --- src/distrib/notes/common/main:1.542 Wed Feb 28 20:13:09 2018 +++ src/distrib/notes/common/main Mon Mar 5 00:06:24 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.542 2018/02/28 20:13:09 snj Exp $ +.\" $NetBSD: main,v 1.543 2018/03/05 00:06:24 eadler Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1074,6 +1074,7 @@ If you're one of them, and would like to .\" .It Ta Ta .It Ta Hikaru Abe Ta Mt hik...@netbsd.org +.It Ta Eitan Adler Ta Mt ead...@netbsd.org .It Ta Nathan Ahlstrom Ta Mt n...@netbsd.org .It Ta Steve Allen Ta Mt wor...@netbsd.org .It Ta Utkarsh Anand Ta Mt utkarsh...@netbsd.org
CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000
Module Name:src Committed By: christos Date: Mon Mar 5 00:17:09 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h Log Message: Make the *int64 long long (32 bit) or long (64) bit. Now all those special redefinitions could go away since this is the default behavior. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.16 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.17 --- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.16 Sun Mar 4 11:44:11 2018 +++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Sun Mar 4 19:17:09 2018 @@ -422,7 +422,7 @@ extern int dot_symbols; #define INT32_TYPE "int" #undef INT64_TYPE -#define INT64_TYPE "long int" +#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") #undef UINT8_TYPE #define UINT8_TYPE "unsigned char" @@ -434,7 +434,7 @@ extern int dot_symbols; #define UINT32_TYPE "unsigned int" #undef UINT64_TYPE -#define UINT64_TYPE "long unsigned int" +#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") #undef INT_FAST8_TYPE #define INT_FAST8_TYPE "int"
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Mon Mar 5 00:19:41 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h configargs.h Log Message: switch ppc64 from "long long" == int64 to "long" == int64 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h cvs rdiff -u -r1.13 -r1.14 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h:1.11 src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h:1.12 --- src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h:1.11 Tue Feb 6 04:18:30 2018 +++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h Sun Mar 4 19:19:41 2018 @@ -811,10 +811,10 @@ namespace std #define _GLIBCXX_HAVE_INT64_T 1 /* Define if int64_t is a long. */ -/* #undef _GLIBCXX_HAVE_INT64_T_LONG */ +#define _GLIBCXX_HAVE_INT64_T_LONG 1 /* Define if int64_t is a long long. */ -#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 +/* #undef _GLIBCXX_HAVE_INT64_T_LONG_LONG */ /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_INTTYPES_H 1 Index: src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h:1.8 src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h:1.9 --- src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h:1.8 Tue Feb 6 23:13:48 2018 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h Sun Mar 4 19:19:41 2018 @@ -1916,7 +1916,7 @@ /* Define if int64_t uses long as underlying type. */ #ifndef USED_FOR_TARGET -/* #undef INT64_T_IS_LONG */ +#define INT64_T_IS_LONG 1 #endif Index: src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h:1.13 src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h:1.14 --- src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h:1.13 Thu Feb 22 17:25:16 2018 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h Sun Mar 4 19:19:41 2018 @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp */ /* Generated automatically. */ -static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=powerpc64--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20180203' --with-system-zlib --disable-libstdcxx-dual-abi --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/var/obj/mknative/evbppc-powerpc64/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbppc-powerpc64/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/evbppc-powerpc64/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/powerpc64 --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --disable-libstdcxx-dual-abi --build=x86_64-un known-netbsd8.0 --host=powerpc64--netbsd --with-sysroot=/var/obj/mknative/evbppc-powerpc64/usr/src/destdir.evbppc"; +static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=powerpc64--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20180203' --with-system-zlib --disable-libstdcxx-dual-abi --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-mpc-lib=/usr/src/external/lgpl3/mpc/lib/libmpc/obj.evbppc-powerpc64 --with-mpfr-lib=/usr/src/external/lgpl3/mpfr/lib/libmpfr/obj.evbppc-powerpc64 --with-gmp-lib=/usr/src/external/lgpl3/gmp/lib/libgmp/obj.evbppc-powerpc64 --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/powerpc64 --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --disable-libstdcxx-dual-abi --build=x86_64-unknown-netbsd8.99 --host=powerpc64--netb sd --with-sysroot=/usr/obj/evbppc-powerpc64/release"; static const char thread_model[] = "posix"; static const struct {
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: msaitoh Date: Mon Mar 5 05:50:37 UTC 2018 Modified Files: src/usr.sbin/cpuctl/arch: i386.c Log Message: - Parse the TLB info from `cpuid leaf 18H' on Intel processor. Currently, this change doesn't decode perfectly. Tested with Gemini Lake. It has two L2 Shared TLB. One is 4MB and another is 2MB/4MB but former isn't printed yet: cpu0: ITLB 1 4KB entries 48-way cpu0: DTLB 1 4KB entries 32-way cpu0: L2 STLB 8 4MB entries 4-way Need some rework for struct x86_cache_info. - Use aprint_error_dev() for error output. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/usr.sbin/cpuctl/arch/i386.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.80 src/usr.sbin/cpuctl/arch/i386.c:1.81 --- src/usr.sbin/cpuctl/arch/i386.c:1.80 Tue Jan 16 08:23:18 2018 +++ src/usr.sbin/cpuctl/arch/i386.c Mon Mar 5 05:50:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.80 2018/01/16 08:23:18 mrg Exp $ */ +/* $NetBSD: i386.c,v 1.81 2018/03/05 05:50:37 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: i386.c,v 1.80 2018/01/16 08:23:18 mrg Exp $"); +__RCSID("$NetBSD: i386.c,v 1.81 2018/03/05 05:50:37 msaitoh Exp $"); #endif /* not lint */ #include @@ -1025,8 +1025,10 @@ intel_cpu_cacheinfo(struct cpu_info *ci) desc); if (cai != NULL) ci->ci_cinfo[cai->cai_index] = *cai; -else if ((verbose != 0) && (desc != 0xff)) - printf("Unknown cacheinfo desc %02x\n", +else if ((verbose != 0) && (desc != 0xff) +&& (desc != 0xfe)) + aprint_error_dev(ci->ci_dev, "error:" + " Unknown cacheinfo desc %02x\n", desc); } } @@ -1069,7 +1071,8 @@ intel_cpu_cacheinfo(struct cpu_info *ci) break; } if (caitype == -1) { - printf("unknown cache level (%d & %d)\n", + aprint_error_dev(ci->ci_dev, + "error: unknown cache level (%d & %d)\n", level, type); continue; } @@ -1084,6 +1087,81 @@ intel_cpu_cacheinfo(struct cpu_info *ci) ci->ci_cinfo[caitype].cai_associativity = ways; ci->ci_cinfo[caitype].cai_linesize = linesize; } + + if (ci->ci_cpuid_level < 0x18) + return; + /* Parse the TLB info from `cpuid leaf 18H', if we have it. */ + x86_cpuid(0x18, descs); + iterations = descs[0]; + for (i = 0; i <= iterations; i++) { + x86_cpuid2(0x18, i, descs); + type = __SHIFTOUT(descs[3], CPUID_DATP_TCTYPE); + if (type == CPUID_DATP_TCTYPE_N) + continue; + level = __SHIFTOUT(descs[3], CPUID_DATP_TCLEVEL); + switch (level) { + case 1: + if (type == CPUID_DATP_TCTYPE_I) +caitype = CAI_ITLB; /* XXX or ITLB2? */ + else if (type == CPUID_DATP_TCTYPE_D) +caitype = CAI_DTLB; + else +caitype = -1; + break; + case 2: + if (type == CPUID_DATP_TCTYPE_I) +caitype = CAI_L2_ITLB; + else if (type == CPUID_DATP_TCTYPE_D) +caitype = CAI_L2_DTLB; + else if (type == CPUID_DATP_TCTYPE_U) +caitype = CAI_L2_STLB; + else +caitype = -1; + break; + case 3: + /* XXX need work for L3 TLB */ + caitype = CAI_L3CACHE; + break; + default: + caitype = -1; + break; + } + if (caitype == -1) { + aprint_error_dev(ci->ci_dev, + "error: unknown TLB level (%d & %d)\n", + level, type); + continue; + } + switch (__SHIFTOUT(descs[1], CPUID_DATP_PGSIZE)) { + case CPUID_DATP_PGSIZE_4KB: + linesize = 4 * 1024; + break; + case CPUID_DATP_PGSIZE_2MB: + linesize = 2 * 1024 * 1024; + break; + case CPUID_DATP_PGSIZE_4MB: + linesize = 4 * 1024 * 1024; + break; + case CPUID_DATP_PGSIZE_1GB: + linesize = 1024 * 1024 * 1024; + break; + case CPUID_DATP_PGSIZE_2MB | CPUID_DATP_PGSIZE_4MB: + aprint_error_dev(ci->ci_dev, + "WARINING: Currently 2M/4M info can't print correctly\n"); + linesize = 4 * 1024 * 1024; + break; + default: + aprint_error_dev(ci->ci_dev, + "error: Unknown size combination\n"); + linesize = 4 * 1024; + break; + } + ways = __SHIFTOUT(descs[1], CPUID_DATP_WAYS); + sets = descs[2]; + ci->ci_cinfo[caitype].cai_totalsize = sets; /* entries */ + ci->ci_cinfo[caitype].cai_associativity = ways; + ci->ci_cinfo[caitype].cai_linesize = linesize; /* page size */ + } } static const struct x86_cache_info amd_cpuid_l2cache_assoc_info[] =
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Mon Mar 5 07:03:27 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: swtich ia64 to GCC 6. To generate a diff of this commit: cvs rdiff -u -r1.1042 -r1.1043 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1042 src/share/mk/bsd.own.mk:1.1043 --- src/share/mk/bsd.own.mk:1.1042 Mon Mar 5 00:24:01 2018 +++ src/share/mk/bsd.own.mk Mon Mar 5 07:03:27 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1042 2018/03/05 00:24:01 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1043 2018/03/05 07:03:27 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -70,6 +70,7 @@ HAVE_GCC?= 0 .elif \ ${MACHINE_CPU} == "alpha" || \ ${MACHINE_CPU} == "hppa" || \ +${MACHINE_CPU} == "ia64" || \ ${MACHINE_CPU} == "i386" || \ ${MACHINE_CPU} == "mips" || \ ${MACHINE_CPU} == "powerpc" || \
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: rin Date: Mon Mar 5 04:23:00 UTC 2018 Modified Files: src/sys/arch/amiga/dev: grf_et.c Log Message: Remove duplicate vgaw() accidentally introduced in the previous revision. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amiga/dev/grf_et.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/amiga/dev/grf_et.c diff -u src/sys/arch/amiga/dev/grf_et.c:1.35 src/sys/arch/amiga/dev/grf_et.c:1.36 --- src/sys/arch/amiga/dev/grf_et.c:1.35 Mon Mar 5 02:41:19 2018 +++ src/sys/arch/amiga/dev/grf_et.c Mon Mar 5 04:23:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_et.c,v 1.35 2018/03/05 02:41:19 christos Exp $ */ +/* $NetBSD: grf_et.c,v 1.36 2018/03/05 04:23:00 rin Exp $ */ /* * Copyright (c) 1997 Klaus Burkert @@ -37,7 +37,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.35 2018/03/05 02:41:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.36 2018/03/05 04:23:00 rin Exp $"); #include "grfet.h" #include "ite.h" @@ -1605,7 +1605,6 @@ et_getDACType(struct grf_softc *gp) vgar4HDR(ba); vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ - vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ vgaw(ba, VDAC_XINDEX, 9); check.cc[0] = vgar(ba, VDAC_XDATA);
CVS commit: src/games/fish
Module Name:src Committed By: eadler Date: Mon Mar 5 04:59:54 UTC 2018 Modified Files: src/games/fish: fish.c Log Message: [fish] don't allow users to request cards they have made books for While here, don't re-renter pro mode PR bin/52973 ok maya@ dh@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/games/fish/fish.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fish/fish.c diff -u src/games/fish/fish.c:1.22 src/games/fish/fish.c:1.23 --- src/games/fish/fish.c:1.22 Thu Sep 1 07:18:50 2011 +++ src/games/fish/fish.c Mon Mar 5 04:59:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fish.c,v 1.22 2011/09/01 07:18:50 plunky Exp $ */ +/* $NetBSD: fish.c,v 1.23 2018/03/05 04:59:54 eadler Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fish.c,v 1.22 2011/09/01 07:18:50 plunky Exp $"); +__RCSID("$NetBSD: fish.c,v 1.23 2018/03/05 04:59:54 eadler Exp $"); #endif #endif /* not lint */ @@ -171,9 +171,14 @@ usermove(void) continue; } buf[strlen(buf) - 1] = '\0'; - if (!strcasecmp(buf, "p") && !promode) { - promode = 1; - (void)printf("Entering pro mode.\n"); + if (!strcasecmp(buf, "p")) { + if (!promode) { +promode = 1; +printf("Entering pro mode.\n"); + } + else { +printf("Already in pro mode.\n"); + } continue; } if (!strcasecmp(buf, "quit")) @@ -186,10 +191,15 @@ usermove(void) continue; } n = p - cards; - if (userhand[n]) { + if (userhand[n] <= 3) { userasked[n] = 1; return(n); } + if (userhand[n] == 4) { + printf("You already have all of those.\n"); + continue; + } + if (nrandom(3) == 1) (void)printf("You don't have any of those!\n"); else
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Mon Mar 5 05:44:07 UTC 2018 Modified Files: src/sys/arch/x86/include: cacheinfo.h specialreg.h Log Message: Add Intel Deterministic Address Translation Parameter Leaf(0x18) definitions. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/include/cacheinfo.h cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x86/include/specialreg.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/x86/include/cacheinfo.h diff -u src/sys/arch/x86/include/cacheinfo.h:1.22 src/sys/arch/x86/include/cacheinfo.h:1.23 --- src/sys/arch/x86/include/cacheinfo.h:1.22 Wed Apr 27 08:47:03 2016 +++ src/sys/arch/x86/include/cacheinfo.h Mon Mar 5 05:44:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cacheinfo.h,v 1.22 2016/04/27 08:47:03 msaitoh Exp $ */ +/* $NetBSD: cacheinfo.h,v 1.23 2018/03/05 05:44:07 msaitoh Exp $ */ #ifndef _X86_CACHEINFO_H_ #define _X86_CACHEINFO_H_ @@ -333,6 +333,7 @@ __CI_TBL(CAI_L3CACHE, 0xeb, 24,18 * 1 __CI_TBL(CAI_L3CACHE, 0xec, 24,24 * 1024 * 1024, 64, NULL), \ __CI_TBL(CAI_PREFETCH, 0xf0,0, 0, 64, NULL), \ __CI_TBL(CAI_PREFETCH, 0xf1,0, 0,128, NULL), \ +/* 0xfe means no TLB information in CPUID leaf 2 (and use leaf 0x18) */ \ /* 0xff means no cache information in CPUID leaf 2 (and use leaf 4) */ \ __CI_TBL(0, 0,0, 0, 0, NULL) \ } Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.111 src/sys/arch/x86/include/specialreg.h:1.112 --- src/sys/arch/x86/include/specialreg.h:1.111 Mon Jan 15 08:17:20 2018 +++ src/sys/arch/x86/include/specialreg.h Mon Mar 5 05:44:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.111 2018/01/15 08:17:20 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.112 2018/03/05 05:44:07 msaitoh Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -456,6 +456,36 @@ "\06" "LZCNT"\ "\11" "PREFETCHW" + +/* + * Intel Deterministic Address Translation Parameter Leaf + * Fn_0018 + */ + +/* %ecx=0 %eax __BITS(31, 0): the maximum input value of supported sub-leaf */ + +/* %ebx */ +#define CPUID_DATP_PGSIZE __BITS(3, 0) /* page size */ +#define CPUID_DATP_PGSIZE_4KB __BIT(0) /* 4KB page support */ +#define CPUID_DATP_PGSIZE_2MB __BIT(1) /* 2MB page support */ +#define CPUID_DATP_PGSIZE_4MB __BIT(2) /* 4MB page support */ +#define CPUID_DATP_PGSIZE_1GB __BIT(3) /* 1GB page support */ +#define CPUID_DATP_PARTITIONING __BITS(10, 8) /* Partitioning */ +#define CPUID_DATP_WAYS __BITS(31, 16) /* Ways of associativity */ + +/* Number of sets: %ecx */ + +/* %edx */ +#define CPUID_DATP_TCTYPE __BITS(4, 0) /* Translation Cache type */ +#define CPUID_DATP_TCTYPE_N 0 /* NULL (not valid) */ +#define CPUID_DATP_TCTYPE_D 1 /* Data TLB */ +#define CPUID_DATP_TCTYPE_I 2 /* Instruction TLB */ +#define CPUID_DATP_TCTYPE_U 3 /* Unified TLB */ +#define CPUID_DATP_TCLEVEL __BITS(7, 5) /* TLB level (start at 1) */ +#define CPUID_DATP_FULLASSOC __BIT(8) /* Full associative */ +#define CPUID_DATP_SHAREING __BITS(25, 14) /* shareing */ + + /* AMD/VIA Fn8001 extended features - %edx */ /* CPUID_SYSCALL SYSCALL/SYSRET */ #define CPUID_MPC 0x0008 /* Multiprocessing Capable */
CVS commit: src/sys/ddb
Module Name:src Committed By: mlelstv Date: Mon Mar 5 07:47:21 UTC 2018 Modified Files: src/sys/ddb: db_autoconf.c Log Message: enums might be unsigned. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/ddb/db_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/ddb/db_autoconf.c diff -u src/sys/ddb/db_autoconf.c:1.1 src/sys/ddb/db_autoconf.c:1.2 --- src/sys/ddb/db_autoconf.c:1.1 Sun Mar 4 07:14:50 2018 +++ src/sys/ddb/db_autoconf.c Mon Mar 5 07:47:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_autoconf.c,v 1.1 2018/03/04 07:14:50 mlelstv Exp $ */ +/* $NetBSD: db_autoconf.c,v 1.2 2018/03/05 07:47:21 mlelstv Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_autoconf.c,v 1.1 2018/03/04 07:14:50 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_autoconf.c,v 1.2 2018/03/05 07:47:21 mlelstv Exp $"); #ifndef _KERNEL #include @@ -73,11 +73,12 @@ db_show_all_devices(db_expr_t addr, bool for (dv = db_device_first(); dv != NULL; dv = db_device_next(dv)) { db_read_bytes((db_addr_t)dv, sizeof(buf), (char *)); - if (buf.dv_class < 0 || - buf.dv_class > __arraycount(classnames)) + unsigned i = buf.dv_class; + + if (i >= __arraycount(classnames)) cl = ""; else - cl = classnames[buf.dv_class]; + cl = classnames[i]; db_printf("%-16.16s", buf.dv_xname); db_printf(" %10s", cl);
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: christos Date: Mon Mar 5 02:39:06 UTC 2018 Modified Files: src/sys/arch/amiga/amiga: machdep.c Log Message: can't use fnop directly now, explain why. To generate a diff of this commit: cvs rdiff -u -r1.248 -r1.249 src/sys/arch/amiga/amiga/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/amiga/amiga/machdep.c diff -u src/sys/arch/amiga/amiga/machdep.c:1.248 src/sys/arch/amiga/amiga/machdep.c:1.249 --- src/sys/arch/amiga/amiga/machdep.c:1.248 Tue Aug 15 05:51:43 2017 +++ src/sys/arch/amiga/amiga/machdep.c Sun Mar 4 21:39:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.248 2017/08/15 09:51:43 maya Exp $ */ +/* $NetBSD: machdep.c,v 1.249 2018/03/05 02:39:06 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -50,7 +50,7 @@ #include "empm.h" #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2017/08/15 09:51:43 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.249 2018/03/05 02:39:06 christos Exp $"); #include #include @@ -721,8 +721,20 @@ initcpu(void) /* * in this case, we're about to switch the FPU off; * do a FNOP to avoid stray FP traps later + * + * But we can't use fnop directly anymore as of + * gcc-6 because it passes -mno-float to the assembler + * because of -msoft-float and the assembler refuses + * to assemble the instruction; adding -Wa,-mfloat + * does not work either because the assembler then + * complains about feature being turned off and on + * so we just put in the opcode directly. */ +#if 0 __asm("fnop"); +#else + __asm(".word 0xf280,0x"); +#endif /* ... and mark FPU as absent for identifyfpu() */ machineid &= ~(AMIGA_FPU40|AMIGA_68882|AMIGA_68881); }
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: christos Date: Mon Mar 5 00:20:08 UTC 2018 Modified Files: src/sys/arch/powerpc/include: int_fmtio.h Log Message: int64 is long for _LP64 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/int_fmtio.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/include/int_fmtio.h diff -u src/sys/arch/powerpc/include/int_fmtio.h:1.6 src/sys/arch/powerpc/include/int_fmtio.h:1.7 --- src/sys/arch/powerpc/include/int_fmtio.h:1.6 Wed Apr 1 19:31:37 2015 +++ src/sys/arch/powerpc/include/int_fmtio.h Sun Mar 4 19:20:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: int_fmtio.h,v 1.6 2015/04/01 23:31:37 matt Exp $ */ +/* $NetBSD: int_fmtio.h,v 1.7 2018/03/05 00:20:08 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,38 +44,58 @@ #define PRId8 "d" /* int8_t */ #define PRId16 "d" /* int16_t */ #define PRId32 "d" /* int32_t */ +#ifdef _LP64 +#define PRId64 "ld" /* int64_t */ +#else #define PRId64 "lld" /* int64_t */ +#endif #define PRIdLEAST8 "d" /* int_least8_t */ #define PRIdLEAST16 "d" /* int_least16_t */ #define PRIdLEAST32 "d" /* int_least32_t */ +#ifdef _LP64 +#define PRIdLEAST64 "ld" /* int_least64_t */ +#else #define PRIdLEAST64 "lld" /* int_least64_t */ +#endif #define PRIdFAST8 "d" /* int_fast8_t */ #define PRIdFAST16 "d" /* int_fast16_t */ #define PRIdFAST32 "d" /* int_fast32_t */ -#define PRIdFAST64 "lld" /* int_fast64_t */ -#define PRIdMAX "lld" /* intmax_t */ #ifdef _LP64 +#define PRIdFAST64 "ld" /* int_fast64_t */ +#define PRIdMAX "ld" /* intmax_t */ #define PRIdPTR "ld" /* intptr_t */ #else +#define PRIdFAST64 "lld" /* int_fast64_t */ +#define PRIdMAX "lld" /* intmax_t */ #define PRIdPTR "d" /* intptr_t */ #endif #define PRIi8 "i" /* int8_t */ #define PRIi16 "i" /* int16_t */ #define PRIi32 "i" /* int32_t */ +#ifdef _LP64 +#define PRIi64 "li" /* int64_t */ +#else #define PRIi64 "lli" /* int64_t */ +#endif #define PRIiLEAST8 "i" /* int_least8_t */ #define PRIiLEAST16 "i" /* int_least16_t */ #define PRIiLEAST32 "i" /* int_least32_t */ +#ifdef _LP64 +#define PRIiLEAST64 "li" /* int_least64_t */ +#else #define PRIiLEAST64 "lli" /* int_least64_t */ +#endif #define PRIiFAST8 "i" /* int_fast8_t */ #define PRIiFAST16 "i" /* int_fast16_t */ #define PRIiFAST32 "i" /* int_fast32_t */ -#define PRIiFAST64 "lli" /* int_fast64_t */ -#define PRIiMAX "lli" /* intmax_t */ #ifdef _LP64 +#define PRIiFAST64 "li" /* int_fast64_t */ +#define PRIiMAX "li" /* intmax_t */ #define PRIiPTR "li" /* intptr_t */ #else +#define PRIiFAST64 "lli" /* int_fast64_t */ +#define PRIiMAX "lli" /* intmax_t */ #define PRIiPTR "i" /* intptr_t */ #endif @@ -84,76 +104,116 @@ #define PRIo8 "o" /* uint8_t */ #define PRIo16 "o" /* uint16_t */ #define PRIo32 "o" /* uint32_t */ +#ifdef _LP64 +#define PRIo64 "lo" /* uint64_t */ +#else #define PRIo64 "llo" /* uint64_t */ +#endif #define PRIoLEAST8 "o" /* uint_least8_t */ #define PRIoLEAST16 "o" /* uint_least16_t */ #define PRIoLEAST32 "o" /* uint_least32_t */ +#ifdef _LP64 +#define PRIoLEAST64 "lo" /* uint_least64_t */ +#else #define PRIoLEAST64 "llo" /* uint_least64_t */ +#endif #define PRIoFAST8 "o" /* uint_fast8_t */ #define PRIoFAST16 "o" /* uint_fast16_t */ #define PRIoFAST32 "o" /* uint_fast32_t */ -#define PRIoFAST64 "llo" /* uint_fast64_t */ -#define PRIoMAX "llo" /* uintmax_t */ #ifdef _LP64 +#define PRIoFAST64 "lo" /* uint_fast64_t */ +#define PRIoMAX "lo" /* uintmax_t */ #define PRIoPTR "lo" /* uintptr_t */ #else +#define PRIoFAST64 "llo" /* uint_fast64_t */ +#define PRIoMAX "llo" /* uintmax_t */ #define PRIoPTR "o" /* uintptr_t */ #endif #define PRIu8 "u" /* uint8_t */ #define PRIu16 "u" /* uint16_t */ #define PRIu32 "u" /* uint32_t */ +#ifdef _LP64 +#define PRIu64 "lu" /* uint64_t */ +#else #define PRIu64 "llu" /* uint64_t */ +#endif #define PRIuLEAST8 "u" /* uint_least8_t */ #define PRIuLEAST16 "u" /* uint_least16_t */ #define PRIuLEAST32 "u" /* uint_least32_t */ +#ifdef _LP64 +#define PRIuLEAST64 "lu" /* uint_least64_t */ +#else #define PRIuLEAST64 "llu" /* uint_least64_t */ +#endif #define PRIuFAST8 "u" /* uint_fast8_t */ #define PRIuFAST16 "u" /* uint_fast16_t */ #define PRIuFAST32 "u" /* uint_fast32_t */ -#define PRIuFAST64 "llu" /* uint_fast64_t */ -#define PRIuMAX "llu" /* uintmax_t */ #ifdef _LP64 +#define PRIuFAST64 "lu" /* uint_fast64_t */ +#define PRIuMAX "lu" /* uintmax_t */ #define PRIuPTR "lu" /* uintptr_t */ #else +#define PRIuFAST64 "llu" /* uint_fast64_t */ +#define PRIuMAX "llu" /* uintmax_t */ #define PRIuPTR "u" /* uintptr_t */ #endif #define PRIx8 "x" /* uint8_t */ #define PRIx16 "x" /* uint16_t */ #define PRIx32 "x" /* uint32_t */ +#ifdef _LP64 +#define PRIx64 "lx" /* uint64_t */
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Mar 5 00:24:01 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch ppc to OpenSSL-1.1, use MACHINE_CPU consistently. To generate a diff of this commit: cvs rdiff -u -r1.1041 -r1.1042 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1041 src/share/mk/bsd.own.mk:1.1042 --- src/share/mk/bsd.own.mk:1.1041 Sun Mar 4 17:47:49 2018 +++ src/share/mk/bsd.own.mk Sun Mar 4 19:24:01 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1041 2018/03/04 22:47:49 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1042 2018/03/05 00:24:01 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -108,7 +108,8 @@ MKGCCCMDS?= no .if ${MACHINE} == "amd64" || \ ${MACHINE} == "arm" || \ ${MACHINE} == "i386" || \ -${MACHINE_ARCH} == "sh3" || \ +${MACHINE_CPU} == "powerpc" || \ +${MACHINE_CPU} == "sh3" || \ ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" HAVE_OPENSSL?= 11
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k
Module Name:src Committed By: christos Date: Mon Mar 5 01:00:12 UTC 2018 Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: crypto.inc Log Message: need CRYPTO_memcmp. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc:1.1 --- /dev/null Sun Mar 4 20:00:12 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc Sun Mar 4 20:00:12 2018 @@ -0,0 +1,5 @@ +.PATH.S: ${.PARSEDIR} + +CRYPTO_SRCS += libc-memequal.c + +.include "../../crypto.inc"
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k
Module Name:src Committed By: christos Date: Mon Mar 5 00:59:43 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: aes-m68k.S Log Message: make the key functions public, and provide function type and size attributes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S:1.1 Tue Feb 7 06:18:43 2017 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/aes-m68k.S Sun Mar 4 19:59:43 2018 @@ -1,4 +1,4 @@ -| $NetBSD: aes-m68k.S,v 1.1 2017/02/07 11:18:43 isaki Exp $ +| $NetBSD: aes-m68k.S,v 1.2 2018/03/05 00:59:43 christos Exp $ | Copyright (C) 2016 Tetsuya Isaki. All rights reserved. | Copyright (C) 2016 Y.Sugahara (moveccr). All rights reserved. @@ -28,12 +28,12 @@ #define rounds (60 * 4) | int -| private_AES_set_encrypt_key(const unsigned char *userKey, +| AES_set_encrypt_key(const unsigned char *userKey, | const int bits, | AES_KEY *key) -.global private_AES_set_encrypt_key -private_AES_set_encrypt_key: -_private_AES_set_encrypt_key: + .global AES_set_encrypt_key + .type AES_set_encrypt_key, @function +AES_set_encrypt_key: moveml %d2-%d7/%a2-%a6,%sp@- moveal %sp@(44+4),%a0 | userKey moveal %sp@(44+8),%a1 | bits @@ -378,14 +378,16 @@ pek_return1: pek_return2: moveql #-2,%d0 bra pek_return + .size AES_set_encrypt_key, .-AES_set_encrypt_key | int | private_AES_set_decrypt_key(const unsigned char *userKey, | const int bits, | AES_KEY *key) -.global private_AES_set_decrypt_key -private_AES_set_decrypt_key: + .global AES_set_decrypt_key + .type AES_set_decrypt_key, @function +AES_set_decrypt_key: moveml %d2-%d7/%a2-%a6,%sp@- moveal %sp@(44+4),%a0 | userKey moveal %sp@(44+8),%a1 | bits @@ -395,7 +397,7 @@ private_AES_set_decrypt_key: movel %a3,%sp@- movel %a1,%sp@- movel %a0,%sp@- - bsr _private_AES_set_encrypt_key + bsr AES_set_encrypt_key lea %sp@(12),%sp bmi pdk_return @@ -473,13 +475,15 @@ pdk_apply_loop: pdk_return: moveml %sp@+,%d2-%d7/%a2-%a6 rts + .size AES_set_decrypt_key, .-AES_set_decrypt_key | void | AES_encrypt(const unsigned char *in, | unsigned char *out, | const AES_KEY *key) -.global AES_encrypt + .global AES_encrypt + .type AES_encrypt, @function AES_encrypt: | %a0 in, Te0 | %a1 out, Te1 @@ -823,12 +827,14 @@ enc_last: moveml %sp@+,%d2-%d7/%a2-%a5 rts + .size AES_set_decrypt_key, .-AES_set_decrypt_key | void | AES_decrypt(const unsigned char *in, | unsigned char *out, | const AES_KEY *key) -.global AES_decrypt + .global AES_decrypt + .type AES_decrypt, @function AES_decrypt: | %a0 in, Td0 | %a1 out, Td1 @@ -1183,6 +1189,7 @@ dec_loop_start: moveml %sp@+,%d2-%d7/%a2-%a5 rts + .size AES_decrypt, .-AES_decrypt .data .balign 4
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: christos Date: Mon Mar 5 02:41:19 UTC 2018 Modified Files: src/sys/arch/amiga/dev: grf_et.c Log Message: use an inline function for the "4 reads" To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/dev/grf_et.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/amiga/dev/grf_et.c diff -u src/sys/arch/amiga/dev/grf_et.c:1.34 src/sys/arch/amiga/dev/grf_et.c:1.35 --- src/sys/arch/amiga/dev/grf_et.c:1.34 Sun Mar 4 17:28:18 2018 +++ src/sys/arch/amiga/dev/grf_et.c Sun Mar 4 21:41:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_et.c,v 1.34 2018/03/04 22:28:18 mrg Exp $ */ +/* $NetBSD: grf_et.c,v 1.35 2018/03/05 02:41:19 christos Exp $ */ /* * Copyright (c) 1997 Klaus Burkert @@ -37,7 +37,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.34 2018/03/04 22:28:18 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.35 2018/03/05 02:41:19 christos Exp $"); #include "grfet.h" #include "ite.h" @@ -1586,6 +1586,11 @@ et_getControllerType(struct grf_softc *g return ((*mem == 0xff) ? ETW32 : ET4000); } +/* We MUST do 4 HW reads to switch into command mode */ +static inline int vgar4HDR(volatile unsigned char *ba) +{ + return vgar(ba, HDR) + vgar(ba, HDR) + vgar(ba, HDR) + vgar(ba, HDR); +} static int et_getDACType(struct grf_softc *gp) @@ -1598,11 +1603,8 @@ et_getDACType(struct grf_softc *gp) /* check for Sierra SC 15025 */ - /* We MUST do 4 HW reads to switch into command mode */ - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); + vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ vgaw(ba, VDAC_XINDEX, 9); @@ -1614,17 +1616,11 @@ et_getDACType(struct grf_softc *gp) vgaw(ba, VDAC_XINDEX, 12); check.cc[3] = vgar(ba, VDAC_XDATA); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ if (check.tt == 0x533ab141) { - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, VDAC_COMMAND, 0x10); /* set ERPF */ /* switch to 8 bits per color */ @@ -1633,10 +1629,7 @@ et_getDACType(struct grf_softc *gp) /* do not shift color values */ etcmap_shift = 0; - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, VDAC_COMMAND, 0x00); /* clear ERPF */ vgaw(ba, VDAC_MASK, 0xff); @@ -1645,10 +1638,7 @@ et_getDACType(struct grf_softc *gp) /* check for MUSIC DAC */ - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, VDAC_COMMAND, 0x02); /* set some strange MUSIC mode (???) */ vgaw(ba, VDAC_XINDEX, 0x01); @@ -1661,16 +1651,10 @@ et_getDACType(struct grf_softc *gp) } /* check for AT ATT20c491 DAC (crest) */ - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, HDR, 0xff); vgaw(ba, VDAC_MASK, 0x01); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); if (vgar(ba, HDR) == 0xff) { /* do not shift color values */ etcmap_shift = 0; @@ -1680,10 +1664,7 @@ et_getDACType(struct grf_softc *gp) } /* restore PowerUp settings (crest) */ - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); - vgar(ba, HDR); + vgar4HDR(ba); vgaw(ba, HDR, 0x00); /*
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: christos Date: Mon Mar 5 02:41:03 UTC 2018 Modified Files: src/sys/arch/amiga/conf: Makefile.amiga Log Message: gcc-6 passes -m68040 to the assembler, so reset it to -m68030... To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/arch/amiga/conf/Makefile.amiga 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/amiga/conf/Makefile.amiga diff -u src/sys/arch/amiga/conf/Makefile.amiga:1.109 src/sys/arch/amiga/conf/Makefile.amiga:1.110 --- src/sys/arch/amiga/conf/Makefile.amiga:1.109 Sat Sep 5 22:17:30 2015 +++ src/sys/arch/amiga/conf/Makefile.amiga Sun Mar 4 21:41:03 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amiga,v 1.109 2015/09/06 02:17:30 uebayasi Exp $ +# $NetBSD: Makefile.amiga,v 1.110 2018/03/05 02:41:03 christos Exp $ # Makefile for NetBSD # @@ -34,7 +34,7 @@ GENASSYM_CONF= ${AMIGA}/amiga/genassym.c CPPFLAGS+= -Damiga -DFPCOPROC .if !defined(CMACHFLAGS) .include "$S/arch/m68k/Makefile.cmachflags" -CMACHFLAGS+= -Wa,-mcpu=68030 -Wa,-m68851 +CMACHFLAGS+= -Wa,-mcpu=68030 -Wa,-m68030 -Wa,-m68851 .endif CFLAGS+= ${CMACHFLAGS} -msoft-float AFLAGS+= -x assembler-with-cpp