CVS commit: src/sys/common/pmap/tlb
Module Name:src Committed By: matt Date: Thu Jun 23 07:43:20 UTC 2011 Added Files: src/sys/common/pmap/tlb: pmap_synci.c Log Message: Separate code out from pmap_tlb.c which handles the synchronization of the icache across CPUs. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/common/pmap/tlb/pmap_synci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/common/pmap/tlb/pmap_synci.c diff -u /dev/null src/sys/common/pmap/tlb/pmap_synci.c:1.1 --- /dev/null Thu Jun 23 07:43:20 2011 +++ src/sys/common/pmap/tlb/pmap_synci.c Thu Jun 23 07:43:19 2011 @@ -0,0 +1,197 @@ +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h + +__KERNEL_RCSID(0, $NetBSD: pmap_synci.c,v 1.1 2011/06/23 07:43:19 matt Exp $); + +#define __PMAP_PRIVATE + +#include sys/param.h +#include sys/systm.h +#include sys/mutex.h +#include sys/atomic.h +#include sys/cpu.h + +#include uvm/uvm.h + +#if defined(MULTIPROCESSOR) +void +pmap_syncicache_ast(struct cpu_info *ci) +{ + struct pmap_tlb_info * const ti = ci-ci_tlb_info; + + KASSERT(kpreempt_disabled()); + + uint32_t page_bitmap = atomic_swap_32(ti-ti_synci_page_bitmap, 0); +#if 0 + printf(%s: need to sync %#x\n, __func__, page_bitmap); +#endif + ti-ti_evcnt_synci_asts.ev_count++; + /* + * If every bit is set in the bitmap, sync the entire icache. + */ + if (page_bitmap == pmap_tlb_synci_map_mask) { + pmap_md_icache_sync_all(); + ti-ti_evcnt_synci_all.ev_count++; + ti-ti_evcnt_synci_pages.ev_count += pmap_tlb_synci_page_mask+1; + kpreempt_enable(); + return; + } + + /* + * Loop through the bitmap clearing each set of indices for each page. + */ + for (vaddr_t va = 0; + page_bitmap != 0; + page_bitmap = 1, va += PAGE_SIZE) { + if (page_bitmap 1) { + /* + * Each bit set represents a page index to be synced. + */ + pmap_md_icache_sync_range_index(va, PAGE_SIZE); + ti-ti_evcnt_synci_pages.ev_count++; + } + } + + kpreempt_enable(); +} + +void +pmap_tlb_syncicache(vaddr_t va, uint32_t page_onproc) +{ + KASSERT(kpreempt_disabled()); + /* + * We don't sync the icache here but let ast do it for us just before + * returning to userspace. We do this because we don't really know + * on which CPU we will return to userspace and if we synch the icache + * now it might not be on the CPU we need it on. In addition, others + * threads might sync the icache before we get to return to userland + * so there's no reason for us to do it. + * + * Each TLB/cache keeps a synci sequence number which gets advanced + * each time that TLB/cache performs a pmap_md_sync_icache_all. When + * we return to userland, we check the pmap's corresponding synci + * sequence number for that TLB/cache. If they match, it means that + * no one has yet synched the icache so we much do it ourselves. If + * they don't match someone has already synced the icache for us. + * + * There is a small chance that the generation numbers will wrap and + * then become equal but that's a one in 4 billion cache and will + * just cause an extra sync of the icache. + */ + const uint32_t cpu_mask = 1L cpu_index(curcpu()); + const uint32_t page_mask = + 1L ((va PGSHIFT) pmap_tlb_synci_page_mask); + uint32_t onproc = 0; + for (size_t i = 0; i pmap_ntlbs; i++) { + struct pmap_tlb_info * const ti = pmap_tlbs[i]; + TLBINFO_LOCK(ti); + for (;;) { + uint32_t old_page_bitmap =
CVS commit: src/sys/common/pmap/tlb
Module Name:src Committed By: matt Date: Thu Jun 23 07:45:24 UTC 2011 Modified Files: src/sys/common/pmap/tlb: pmap.h Log Message: Use new names for the pmap_syncicache routines To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/common/pmap/tlb/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/common/pmap/tlb/pmap.h diff -u src/sys/common/pmap/tlb/pmap.h:1.8 src/sys/common/pmap/tlb/pmap.h:1.9 --- src/sys/common/pmap/tlb/pmap.h:1.8 Thu Jun 23 05:50:24 2011 +++ src/sys/common/pmap/tlb/pmap.h Thu Jun 23 07:45:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.8 2011/06/23 05:50:24 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.9 2011/06/23 07:45:24 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -234,9 +234,9 @@ bool pmap_tlb_shootdown_bystanders(pmap_t pmap); void pmap_tlb_info_attach(struct pmap_tlb_info *, struct cpu_info *); void pmap_md_tlb_info_attach(struct pmap_tlb_info *, struct cpu_info *); -void pmap_tlb_syncicache_ast(struct cpu_info *); -void pmap_tlb_syncicache_wanted(struct cpu_info *); -void pmap_tlb_syncicache(vaddr_t, uint32_t); +void pmap_syncicache_ast(struct cpu_info *); +void pmap_syncicache_wanted(struct cpu_info *); +void pmap_syncicache(vaddr_t, uint32_t); #endif void pmap_tlb_info_init(struct pmap_tlb_info *); void pmap_tlb_info_evcnt_attach(struct pmap_tlb_info *);
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Jun 23 07:47:22 UTC 2011 Modified Files: src/share/man/man4: altq.4 Log Message: Fix typos, sort sections. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/altq.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/altq.4 diff -u src/share/man/man4/altq.4:1.1 src/share/man/man4/altq.4:1.2 --- src/share/man/man4/altq.4:1.1 Wed Jun 22 20:29:38 2011 +++ src/share/man/man4/altq.4 Thu Jun 23 07:47:22 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: altq.4,v 1.1 2011/06/22 20:29:38 jruoho Exp $ +.\ $NetBSD: altq.4,v 1.2 2011/06/23 07:47:22 wiz Exp $ .\ .\ Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi .\ @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm altq -.Nd alternate queueing framework +.Nd alternate queuing framework .Sh SYNOPSIS .Cd options ALTQ .Cd options ALTQ_BLUE @@ -60,8 +60,12 @@ modifies the interface packet queues. Therefore the driver modifications described in .Xr altq 9 -are required in order to use a cerain network card with +are required in order to use a certain network card with .Nm . +.Sh FILES +.Bd -literal +/dev/altq +.Ed .Sh SEE ALSO .Xr pf 4 , .Xr altq.conf 5 , @@ -75,11 +79,6 @@ .%O Asia BSD conference .%U http://www.sonycsl.co.jp/~kjc/papers/fittingtheory.pdf .Re -.Sh FILES -.Bd -literal -/dev/altq -.Ed -.\ .\ .Sh HISTORY .\ .\ XXX: Write this.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Jun 23 07:47:40 UTC 2011 Modified Files: src/share/man/man4: sysmon.4 Log Message: Sort sections, fix typos. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/sysmon.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/sysmon.4 diff -u src/share/man/man4/sysmon.4:1.1 src/share/man/man4/sysmon.4:1.2 --- src/share/man/man4/sysmon.4:1.1 Wed Jun 22 19:34:53 2011 +++ src/share/man/man4/sysmon.4 Thu Jun 23 07:47:40 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: sysmon.4,v 1.1 2011/06/22 19:34:53 jruoho Exp $ +.\ $NetBSD: sysmon.4,v 1.2 2011/06/23 07:47:40 wiz Exp $ .\ .\ Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi .\ @@ -33,7 +33,7 @@ .Sh DESCRIPTION The machine-independent .Nm -is a general purpose framework for system monitorin and power management. +is a general purpose framework for system monitoring and power management. The main components of .Nm include: @@ -60,6 +60,10 @@ .Xr sysmon_taskq 9 . .It An interface for watchdog timers. +.Sh FILES +.Bd -literal +/dev/sysmon +.Ed .Sh SEE ALSO .Xr envsys 4 , .Xr swsensor 4 , @@ -67,9 +71,5 @@ .Xr powerd 8 , .Xr wdogctl 8 , .Xr pmf 9 -.Sh FILES -.Bd -literal -/dev/sysmon -.Ed .Sh AUTHORS .An Jason R. Thorpe Aq thor...@netbsd.org
CVS commit: src/sys/common/pmap/tlb
Module Name:src Committed By: matt Date: Thu Jun 23 07:58:19 UTC 2011 Modified Files: src/sys/common/pmap/tlb: pmap.h pmap_tlb.c Log Message: Add pmap_tlb_asid_check and use it verify asid handling. The shared pmap is now in a state that mips could switch to it. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/common/pmap/tlb/pmap.h cvs rdiff -u -r1.7 -r1.8 src/sys/common/pmap/tlb/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/common/pmap/tlb/pmap.h diff -u src/sys/common/pmap/tlb/pmap.h:1.9 src/sys/common/pmap/tlb/pmap.h:1.10 --- src/sys/common/pmap/tlb/pmap.h:1.9 Thu Jun 23 07:45:24 2011 +++ src/sys/common/pmap/tlb/pmap.h Thu Jun 23 07:58:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.9 2011/06/23 07:45:24 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.10 2011/06/23 07:58:19 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -248,6 +248,7 @@ #define PMAP_TLB_INSERT 0x02 void pmap_tlb_invalidate_addr(pmap_t, vaddr_t); void pmap_tlb_check(pmap_t, bool (*)(void *, vaddr_t, tlb_asid_t, pt_entry_t)); +void pmap_tlb_asid_check(void); uint16_t pmap_pvlist_lock(struct vm_page_md *, bool); Index: src/sys/common/pmap/tlb/pmap_tlb.c diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.7 src/sys/common/pmap/tlb/pmap_tlb.c:1.8 --- src/sys/common/pmap/tlb/pmap_tlb.c:1.7 Thu Jun 23 05:42:27 2011 +++ src/sys/common/pmap/tlb/pmap_tlb.c Thu Jun 23 07:58:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.7 2011/06/23 05:42:27 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.8 2011/06/23 07:58:19 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.7 2011/06/23 05:42:27 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.8 2011/06/23 07:58:19 matt Exp $); /* * Manages address spaces in a TLB. @@ -368,7 +368,9 @@ * allocate a new ASID. */ #if !defined(MULTIPROCESSOR) || defined(PMAP_NEED_TLB_SHOOTDOWN) + pmap_tlb_asid_check(); const u_int asids_found = tlb_record_asids(ti-ti_asid_bitmap); + pmap_tlb_asid_check(); KASSERT(asids_found == pmap_tlb_asid_count(ti)); if (__predict_false(asids_found = ti-ti_asid_max / 2)) { tlb_invalidate_asids(KERNEL_PID + 1, ti-ti_asid_max); @@ -465,7 +467,9 @@ * invalidate its TLB entries. */ KASSERT(pai-pai_asid KERNEL_PID); + pmap_tlb_asid_check(); tlb_invalidate_asids(pai-pai_asid, pai-pai_asid); + pmap_tlb_asid_check(); } else if (pai-pai_asid) { /* * The victim is no longer an active pmap for this TLB. @@ -488,7 +492,9 @@ /* * We need to invalidate all global TLB entries. */ + pmap_tlb_asid_check(); tlb_invalidate_globals(); + pmap_tlb_asid_check(); break; case TLBINV_ALL: /* @@ -629,8 +635,10 @@ TLBINFO_LOCK(ti); if (pm == pmap_kernel() || PMAP_PAI_ASIDVALID_P(pai, ti)) { + pmap_tlb_asid_check(); rv = tlb_update_addr(va, pai-pai_asid, pt_entry, (flags PMAP_TLB_INSERT) != 0); + pmap_tlb_asid_check(); } #if defined(MULTIPROCESSOR) defined(PMAP_NEED_TLB_SHOOTDOWN) pm-pm_shootdown_pending = (flags PMAP_TLB_NEED_IPI) != 0; @@ -650,7 +658,9 @@ TLBINFO_LOCK(ti); if (pm == pmap_kernel() || PMAP_PAI_ASIDVALID_P(pai, ti)) { + pmap_tlb_asid_check(); tlb_invalidate_addr(va, pai-pai_asid); + pmap_tlb_asid_check(); } #if defined(MULTIPROCESSOR) defined(PMAP_NEED_TLB_SHOOTDOWN) pm-pm_shootdown_pending = 1; @@ -782,6 +792,9 @@ #endif ci-ci_pmap_asid_cur = pai-pai_asid; tlb_set_asid(pai-pai_asid); + pmap_tlb_asid_check(); + } else { + printf(%s: l (%p) != curlwp %p\n, __func__, l, curlwp); } TLBINFO_UNLOCK(ti); } @@ -813,6 +826,7 @@ #elif defined(DEBUG) curcpu()-ci_pmap_asid_cur = 0; tlb_set_asid(0); + pmap_tlb_asid_check(); #endif } @@ -848,6 +862,19 @@ #endif /* MULTIPROCESSOR */ } +void +pmap_tlb_asid_check(void) +{ +#ifdef DEBUG + kpreempt_disable(); + const tlb_asid_t asid = tlb_get_asid(); + KDASSERTMSG(asid == curcpu()-ci_pmap_asid_cur, + (%s: asid (%#x) != current asid (%#x), + __func__, asid, curcpu()-ci_pmap_asid_cur)); + kpreempt_enable(); +#endif +} + #ifdef DEBUG void pmap_tlb_check(pmap_t pm, bool (*func)(void *, vaddr_t, tlb_asid_t, pt_entry_t))
CVS commit: src/sys/arch/x86/acpi
Module Name:src Committed By: jruoho Date: Thu Jun 23 08:10:36 UTC 2011 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c Log Message: Fix bug pointed out by njoly@. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/acpi/acpi_cpu_md.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/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.62 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.63 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.62 Wed Jun 22 08:49:54 2011 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Thu Jun 23 08:10:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.62 2011/06/22 08:49:54 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.63 2011/06/23 08:10:35 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.62 2011/06/22 08:49:54 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.63 2011/06/23 08:10:35 jruoho Exp $); #include sys/param.h #include sys/bus.h @@ -433,21 +433,27 @@ { uint64_t xc, val; - /* - * Make sure EST is enabled. - */ - if ((sc-sc_flags ACPICPU_FLAG_P_FFH) != 0) { + switch (cpu_vendor) { - val = rdmsr(MSR_MISC_ENABLE); + case CPUVENDOR_IDT: + case CPUVENDOR_INTEL: - if ((val MSR_MISC_ENABLE_EST) == 0) { + /* + * Make sure EST is enabled. + */ + if ((sc-sc_flags ACPICPU_FLAG_P_FFH) != 0) { - val |= MSR_MISC_ENABLE_EST; - wrmsr(MSR_MISC_ENABLE, val); val = rdmsr(MSR_MISC_ENABLE); - if ((val MSR_MISC_ENABLE_EST) == 0) -return ENOTTY; + if ((val MSR_MISC_ENABLE_EST) == 0) { + +val |= MSR_MISC_ENABLE_EST; +wrmsr(MSR_MISC_ENABLE, val); +val = rdmsr(MSR_MISC_ENABLE); + +if ((val MSR_MISC_ENABLE_EST) == 0) + return ENOTTY; + } } }
CVS commit: src/sys/common/pmap/tlb
Module Name:src Committed By: matt Date: Thu Jun 23 08:11:56 UTC 2011 Modified Files: src/sys/common/pmap/tlb: pmap_segtab.c pmap_synci.c pmap_tlb.c Log Message: Make sure to include opt_multiprocessor.h. Add missing ). (spotted by uebayashi@) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/common/pmap/tlb/pmap_segtab.c cvs rdiff -u -r1.1 -r1.2 src/sys/common/pmap/tlb/pmap_synci.c cvs rdiff -u -r1.8 -r1.9 src/sys/common/pmap/tlb/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/common/pmap/tlb/pmap_segtab.c diff -u src/sys/common/pmap/tlb/pmap_segtab.c:1.3 src/sys/common/pmap/tlb/pmap_segtab.c:1.4 --- src/sys/common/pmap/tlb/pmap_segtab.c:1.3 Tue Jun 21 06:43:38 2011 +++ src/sys/common/pmap/tlb/pmap_segtab.c Thu Jun 23 08:11:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_segtab.c,v 1.3 2011/06/21 06:43:38 matt Exp $ */ +/* $NetBSD: pmap_segtab.c,v 1.4 2011/06/23 08:11:56 matt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.3 2011/06/21 06:43:38 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_segtab.c,v 1.4 2011/06/23 08:11:56 matt Exp $); /* * Manages physical address maps. @@ -97,6 +97,8 @@ #define __PMAP_PRIVATE +#include opt_multiprocessor.h + #include sys/param.h #include sys/systm.h #include sys/proc.h Index: src/sys/common/pmap/tlb/pmap_synci.c diff -u src/sys/common/pmap/tlb/pmap_synci.c:1.1 src/sys/common/pmap/tlb/pmap_synci.c:1.2 --- src/sys/common/pmap/tlb/pmap_synci.c:1.1 Thu Jun 23 07:43:19 2011 +++ src/sys/common/pmap/tlb/pmap_synci.c Thu Jun 23 08:11:56 2011 @@ -29,10 +29,12 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_synci.c,v 1.1 2011/06/23 07:43:19 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_synci.c,v 1.2 2011/06/23 08:11:56 matt Exp $); #define __PMAP_PRIVATE +#include opt_multiprocessor.h + #include sys/param.h #include sys/systm.h #include sys/mutex.h Index: src/sys/common/pmap/tlb/pmap_tlb.c diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.8 src/sys/common/pmap/tlb/pmap_tlb.c:1.9 --- src/sys/common/pmap/tlb/pmap_tlb.c:1.8 Thu Jun 23 07:58:19 2011 +++ src/sys/common/pmap/tlb/pmap_tlb.c Thu Jun 23 08:11:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.8 2011/06/23 07:58:19 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.9 2011/06/23 08:11:56 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.8 2011/06/23 07:58:19 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.9 2011/06/23 08:11:56 matt Exp $); /* * Manages address spaces in a TLB. @@ -124,6 +124,8 @@ #define __PMAP_PRIVATE +#include opt_multiprocessor.h + #include sys/param.h #include sys/systm.h #include sys/proc.h @@ -415,7 +417,7 @@ KASSERT(pm != pmap_kernel()); KASSERT(pai-pai_asid KERNEL_PID); #if defined(MULTIPROCESSOR) - if (!CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_onproc, ti-ti_cpu_mask)) { + if (!CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_onproc, ti-ti_cpu_mask))) { if (!TLBINFO_ASID_INUSE_P(ti, pai-pai_asid)) { TLBINFO_ASID_MARK_USED(ti, pai-pai_asid); ti-ti_asids_free--;
CVS commit: src/sys/arch/zaurus/dev
Module Name:src Committed By: nonaka Date: Thu Jun 23 10:56:03 UTC 2011 Modified Files: src/sys/arch/zaurus/dev: zaudio.c ziic.c Log Message: set PXA2X0_I2C_BASE to sc-sc_addr in the correct position. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/zaurus/dev/zaudio.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/ziic.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/zaurus/dev/zaudio.c diff -u src/sys/arch/zaurus/dev/zaudio.c:1.14 src/sys/arch/zaurus/dev/zaudio.c:1.15 --- src/sys/arch/zaurus/dev/zaudio.c:1.14 Wed Jun 22 16:18:54 2011 +++ src/sys/arch/zaurus/dev/zaudio.c Thu Jun 23 10:56:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: zaudio.c,v 1.14 2011/06/22 16:18:54 kiyohara Exp $ */ +/* $NetBSD: zaudio.c,v 1.15 2011/06/23 10:56:03 nonaka Exp $ */ /* $OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $ */ /* @@ -51,7 +51,7 @@ #include opt_zaudio.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.14 2011/06/22 16:18:54 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.15 2011/06/23 10:56:03 nonaka Exp $); #include sys/param.h #include sys/systm.h @@ -344,7 +344,6 @@ sc-sc_i2s.sc_iot = pxa2x0_bs_tag; sc-sc_i2s.sc_dmat = pxa2x0_bus_dma_tag; - sc-sc_i2c.sc_addr = PXA2X0_I2C_BASE; sc-sc_i2s.sc_size = PXA2X0_I2S_SIZE; if (pxa2x0_i2s_attach_sub(sc-sc_i2s)) { aprint_error_dev(self, unable to attach I2S\n); Index: src/sys/arch/zaurus/dev/ziic.c diff -u src/sys/arch/zaurus/dev/ziic.c:1.1 src/sys/arch/zaurus/dev/ziic.c:1.2 --- src/sys/arch/zaurus/dev/ziic.c:1.1 Sun Jun 19 16:20:09 2011 +++ src/sys/arch/zaurus/dev/ziic.c Thu Jun 23 10:56:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ziic.c,v 1.1 2011/06/19 16:20:09 nonaka Exp $ */ +/* $NetBSD: ziic.c,v 1.2 2011/06/23 10:56:03 nonaka Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ziic.c,v 1.1 2011/06/19 16:20:09 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: ziic.c,v 1.2 2011/06/23 10:56:03 nonaka Exp $); #include sys/param.h #include sys/systm.h @@ -80,6 +80,7 @@ if (strcmp(cf-cf_name, pxa-pxa_name)) return 0; + pxa-pxa_addr = PXA2X0_I2C_BASE; pxa-pxa_size = PXA2X0_I2C_SIZE; return 1; } @@ -97,6 +98,7 @@ psc-sc_dev = self; psc-sc_iot = pxa-pxa_iot; + psc-sc_addr = pxa-pxa_addr; psc-sc_size = pxa-pxa_size; psc-sc_flags = 0; if (pxa2x0_i2c_attach_sub(psc)) {
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: kiyohara Date: Thu Jun 23 11:26:22 UTC 2011 Modified Files: src/sys/arch/arm/xscale: pxa2x0_i2c.c pxa2x0reg.h Log Message: Fix bit name ISR_UB. Not _UE. And add comments for bit names from datasheet of PXA255. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/xscale/pxa2x0_i2c.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/xscale/pxa2x0reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/xscale/pxa2x0_i2c.c diff -u src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.6 src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.7 --- src/sys/arch/arm/xscale/pxa2x0_i2c.c:1.6 Wed Jun 22 16:18:55 2011 +++ src/sys/arch/arm/xscale/pxa2x0_i2c.c Thu Jun 23 11:26:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_i2c.c,v 1.6 2011/06/22 16:18:55 kiyohara Exp $ */ +/* $NetBSD: pxa2x0_i2c.c,v 1.7 2011/06/23 11:26:22 kiyohara Exp $ */ /* $OpenBSD: pxa2x0_i2c.c,v 1.2 2005/05/26 03:52:07 pascoe Exp $ */ /* @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pxa2x0_i2c.c,v 1.6 2011/06/22 16:18:55 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: pxa2x0_i2c.c,v 1.7 2011/06/23 11:26:22 kiyohara Exp $); #include sys/param.h #include sys/systm.h @@ -407,7 +407,7 @@ #define CSR_READ_4(sc,r) bus_space_read_4(sc-sc_iot, sc-sc_ioh, r) #define CSR_WRITE_4(sc,r,v) bus_space_write_4(sc-sc_iot, sc-sc_ioh, r, v) -#define ISR_ALL (ISR_RWM | ISR_ACKNAK | ISR_UE | ISR_IBB \ +#define ISR_ALL (ISR_RWM | ISR_ACKNAK | ISR_UB | ISR_IBB \ | ISR_SSD | ISR_ALD | ISR_ITE | ISR_IRF \ | ISR_GCAD | ISR_SAD | ISR_BED) Index: src/sys/arch/arm/xscale/pxa2x0reg.h diff -u src/sys/arch/arm/xscale/pxa2x0reg.h:1.22 src/sys/arch/arm/xscale/pxa2x0reg.h:1.23 --- src/sys/arch/arm/xscale/pxa2x0reg.h:1.22 Sat Jun 18 13:52:24 2011 +++ src/sys/arch/arm/xscale/pxa2x0reg.h Thu Jun 23 11:26:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0reg.h,v 1.22 2011/06/18 13:52:24 nonaka Exp $ */ +/* $NetBSD: pxa2x0reg.h,v 1.23 2011/06/23 11:26:22 kiyohara Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. @@ -231,36 +231,38 @@ /* I2C */ #define I2C_IBMR 0x1680 /* Bus monitor register */ +#define IBMR_SDAS (10) /* SDA Status */ +#define IBMR_SCLS (11) /* SCL Status */ #define I2C_IDBR 0x1688 /* Data buffer */ #define I2C_ICR 0x1690 /* Control register */ #define ICR_START (10) #define ICR_STOP (11) #define ICR_ACKNAK (12) -#define ICR_TB (13) -#define ICR_MA (14) -#define ICR_SCLE (15) /* PXA270? */ -#define ICR_IUE (16) /* PXA270? */ -#define ICR_GCD (17) /* PXA270? */ -#define ICR_ITEIE (18) /* PXA270? */ -#define ICR_DRFIE (19) /* PXA270? */ -#define ICR_BEIE (110) /* PXA270? */ -#define ICR_SSDIE (111) /* PXA270? */ -#define ICR_ALDIE (112) /* PXA270? */ -#define ICR_SADIE (113) /* PXA270? */ -#define ICR_UR (114) /* PXA270? */ -#define ICR_FM (115) /* PXA270? */ +#define ICR_TB (13) /* Transfer Byte */ +#define ICR_MA (14) /* Master Abort */ +#define ICR_SCLE (15) /* SCL Enable */ +#define ICR_IUE (16) /* I2C Unit Enable */ +#define ICR_GCD (17) /* General Call Disable */ +#define ICR_ITEIE (18) /* IDBR Transmit Empty Intr Enable */ +#define ICR_IRFIE (19) /* IDBR Receive Full Intr Enable */ +#define ICR_BEIE (110) /* Bus Error Interrupt Enable */ +#define ICR_SSDIE (111) /* Slave STOP Detected Intr Enable */ +#define ICR_ALDIE (112) /* Arbitr Loss Detect Intr Enable */ +#define ICR_SADIE (113) /* Slave Addr Detected Intr Enable */ +#define ICR_UR (114) /* Unit Reset */ +#define ICR_FM (115) /* Fast Mode: 0:100kBs/1:400kBs */ #define I2C_ISR 0x1698 /* Status register */ -#define ISR_RWM (10) +#define ISR_RWM (10) /* Read/Write Mode */ #define ISR_ACKNAK (11) -#define ISR_UE (12) -#define ISR_IBB (13) -#define ISR_SSD (14) -#define ISR_ALD (15) -#define ISR_ITE (16) -#define ISR_IRF (17) -#define ISR_GCAD (18) -#define ISR_SAD (19) -#define ISR_BED (110) +#define ISR_UB (12) /* Unit Busy */ +#define ISR_IBB (13) /* I2C Bus Busy */ +#define ISR_SSD (14) /* Slave STOP Detected */ +#define ISR_ALD (15) /* Arbitration Loss Detected */ +#define ISR_ITE (16) /* IDBR Transmit Empty */ +#define ISR_IRF (17) /* IDBR Receive Full */ +#define ISR_GCAD (18) /* General Call Address Detected */ +#define ISR_SAD (19) /* Slave Address Detected */ +#define ISR_BED (110) /* Bus Error Detected */ #define I2C_ISAR 0x16a0 /* Slave address */ /* Clock Manager */
CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Thu Jun 23 11:28:53 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: Reduced the use of the magic number. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.23 src/sys/arch/zaurus/zaurus/machdep.c:1.24 --- src/sys/arch/zaurus/zaurus/machdep.c:1.23 Sun Jun 19 16:20:09 2011 +++ src/sys/arch/zaurus/zaurus/machdep.c Thu Jun 23 11:28:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.23 2011/06/19 16:20:09 nonaka Exp $ */ +/* $NetBSD: machdep.c,v 1.24 2011/06/23 11:28:53 nonaka Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.23 2011/06/19 16:20:09 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.24 2011/06/23 11:28:53 nonaka Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -179,8 +179,11 @@ #endif /* Kernel text starts 2MB in from the bottom of the kernel address space. */ -#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x0020) -#define KERNEL_VM_BASE (KERNEL_BASE + 0x0400) +#define KERNEL_TEXT_OFFSET 0x0020 +#define KERNEL_TEXT_BASE (KERNEL_BASE + KERNEL_TEXT_OFFSET) +#ifndef KERNEL_VM_BASE +#define KERNEL_VM_BASE (KERNEL_BASE + 0x0100) +#endif /* * The range 0xc400 - 0xcfff is available for kernel VM space @@ -235,10 +238,10 @@ #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ -#define KERNEL_PT_KERNEL_NUM 32 +#define KERNEL_PT_KERNEL_NUM ((KERNEL_VM_BASE - KERNEL_BASE) 22) #define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) /* Page tables for mapping kernel VM */ -#define KERNEL_PT_VMDATA_NUM 8 /* start with 32MB of KVM */ +#define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */ #define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; @@ -262,7 +265,8 @@ struct bootinfo *bootinfo; struct btinfo_howto *bi_howto; -#define BOOTINFO_PAGE (0xa020UL - PAGE_SIZE) +#define KERNEL_BASE_PHYS (PXA2X0_SDRAM0_START + KERNEL_TEXT_OFFSET) +#define BOOTINFO_PAGE (KERNEL_BASE_PHYS - PAGE_SIZE) /* Prototypes */ void consinit(void); @@ -576,8 +580,8 @@ if (virt) { /* XXX scoop1 registers are not page-aligned! */ - int ofs = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); - p = (volatile uint16_t *)(ZAURUS_SCOOP1_VBASE + ofs + SCOOP_GPWR); + int o = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); + p = (volatile uint16_t *)(ZAURUS_SCOOP1_VBASE + o + SCOOP_GPWR); } else { p = (volatile uint16_t *)(C3000_SCOOP1_BASE + SCOOP_GPWR); } @@ -585,33 +589,27 @@ *p = ~(1 SCOOP1_IR_ON); } -int hw_isc1000(int virt); -int hw_isc1000(int virt) +static int +hw_isc1000(void) { - u_long baseaddr; + /* XXX scoop1 registers are not page-aligned! */ + const u_long baseaddr = ZAURUS_SCOOP1_VBASE + + (C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE)); uint16_t mcr, cdr, csr, cpr, ccr, irr, irm, imr, isr; uint16_t gpcr, gpwr, gprr; - if (virt) { - /* XXX scoop1 registers are not page-aligned! */ - int ofs = C3000_SCOOP1_BASE - trunc_page(C3000_SCOOP1_BASE); - baseaddr = ZAURUS_SCOOP1_VBASE + ofs; - } else { - baseaddr = C3000_SCOOP1_BASE; - } - - mcr = *(volatile uint16_t *)(baseaddr + SCOOP_MCR); - cdr = *(volatile uint16_t *)(baseaddr + SCOOP_CDR); - csr = *(volatile uint16_t *)(baseaddr + SCOOP_CSR); - cpr = *(volatile uint16_t *)(baseaddr + SCOOP_CPR); - ccr = *(volatile uint16_t *)(baseaddr + SCOOP_CCR); - irr = *(volatile uint16_t *)(baseaddr + SCOOP_IRR); - irm = *(volatile uint16_t *)(baseaddr + SCOOP_IRM); - imr = *(volatile uint16_t *)(baseaddr + SCOOP_IMR); - isr = *(volatile uint16_t *)(baseaddr + SCOOP_ISR); - gpcr = *(volatile uint16_t *)(baseaddr + SCOOP_GPCR); - gpwr = *(volatile uint16_t *)(baseaddr + SCOOP_GPWR); - gprr = *(volatile uint16_t *)(baseaddr + SCOOP_GPRR); + mcr = ioreg16_read(baseaddr + SCOOP_MCR); + cdr = ioreg16_read(baseaddr + SCOOP_CDR); + csr = ioreg16_read(baseaddr + SCOOP_CSR); + cpr = ioreg16_read(baseaddr + SCOOP_CPR); + ccr = ioreg16_read(baseaddr + SCOOP_CCR); + irr = ioreg16_read(baseaddr + SCOOP_IRR); + irm = ioreg16_read(baseaddr + SCOOP_IRM); + imr = ioreg16_read(baseaddr + SCOOP_IMR); + isr = ioreg16_read(baseaddr + SCOOP_ISR); + gpcr = ioreg16_read(baseaddr + SCOOP_GPCR); + gpwr = ioreg16_read(baseaddr + SCOOP_GPWR); + gprr = ioreg16_read(baseaddr + SCOOP_GPRR); if (mcr == 0 cdr == 0 csr == 0 cpr == 0 ccr == 0 irr == 0 irm == 0 imr == 0 isr == 0 @@ -677,15 +675,15 @@ * Examine the boot args string for options we need to
CVS commit: src/sys/arch/hpc/stand/libsa
Module Name:src Committed By: nonaka Date: Thu Jun 23 11:38:24 UTC 2011 Modified Files: src/sys/arch/hpc/stand/libsa: winblk.c Log Message: Don't check DISK_INFO_FLAG_CHS_UNCERTAIN. Because DISK_INFO of SD on windows mobile 5 is reported it. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hpc/stand/libsa/winblk.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/hpc/stand/libsa/winblk.c diff -u src/sys/arch/hpc/stand/libsa/winblk.c:1.5 src/sys/arch/hpc/stand/libsa/winblk.c:1.6 --- src/sys/arch/hpc/stand/libsa/winblk.c:1.5 Wed Jan 25 18:28:26 2006 +++ src/sys/arch/hpc/stand/libsa/winblk.c Thu Jun 23 11:38:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: winblk.c,v 1.5 2006/01/25 18:28:26 christos Exp $ */ +/* $NetBSD: winblk.c,v 1.6 2011/06/23 11:38:24 nonaka Exp $ */ /*- * Copyright (c) 1999 Shin Takemura. @@ -193,7 +193,6 @@ #endif /* DEBUG */ if (!(ctx-di.di_flags DISK_INFO_FLAG_MBR) || - (ctx-di.di_flags DISK_INFO_FLAG_CHS_UNCERTAIN) || (ctx-di.di_flags DISK_INFO_FLAG_UNFORMATTED) || (ctx-di.di_bytes_per_sect != BLKSZ)) { win_printf(TEXT(invalid flags\n));
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Thu Jun 23 11:47:13 UTC 2011 Modified Files: src/external/gpl3/gcc/lib/crtstuff: Makefile src/external/gpl3/gcc/lib/libgcc: Makefile.inc src/external/gpl3/gcc/lib/libiberty: Makefile src/external/gpl3/gcc/lib/libobjc: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/backward: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/bits: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/debug: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/ext: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/tr1: Makefile src/external/gpl3/gcc/lib/libsupc++: Makefile.common src/external/gpl3/gcc/usr.bin: Makefile.inc Log Message: fix a bunch of paths to look in the right places for gcc 4.5. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/crtstuff/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libgcc/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libiberty/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libobjc/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/backward/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/debug/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/ext/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/tr1/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libsupc++/Makefile.common cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/crtstuff/Makefile diff -u src/external/gpl3/gcc/lib/crtstuff/Makefile:1.1 src/external/gpl3/gcc/lib/crtstuff/Makefile:1.2 --- src/external/gpl3/gcc/lib/crtstuff/Makefile:1.1 Tue Jun 21 06:02:25 2011 +++ src/external/gpl3/gcc/lib/crtstuff/Makefile Thu Jun 23 11:47:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 06:02:25 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/23 11:47:12 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -9,9 +9,9 @@ # supplied by that toolchain's run-time support. .if !defined(EXTERNAL_TOOLCHAIN) ${MKGCC} != no -DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4 +DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist GNUHOSTDIST= ${DIST} -GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH} +GCCARCH= ${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${MACHINE_ARCH} GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS} Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.1 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.2 --- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.1 Tue Jun 21 06:02:25 2011 +++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc Thu Jun 23 11:47:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2011/06/21 06:02:25 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.2 2011/06/23 11:47:12 mrg Exp $ .if ${MKGCC} != no .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk) @@ -8,11 +8,11 @@ UNSUPPORTED_COMPILER.clang= # defined -DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4 +DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist GNUHOSTDIST= ${DIST} -GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH} -GCCARCHLIBGCC= ${NETBSDSRCDIR}/gnu/lib/libgcc4/arch/${MACHINE_ARCH} -GCCARCHXX= ${NETBSDSRCDIR}/gnu/lib/libstdc++-v3_4/arch/${MACHINE_ARCH} +GCCARCH= ${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${MACHINE_ARCH} +GCCARCHLIBGCC= ${NETBSDSRCDIR}/external/gpl3/gcc/lib/libgcc/arch/${MACHINE_ARCH} +GCCARCHXX= ${NETBSDSRCDIR}/external/gpl3/gcc/lib/libstdc++-v3/arch/${MACHINE_ARCH} GCPPFLAGS= ${G_LIBGCC2_CFLAGS} ${G_USE_COLLECT2} ${G_INCLUDES} CPPFLAGS+= -I${.CURDIR} -I${GCCARCHLIBGCC} Index: src/external/gpl3/gcc/lib/libiberty/Makefile diff -u src/external/gpl3/gcc/lib/libiberty/Makefile:1.1 src/external/gpl3/gcc/lib/libiberty/Makefile:1.2 --- src/external/gpl3/gcc/lib/libiberty/Makefile:1.1 Tue Jun 21 06:02:27 2011 +++ src/external/gpl3/gcc/lib/libiberty/Makefile Thu Jun 23 11:47:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 06:02:27 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/23 11:47:12 mrg Exp $ LIBISPRIVATE= yes @@ -8,7 +8,7 @@ .include ${.CURDIR}/defs.mk -DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4 +DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist GNUHOSTDIST= ${DIST} SRCS= ${G_REQUIRED_OFILES:.o=.c} ${G_EXTRA_OFILES:.o=.c} \ Index: src/external/gpl3/gcc/lib/libobjc/Makefile diff -u
CVS commit: src/tools/gcc
Module Name:src Committed By: mrg Date: Thu Jun 23 12:06:32 UTC 2011 Modified Files: src/tools/gcc: mknative-gcc Log Message: output stuff to the right libiberty dir for gcc 4.5. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/tools/gcc/mknative-gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gcc/mknative-gcc diff -u src/tools/gcc/mknative-gcc:1.47 src/tools/gcc/mknative-gcc:1.48 --- src/tools/gcc/mknative-gcc:1.47 Thu Jun 23 05:42:37 2011 +++ src/tools/gcc/mknative-gcc Thu Jun 23 12:06:32 2011 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gcc,v 1.47 2011/06/23 05:42:37 mrg Exp $ +# $NetBSD: mknative-gcc,v 1.48 2011/06/23 12:06:32 mrg Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/gnu/dist/gcc. @@ -421,7 +421,7 @@ _libibertydir=usr.bin/$_subdir/libiberty ;; gcc) - _libibertydir=$_subdir/lib/libiberty + _libibertydir=lib/libiberty ;; esac mkdir -p $_OUTDIR/$_libibertydir/arch/$MACHINE_ARCH
CVS commit: src/sys/arch/i386/stand/boot
Module Name:src Committed By: mrg Date: Thu Jun 23 12:07:00 UTC 2011 Modified Files: src/sys/arch/i386/stand/boot: boot2.c Log Message: cast a uint8_t * to a char * for a function that takes char *. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/stand/boot/boot2.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/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.54 src/sys/arch/i386/stand/boot/boot2.c:1.55 --- src/sys/arch/i386/stand/boot/boot2.c:1.54 Thu May 26 04:25:27 2011 +++ src/sys/arch/i386/stand/boot/boot2.c Thu Jun 23 12:07:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: boot2.c,v 1.54 2011/05/26 04:25:27 uebayasi Exp $ */ +/* $NetBSD: boot2.c,v 1.55 2011/06/23 12:07:00 mrg Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -356,7 +356,7 @@ bootmenu(); /* does not return */ } else { /* DO ask for password */ - if (check_password(boot_params.bp_password)) { + if (check_password((char *)boot_params.bp_password)) { /* password ok */ printf(type \?\ or \help\ for help.\n); bootmenu(); /* does not return */
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: mrg Date: Thu Jun 23 12:09:30 UTC 2011 Modified Files: src/external/lgpl3/gmp/lib/libgmp: Makefile Added Files: src/external/lgpl3/gmp/lib/libgmp/arch/x86_64: Makefile.inc config.m4 gmp-mparam.h Log Message: make this build on amd64. XXX: need to confirm that all the objects are built but this is XXX: enough to make GCC happy. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/lgpl3/gmp/lib/libgmp/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc \ src/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.m4 \ src/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp-mparam.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/lgpl3/gmp/lib/libgmp/Makefile diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.1 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.2 --- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.1 Tue Jun 21 04:23:56 2011 +++ src/external/lgpl3/gmp/lib/libgmp/Makefile Thu Jun 23 12:09:30 2011 @@ -1,479 +1,300 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 04:23:56 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/23 12:09:30 mrg Exp $ .include bsd.init.mk -LIB= gmp +DIST=${.CURDIR}/../../dist + +# XXX +MKLINT=no -SRCS= \ - assert.c \ - compat.c \ - errno.c \ - extract-dbl.c \ - invalid.c \ - memory.c \ - mp_bpl.c \ - mp_clz_tab.c \ - mp_dv_tab.c \ - mp_minv_tab.c \ - mp_get_fns.c \ - mp_set_fns.c \ - rand.c \ - randclr.c \ - randdef.c \ - randiset.c \ - randlc2s.c \ - randlc2x.c \ - randmt.c \ - randmts.c \ - rands.c \ - randsd.c \ - randsdui.c \ - randbui.c \ - randmui.c \ - version.c \ - nextprime.c \ - tal-reent.c \ - init.c \ - init2.c \ - inits.c \ - set.c \ - set_ui.c \ - set_si.c \ - set_str.c \ - set_d.c \ - set_z.c \ - iset.c \ - iset_ui.c \ - iset_si.c \ - iset_str.c \ - iset_d.c \ - clear.c \ - clears.c \ - get_str.c \ - dump.c \ - size.c \ - eq.c \ - reldiff.c \ - sqrt.c \ - random2.c \ - inp_str.c \ - out_str.c \ - add.c \ - add_ui.c \ - sub.c \ - sub_ui.c \ - ui_sub.c \ - mul.c \ - mul_ui.c \ - div.c \ - div_ui.c \ - cmp.c \ - cmp_d.c \ - cmp_ui.c \ - cmp_si.c \ - mul_2exp.c \ - div_2exp.c \ - abs.c \ - neg.c \ - set_q.c \ - get_d.c \ - get_d_2exp.c \ - set_dfl_prec.c \ - set_prc.c \ - set_prc_raw.c \ - get_dfl_prec.c \ - get_prc.c \ - ui_div.c \ - sqrt_ui.c \ - ceilfloor.c \ - trunc.c \ - pow_ui.c \ - urandomb.c \ - swap.c \ - fits_sint.c \ - fits_slong.c \ - fits_sshort.c \ - fits_uint.c \ - fits_ulong.c \ - fits_ushort.c \ - get_si.c \ - get_ui.c \ - int_p.c \ - abs.c \ - add.c \ - add_ui.c \ - aorsmul.c \ - aorsmul_i.c \ - and.c \ - array_init.c \ - bin_ui.c \ - bin_uiui.c \ - cdiv_q.c \ - cdiv_q_ui.c \ - cdiv_qr.c \ - cdiv_qr_ui.c \ - cdiv_r.c \ - cdiv_r_ui.c \ - cdiv_ui.c \ - cfdiv_q_2exp.c \ - cfdiv_r_2exp.c \ - clear.c \ - clears.c \ - clrbit.c \ - cmp.c \ - cmp_d.c \ - cmp_si.c \ - cmp_ui.c \ - cmpabs.c \ - cmpabs_d.c \ - cmpabs_ui.c \ - com.c \ - combit.c \ - cong.c \ - cong_2exp.c \ - cong_ui.c \ - divexact.c \ - divegcd.c \ - dive_ui.c \ - divis.c \ - divis_ui.c \ - divis_2exp.c \ - dump.c \ - export.c \ - fac_ui.c \ - fdiv_q.c \ - fdiv_q_ui.c \ - fdiv_qr.c \ - fdiv_qr_ui.c \ - fdiv_r.c \ - fdiv_r_ui.c \ - fdiv_ui.c \ - fib_ui.c \ - fib2_ui.c \ - fits_sint.c \ - fits_slong.c \ - fits_sshort.c \ - fits_uint.c \ - fits_ulong.c \ - fits_ushort.c \ - gcd.c \ - gcd_ui.c \ - gcdext.c \ - get_d.c \ - get_d_2exp.c \ - get_si.c \ - get_str.c \ - get_ui.c \ - getlimbn.c \ - hamdist.c \ - import.c \ - init.c \ - init2.c \ - inits.c \ - inp_raw.c \ - inp_str.c \ - invert.c \ - ior.c \ - iset.c \ - iset_d.c \ - iset_si.c \ - iset_str.c \ - iset_ui.c \ - jacobi.c \ - kronsz.c \ - kronuz.c \ - kronzs.c \ - kronzu.c \ - lcm.c \ - lcm_ui.c \ - lucnum_ui.c \ - lucnum2_ui.c \ - millerrabin.c \ - mod.c \ - mul.c \ - mul_2exp.c \ - mul_si.c \ - mul_ui.c \ - n_pow_ui.c \ - neg.c \ - nextprime.c \ - out_raw.c \ - out_str.c \ - perfpow.c \ - perfsqr.c \ - popcount.c \ - pow_ui.c \ - powm.c \ - powm_sec.c \ - powm_ui.c \ - pprime_p.c \ - random.c \ - random2.c \ - realloc.c \ - realloc2.c \ - remove.c \ - root.c \ - rootrem.c \ - rrandomb.c \ - scan0.c \ - scan1.c \ - set.c \ - set_d.c \ - set_f.c \ - set_q.c \ - set_si.c \ - set_str.c \ - set_ui.c \ - setbit.c \ - size.c \ - sizeinbase.c \ - sqrt.c \ - sqrtrem.c \ - sub.c \ - sub_ui.c \ - swap.c \ - tdiv_ui.c \ - tdiv_q.c \ - tdiv_q_2exp.c \ - tdiv_q_ui.c \ - tdiv_qr.c \ - tdiv_qr_ui.c \ - tdiv_r.c \ - tdiv_r_2exp.c \ - tdiv_r_ui.c \ - tstbit.c \ - ui_pow_ui.c \ - ui_sub.c \ - urandomb.c \ - urandomm.c \ - xor.c \ - abs.c \ - aors.c \ - canonicalize.c \ - clear.c \ - clears.c \ - cmp.c \ - cmp_si.c \ - cmp_ui.c \ - div.c \ - get_d.c \ - get_den.c \ - get_num.c \ - get_str.c \ - init.c \ - inits.c \ - inp_str.c \ - inv.c \ - md_2exp.c \ - mul.c \ - neg.c \ - out_str.c \ - set.c \ - set_den.c \ - set_num.c \ -
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: mrg Date: Thu Jun 23 12:11:24 UTC 2011 Modified Files: src/external/gpl3/gcc/dist/gcc: Makefile.in Log Message: make this work with mknative-gcc: - libgcc.mvars only depends upon config.status/Makefile, not any built thing - copy the unwind.h creation rule into a separate target, just for mknative-gcc To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/Makefile.in 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/Makefile.in diff -u src/external/gpl3/gcc/dist/gcc/Makefile.in:1.3 src/external/gpl3/gcc/dist/gcc/Makefile.in:1.4 --- src/external/gpl3/gcc/dist/gcc/Makefile.in:1.3 Wed Jun 22 05:14:26 2011 +++ src/external/gpl3/gcc/dist/gcc/Makefile.in Thu Jun 23 12:11:24 2011 @@ -1823,8 +1823,7 @@ $(MACHMODE_H) $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \ $(LIB2ADD_ST) $(LIB2ADDEH) $(srcdir)/emutls.c gcov-iov.h $(SFP_MACHINE) -libgcc.mvars: config.status Makefile $(LIB2ADD) $(LIB2ADD_ST) specs \ - xgcc$(exeext) +libgcc.mvars: config.status Makefile : tmp-libgcc.mvars echo LIB1ASMFUNCS = '$(LIB1ASMFUNCS)' tmp-libgcc.mvars echo LIB1ASMSRC = '$(LIB1ASMSRC)' tmp-libgcc.mvars @@ -3822,6 +3821,12 @@ # s-* so that mostlyclean does not force the include directory to # be rebuilt. +unwind.h: $(UNWIND_H) + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi + rm -f include/unwind.h + cp $(UNWIND_H) include/unwind.h + chmod a+r include/unwind.h + # Build the include directories. stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fixinc_list # Copy in the headers provided with gcc.
CVS commit: src/sys/sys
Module Name:src Committed By: nonaka Date: Thu Jun 23 12:16:03 UTC 2011 Modified Files: src/sys/sys: cdefs.h Log Message: Added __packed define to be able to use eMbedded Visual C++ for building hpcboot.exe. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/sys/cdefs.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/cdefs.h diff -u src/sys/sys/cdefs.h:1.85 src/sys/sys/cdefs.h:1.86 --- src/sys/sys/cdefs.h:1.85 Thu Jun 16 13:51:26 2011 +++ src/sys/sys/cdefs.h Thu Jun 23 12:16:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.85 2011/06/16 13:51:26 joerg Exp $ */ +/* $NetBSD: cdefs.h,v 1.86 2011/06/23 12:16:03 nonaka Exp $ */ /* * Copyright (c) 1991, 1993 @@ -302,6 +302,8 @@ #define __packed _Pragma(packed 1) #define __aligned(x) _Pragma(aligned __STRING(x)) #define __section(x) _Pragma(section ## x) +#elif defined(_MSC_VER) +#define __packed /* ignore */ #else #define __packed error: no __packed for this compiler #define __aligned(x) error: no __aligned for this compiler
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: mrg Date: Thu Jun 23 12:16:36 UTC 2011 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3: Makefile src/external/gpl3/gcc/lib/libsupc++: Makefile Log Message: fix some more paths for GCC 4.5. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libsupc++/Makefile 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/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.1 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.2 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.1 Tue Jun 21 06:02:27 2011 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Thu Jun 23 12:16:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 06:02:27 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/23 12:16:36 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -8,7 +8,7 @@ LIB= stdc++ LDADD= -lgcc_s -LIBDPLIBS+= m ${.CURDIR}/../../../lib/libm +LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm CWARNFLAGS.clang+= -Wno-logical-op-parentheses \ -Wno-deprecated-writable-strings -Wno-parentheses @@ -24,7 +24,7 @@ INCS= c++config.h INCSDIR= /usr/include/g++ -.include ${.CURDIR}/../libsupc++4/Makefile.common +.include ${.CURDIR}/../libsupc++/Makefile.common SRCS= ${LIBMATHSRCS} ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS} # affects profiling; can't switch it off just for profiling easily. Index: src/external/gpl3/gcc/lib/libsupc++/Makefile diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile:1.1 src/external/gpl3/gcc/lib/libsupc++/Makefile:1.2 --- src/external/gpl3/gcc/lib/libsupc++/Makefile:1.1 Tue Jun 21 06:02:28 2011 +++ src/external/gpl3/gcc/lib/libsupc++/Makefile Thu Jun 23 12:16:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 06:02:28 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/23 12:16:36 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -11,13 +11,13 @@ LIB= supc++ -.if exists(${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH}/defs.mk) ${MKGCC} != no -.include ${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH}/defs.mk +.if exists(${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk) ${MKGCC} != no +.include ${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk SHLIB_MAJOR= 1 SHLIB_MINOR= 0 -.include ${.CURDIR}/../libsupc++4/Makefile.common +.include ${.CURDIR}/../libsupc++/Makefile.common SRCS= ${LIBSUPCXXSRCS} xmalloc.c CXXFLAGS+= ${G_SECTION_FLAGS} @@ -37,9 +37,9 @@ ${DIST}/libstdc++-v3/libmath \ ${DIST}/libstdc++-v3/libsupc++ \ ${DIST}/libiberty \ - ${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH} + ${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH} -${OBJS}: ${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH}/defs.mk +${OBJS}: ${.CURDIR}/../libstdc++-v3/arch/${MACHINE_ARCH}/defs.mk .else .include bsd.prog.mk # do nothing .endif
CVS commit: src/sys/arch/hpcarm/hpcarm
Module Name:src Committed By: nonaka Date: Thu Jun 23 12:38:02 UTC 2011 Modified Files: src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c Log Message: Delete unused define. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_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/hpcarm/hpcarm/pxa2x0_hpc_machdep.c diff -u src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.10 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.11 --- src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.10 Tue Jun 21 15:23:57 2011 +++ src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Thu Jun 23 12:38:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.10 2011/06/21 15:23:57 kiyohara Exp $ */ +/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.11 2011/06/23 12:38:02 nonaka Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pxa2x0_hpc_machdep.c,v 1.10 2011/06/21 15:23:57 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: pxa2x0_hpc_machdep.c,v 1.11 2011/06/23 12:38:02 nonaka Exp $); #include opt_ddb.h #include opt_dram_pages.h @@ -150,8 +150,7 @@ #define KERNEL_PT_VMEM 0 /* Page table for mapping video memory */ #define KERNEL_PT_SYS 1 /* Page table for mapping proc0 zero page */ -#define KERNEL_PT_IO 2 /* Page table for mapping IO */ -#define KERNEL_PT_KERNEL 3 /* Page table for mapping kernel */ +#define KERNEL_PT_KERNEL 2 /* Page table for mapping kernel */ #define KERNEL_PT_KERNEL_NUM 4 #define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) /* Page tables for mapping kernel VM */
CVS commit: src/sys/arch/hpcarm/hpcarm
Module Name:src Committed By: nonaka Date: Thu Jun 23 12:40:32 UTC 2011 Modified Files: src/sys/arch/hpcarm/hpcarm: wzero3_machdep.c Log Message: Remove noneed platid_match() in consinit(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hpcarm/hpcarm/wzero3_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/hpcarm/hpcarm/wzero3_machdep.c diff -u src/sys/arch/hpcarm/hpcarm/wzero3_machdep.c:1.1 src/sys/arch/hpcarm/hpcarm/wzero3_machdep.c:1.2 --- src/sys/arch/hpcarm/hpcarm/wzero3_machdep.c:1.1 Tue Jun 21 15:23:57 2011 +++ src/sys/arch/hpcarm/hpcarm/wzero3_machdep.c Thu Jun 23 12:40:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wzero3_machdep.c,v 1.1 2011/06/21 15:23:57 kiyohara Exp $ */ +/* $NetBSD: wzero3_machdep.c,v 1.2 2011/06/23 12:40:32 nonaka Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wzero3_machdep.c,v 1.1 2011/06/21 15:23:57 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: wzero3_machdep.c,v 1.2 2011/06/23 12:40:32 nonaka Exp $); #include sys/systm.h #include sys/param.h @@ -231,16 +231,9 @@ } else { #if (NLCD 0) #if NWZERO3LCD 0 - if (platid_match(platid,platid_mask_MACH_SHARP_WZERO3_WS003SH) - || platid_match(platid,platid_mask_MACH_SHARP_WZERO3_WS004SH) - || platid_match(platid,platid_mask_MACH_SHARP_WZERO3_WS007SH) - || platid_match(platid,platid_mask_MACH_SHARP_WZERO3_WS011SH) - || platid_match(platid,platid_mask_MACH_SHARP_WZERO3_WS020SH)) { - extern void wzero3lcd_cnattach(void); - - wzero3lcd_cnattach(); - return; - } + extern void wzero3lcd_cnattach(void); + wzero3lcd_cnattach(); + return; #endif #endif }
CVS commit: src/share/man/man7
Module Name:src Committed By: riz Date: Thu Jun 23 15:57:11 UTC 2011 Modified Files: src/share/man/man7: sysctl.7 Log Message: Attempt to improve the documentation of ddb.onpanic, from options(4). To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.62 src/share/man/man7/sysctl.7:1.63 --- src/share/man/man7/sysctl.7:1.62 Fri Mar 18 16:20:12 2011 +++ src/share/man/man7/sysctl.7 Thu Jun 23 15:57:11 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: sysctl.7,v 1.62 2011/03/18 16:20:12 jruoho Exp $ +.\ $NetBSD: sysctl.7,v 1.63 2011/06/23 15:57:11 riz Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -2198,7 +2198,12 @@ .It Li ddb.tabstops ( DDBCTL_TABSTOPS ) Tab width. .It Li ddb.onpanic ( DDBCTL_ONPANIC ) -If non-zero, DDB will be entered if the kernel panics. +If greater than zero, DDB will be entered if the kernel panics. +A value of 1 causes the system to enter DDB on panic, while a value of 2 +causes the kernel to attempt to print out a stack trace before entering DDB. +A value of 0 causes the kernel to attempt to print a stack trace, then +reboot, while a value of -1 means neither a stack trace will be printed +nor DDB entered. .It Li ddb.fromconsole ( DDBCTL_FROMCONSOLE ) If not zero, DDB may be entered by sending a break on a serial console or by a special key sequence on a graphics console.
CVS commit: src/share/man/man4
Module Name:src Committed By: riz Date: Thu Jun 23 16:02:20 UTC 2011 Modified Files: src/share/man/man4: ddb.4 Log Message: Document additional settings for onpanic, from options(4). To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/share/man/man4/ddb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ddb.4 diff -u src/share/man/man4/ddb.4:1.141 src/share/man/man4/ddb.4:1.142 --- src/share/man/man4/ddb.4:1.141 Thu Jun 10 18:34:21 2010 +++ src/share/man/man4/ddb.4 Thu Jun 23 16:02:20 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: ddb.4,v 1.141 2010/06/10 18:34:21 wiz Exp $ +.\ $NetBSD: ddb.4,v 1.142 2011/06/23 16:02:20 riz Exp $ .\ .\ Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -1204,14 +1204,21 @@ .Nm doesn't perform any wrapping. .It Va onpanic -If non-zero (the default), +If greater than zero (the default is 1), .Nm will be invoked when the kernel panics. If the kernel configuration option .D1 Cd options DDB_ONPANIC=0 is used, .Va onpanic -will be initialized to off. +will be initialized to off, causing a stack trace to be printed and +the system to be rebooted instead of +.Nm +being entered. +Other useful settings are -1, which suppresses the stack trace before +reboot, and 2, which causes a stack trace to be printed and +.Nm +to be entered. .It Va fromconsole If non-zero (the default), the kernel allows to enter
CVS commit: src/external/bsd/file/dist/src
Module Name:src Committed By: riz Date: Thu Jun 23 16:12:36 UTC 2011 Modified Files: src/external/bsd/file/dist/src: apprentice.c Log Message: Remove a noisy debugging printf that triggers on bigendian platforms. (Reported upstream as well) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/file/dist/src/apprentice.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/file/dist/src/apprentice.c diff -u src/external/bsd/file/dist/src/apprentice.c:1.3 src/external/bsd/file/dist/src/apprentice.c:1.4 --- src/external/bsd/file/dist/src/apprentice.c:1.3 Fri May 13 01:52:13 2011 +++ src/external/bsd/file/dist/src/apprentice.c Thu Jun 23 16:12:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: apprentice.c,v 1.3 2011/05/13 01:52:13 christos Exp $ */ +/* $NetBSD: apprentice.c,v 1.4 2011/06/23 16:12:36 riz Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. @@ -37,7 +37,7 @@ #if 0 FILE_RCSID(@(#)$File: apprentice.c,v 1.169 2011/05/10 17:08:13 christos Exp $) #else -__RCSID($NetBSD: apprentice.c,v 1.3 2011/05/13 01:52:13 christos Exp $); +__RCSID($NetBSD: apprentice.c,v 1.4 2011/06/23 16:12:36 riz Exp $); #endif #endif /* lint */ @@ -2472,8 +2472,6 @@ m-in_offset = swap4((uint32_t)m-in_offset); m-lineno = swap4((uint32_t)m-lineno); if (IS_STRING(m-type)) { - if (m-type == FILE_PSTRING) - printf(flags! %d\n, m-str_flags); m-str_range = swap4(m-str_range); m-str_flags = swap4(m-str_flags); }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: rmind Date: Thu Jun 23 16:25:09 UTC 2011 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: pmap_map_ptes: use cpu_load_pmap() to handle i386 PAE case. Spotted by cherry@ To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 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.124 src/sys/arch/x86/x86/pmap.c:1.125 --- src/sys/arch/x86/x86/pmap.c:1.124 Sat Jun 18 21:18:20 2011 +++ src/sys/arch/x86/x86/pmap.c Thu Jun 23 16:25:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.124 2011/06/18 21:18:20 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.125 2011/06/23 16:25:09 rmind Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.124 2011/06/18 21:18:20 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.125 2011/06/23 16:25:09 rmind Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -778,7 +778,7 @@ ci-ci_tlbstate = TLBSTATE_VALID; atomic_or_32(pmap-pm_cpus, cpumask); atomic_or_32(pmap-pm_kernel_cpus, cpumask); - lcr3(pmap_pdirpa(pmap, 0)); + cpu_load_pmap(pmap); } pmap-pm_ncsw = l-l_ncsw; *pmap2 = curpmap;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Jun 23 16:56:07 UTC 2011 Modified Files: src/sys/dev/acpi: TODO Log Message: Note some long-term difficult goals. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/TODO 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/TODO diff -u src/sys/dev/acpi/TODO:1.12 src/sys/dev/acpi/TODO:1.13 --- src/sys/dev/acpi/TODO:1.12 Sun Aug 8 16:58:42 2010 +++ src/sys/dev/acpi/TODO Thu Jun 23 16:56:07 2011 @@ -6,3 +6,35 @@ has a more detailed analysis. - sekiya, 21 December 2005 + +* The mismatch between the conventional and the ACPI device tree is the single + biggest architectural problem in the current stack. Various power management + features rely on the interaction between the firmware (ACPI) and the native + drivers. Examples include, but are not limited to, WoL, PCI power management, + and runtime power management (which involves GPEs on the ACPI side). + + Devices should not attach to acpi(4), but should still use ACPI to reserve + PCI, ISA, and other resources. This includes also buses such as I2C where + resource conflicts and other bus errors are widely known to exist. + + A satisfactory solution involves full or partial redesign of the x86 + autoconfiguration process. The current ad-hoc solutions used for instance + in acpi_pci.c are inefficient and ugly. + +* Related to previous, investigate how existing systems can interact with + the BIOS and ACPI. For instance, at the moment of writing this, IPMI is + already available via ACPI. In the future this may cause possible conflicts + between ipmi(4) and the firmware. + +* Not directly related to ACPI, but implement S4 a.k.a. suspend-to-disk. + +* Improve IA-64 ACPI support. Even if the architecture may be rare, + support for Itanium is a good way to ensure that the stack remains MI. + +* Implement the ACPI requirements for CPU hot-plug. + +* Support APEI (ACPI Platform Error Interface). + +* Support ACPI 4.0 devices. + +- jruoho, 23 June 2011
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Thu Jun 23 17:36:59 UTC 2011 Modified Files: src/sys/uvm: uvm_fault.c Log Message: uvmfault_anonget: clean-up, improve some comments, misc. To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/sys/uvm/uvm_fault.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.186 src/sys/uvm/uvm_fault.c:1.187 --- src/sys/uvm/uvm_fault.c:1.186 Sun Jun 12 03:36:02 2011 +++ src/sys/uvm/uvm_fault.c Thu Jun 23 17:36:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.186 2011/06/12 03:36:02 rmind Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.187 2011/06/23 17:36:59 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.186 2011/06/12 03:36:02 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.187 2011/06/23 17:36:59 rmind Exp $); #include opt_uvmhist.h @@ -255,58 +255,60 @@ * uvmfault_anonget: get data in an anon into a non-busy, non-released * page in that anon. * - * = maps, amap, and anon locked by caller. - * = if we fail (result != 0) we unlock everything. - * = if we are successful, we return with everything still locked. - * = we don't move the page on the queues [gets moved later] - * = if we allocate a new page [we_own], it gets put on the queues. - *either way, the result is that the page is on the queues at return time - * = for pages which are on loan from a uvm_object (and thus are not - *owned by the anon): if successful, we return with the owning object - *locked. the caller must unlock this object when it unlocks everything - *else. + * = Map, amap and thus anon should be locked by caller. + * = If we fail, we unlock everything and error is returned. + * = If we are successful, return with everything still locked. + * = We do not move the page on the queues [gets moved later]. If we + *allocate a new page [we_own], it gets put on the queues. Either way, + *the result is that the page is on the queues at return time + * = For pages which are on loan from a uvm_object (and thus are not owned + *by the anon): if successful, return with the owning object locked. + *The caller must unlock this object when it unlocks everything else. */ int uvmfault_anonget(struct uvm_faultinfo *ufi, struct vm_amap *amap, struct vm_anon *anon) { - bool we_own; /* we own anon's page? */ - bool locked; /* did we relock? */ struct vm_page *pg; int error; - UVMHIST_FUNC(uvmfault_anonget); UVMHIST_CALLED(maphist); + UVMHIST_FUNC(uvmfault_anonget); UVMHIST_CALLED(maphist); KASSERT(mutex_owned(anon-an_lock)); KASSERT(amap == NULL || anon-an_lock == amap-am_lock); - error = 0; + /* Increment the counters.*/ uvmexp.fltanget++; -/* bump rusage counters */ - if (anon-an_page) + if (anon-an_page) { curlwp-l_ru.ru_minflt++; - else + } else { curlwp-l_ru.ru_majflt++; + } + error = 0; /* - * loop until we get it, or fail. + * Loop until we get the anon data, or fail. */ for (;;) { - we_own = false; /* true if we set PG_BUSY on a page */ + bool we_own, locked; + /* + * Note: 'we_own' will become true if we set PG_BUSY on a page. + */ + we_own = false; pg = anon-an_page; /* - * if there is a resident page and it is loaned, then anon - * may not own it. call out to uvm_anon_lockpage() to ensure - * the real owner of the page has been identified and locked. + * If there is a resident page and it is loaned, then anon + * may not own it. Call out to uvm_anon_lockloanpg() to + * identify and lock the real owner of the page. */ if (pg pg-loan_count) pg = uvm_anon_lockloanpg(anon); /* - * page there? make sure it is not busy/released. + * Is page resident? Make sure it is not busy/released. */ if (pg) { @@ -320,42 +322,43 @@ if ((pg-flags PG_BUSY) == 0) { UVMHIST_LOG(maphist, - OK,0,0,0,0); -return (0); +return 0; } pg-flags |= PG_WANTED; uvmexp.fltpgwait++; /* - * the last unlock must be an atomic unlock+wait on - * the owner of page + * The last unlock must be an atomic unlock and wait + * on the owner of page. */ - if (pg-uobject) { /* owner is uobject ? */ + if (pg-uobject) { +/* Owner of page is UVM object. */ uvmfault_unlockall(ufi, amap, NULL); UVMHIST_LOG(maphist, unlock+wait on uobj,0, 0,0,0); UVM_UNLOCK_AND_WAIT(pg, pg-uobject-vmobjlock, -false, anonget1,0); +false, anonget1, 0); } else { -/* anon owns page */ +/* Owner of page is anon. */ uvmfault_unlockall(ufi, NULL, NULL); UVMHIST_LOG(maphist, unlock+wait on anon,0, 0,0,0); -UVM_UNLOCK_AND_WAIT(pg, anon-an_lock, 0, -
CVS commit: src/sys/dev/pci
Module Name:src Committed By: matt Date: Thu Jun 23 17:42:46 UTC 2011 Modified Files: src/sys/dev/pci: if_alc.c Log Message: When printing the interrupt string, be like the other driver and do alc0: interrupting at msi 1 instead of alc: msi 1. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_alc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_alc.c diff -u src/sys/dev/pci/if_alc.c:1.3 src/sys/dev/pci/if_alc.c:1.4 --- src/sys/dev/pci/if_alc.c:1.3 Fri Apr 8 13:56:51 2011 +++ src/sys/dev/pci/if_alc.c Thu Jun 23 17:42:46 2011 @@ -707,7 +707,7 @@ printf(\n); goto fail; } - aprint_normal_dev(self, %s\n, intrstr); + aprint_normal_dev(self, interrupting at %s\n, intrstr); /* Set PHY address. */ sc-alc_phyaddr = ALC_PHY_ADDR;
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Thu Jun 23 18:15:30 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: Clean-up, add asserts, slightly simplify. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/uvm/uvm_amap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.95 src/sys/uvm/uvm_amap.c:1.96 --- src/sys/uvm/uvm_amap.c:1.95 Sat Jun 18 21:13:29 2011 +++ src/sys/uvm/uvm_amap.c Thu Jun 23 18:15:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.95 2011/06/18 21:13:29 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.96 2011/06/23 18:15:30 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.95 2011/06/18 21:13:29 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.96 2011/06/23 18:15:30 rmind Exp $); #include opt_uvmhist.h @@ -164,7 +164,7 @@ * * = Note: lock is not set. */ -static inline struct vm_amap * +static struct vm_amap * amap_alloc1(int slots, int padslots, int flags) { const bool nowait = (flags UVM_FLAG_NOWAIT) != 0; @@ -763,34 +763,39 @@ amap_copy(struct vm_map *map, struct vm_map_entry *entry, int flags, vaddr_t startva, vaddr_t endva) { + const int waitf = (flags AMAP_COPY_NOWAIT) ? UVM_FLAG_NOWAIT : 0; struct vm_amap *amap, *srcamap; struct vm_anon *tofree; - int slots, lcv; - vaddr_t chunksize; - const int waitf = (flags AMAP_COPY_NOWAIT) ? UVM_FLAG_NOWAIT : 0; - const bool canchunk = (flags AMAP_COPY_NOCHUNK) == 0; kmutex_t *lock; + u_int slots, lcv; + vsize_t len; + UVMHIST_FUNC(amap_copy); UVMHIST_CALLED(maphist); UVMHIST_LOG(maphist, (map=%p, entry=%p, flags=%d), map, entry, flags, 0); KASSERT(map != kernel_map); /* we use nointr pool */ + srcamap = entry-aref.ar_amap; + len = entry-end - entry-start; + /* - * is there a map to copy? if not, create one from scratch. + * Is there an amap to copy? If not, create one. */ - if (entry-aref.ar_amap == NULL) { + if (srcamap == NULL) { + const bool canchunk = (flags AMAP_COPY_NOCHUNK) == 0; /* - * check to see if we have a large amap that we can - * chunk. we align startva/endva to chunk-sized + * Check to see if we have a large amap that we can + * chunk. We align startva/endva to chunk-sized * boundaries and then clip to them. */ - if (canchunk atop(entry-end - entry-start) = - UVM_AMAP_LARGE) { - /* convert slots to bytes */ + if (canchunk atop(len) = UVM_AMAP_LARGE) { + vsize_t chunksize; + + /* Convert slots to bytes. */ chunksize = UVM_AMAP_CHUNK PAGE_SHIFT; startva = (startva / chunksize) * chunksize; endva = roundup(endva, chunksize); @@ -798,9 +803,11 @@ to 0x%x-0x%x, entry-start, entry-end, startva, endva); UVM_MAP_CLIP_START(map, entry, startva, NULL); - /* watch out for endva wrap-around! */ - if (endva = startva) + + /* Watch out for endva wrap-around! */ + if (endva = startva) { UVM_MAP_CLIP_END(map, entry, endva, NULL); + } } if ((flags AMAP_COPY_NOMERGE) == 0 @@ -809,65 +816,66 @@ } UVMHIST_LOG(maphist, - done [creating new amap 0x%x-0x%x], - entry-start, entry-end, 0, 0); + entry-start, entry-end, 0, 0); + + /* Allocate an initialised amap and install it. */ entry-aref.ar_pageoff = 0; - entry-aref.ar_amap = amap_alloc(entry-end - entry-start, 0, - waitf); - if (entry-aref.ar_amap != NULL) + entry-aref.ar_amap = amap_alloc(len, 0, waitf); + if (entry-aref.ar_amap != NULL) { entry-etype = ~UVM_ET_NEEDSCOPY; + } return; } /* - * first check and see if we are the only map entry - * referencing the amap we currently have. if so, then we can - * just take it over rather than copying it. note that we are - * reading am_ref with the amap unlocked... the value can only - * be one if we have the only reference to the amap (via our - * locked map). if we are greater than one we fall through to - * the next case (where we double check the value). + * First check and see if we are the only map entry referencing + * he amap we currently have. If so, then just take it over instead + * of copying it. Note that we are reading am_ref without lock held + * as the value value can only be one if we have the only reference + * to the amap (via our locked map). If the value is greater than + * one, then allocate amap and re-check the value. */ - if (entry-aref.ar_amap-am_ref == 1) { + if (srcamap-am_ref == 1) { entry-etype = ~UVM_ET_NEEDSCOPY; UVMHIST_LOG(maphist, - done [ref cnt = 1, took it over], 0, 0, 0, 0); return; } + UVMHIST_LOG(maphist, amap=%p, ref=%d, must copy it, + srcamap, srcamap-am_ref, 0, 0); + /* - * looks like we need to copy the map. + * Allocate a new
CVS commit: src/sys
Module Name:src Committed By: matt Date: Thu Jun 23 20:46:16 UTC 2011 Modified Files: src/sys/arch/powerpc/include/booke: pte.h src/sys/common/pmap/tlb: pmap.c Log Message: Redo how the pte_*wire* inlines work. Now pmap.c makes no assuming about what type pt_entry_t. It can now be a scalar or a union/struct. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/booke/pte.h cvs rdiff -u -r1.7 -r1.8 src/sys/common/pmap/tlb/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/powerpc/include/booke/pte.h diff -u src/sys/arch/powerpc/include/booke/pte.h:1.4 src/sys/arch/powerpc/include/booke/pte.h:1.5 --- src/sys/arch/powerpc/include/booke/pte.h:1.4 Thu Jun 23 01:27:20 2011 +++ src/sys/arch/powerpc/include/booke/pte.h Thu Jun 23 20:46:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.4 2011/06/23 01:27:20 matt Exp $ */ +/* $NetBSD: pte.h,v 1.5 2011/06/23 20:46:15 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -162,9 +162,15 @@ } static inline pt_entry_t -pte_wired_entry(void) +pte_wire_entry(pt_entry_t pt_entry) { - return PTE_WIRED; + return pt_entry | PTE_WIRED; +} + +static inline pt_entry_t +pte_unwire_entry(pt_entry_t pt_entry) +{ + return pt_entry ~PTE_WIRED; } static inline pt_entry_t @@ -245,6 +251,7 @@ { pt_entry_t pt_entry = (pt_entry_t) pa PTE_RPN_MASK; + pt_entry |= PTE_WIRED; pt_entry |= pte_flag_bits(mdpg, flags); pt_entry |= pte_prot_bits(NULL, prot); /* pretend unmanaged */ Index: src/sys/common/pmap/tlb/pmap.c diff -u src/sys/common/pmap/tlb/pmap.c:1.7 src/sys/common/pmap/tlb/pmap.c:1.8 --- src/sys/common/pmap/tlb/pmap.c:1.7 Thu Jun 23 02:33:44 2011 +++ src/sys/common/pmap/tlb/pmap.c Thu Jun 23 20:46:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.7 2011/06/23 02:33:44 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.8 2011/06/23 20:46:15 matt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.7 2011/06/23 02:33:44 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.8 2011/06/23 20:46:15 matt Exp $); /* * Manages physical address maps. @@ -1007,7 +1007,7 @@ */ if (wired) { pmap-pm_stats.wired_count++; - npte |= pte_wired_entry(); + npte = pte_wire_entry(npte); } UVMHIST_LOG(*histp, new pte %#x (pa %#PRIxPADDR), npte, pa, 0,0); @@ -1094,8 +1094,7 @@ if ((flags PMAP_NOCACHE) == 0 !PMAP_PAGE_COLOROK_P(pa, va)) PMAP_COUNT(kenter_pa_bad); - const pt_entry_t npte = pte_make_kenter_pa(pa, mdpg, prot, flags) - | pte_wired_entry(); + const pt_entry_t npte = pte_make_kenter_pa(pa, mdpg, prot, flags); kpreempt_disable(); pt_entry_t * const ptep = pmap_pte_reserve(pmap_kernel(), va, 0); KASSERT(ptep != NULL); @@ -1220,7 +1219,7 @@ #endif if (pte_wired_p(pt_entry)) { - *ptep = ~pte_wired_entry(); + *ptep = pte_unwire_entry(*ptep); pmap-pm_stats.wired_count--; } #ifdef DIAGNOSTIC
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Jun 23 20:54:24 UTC 2011 Modified Files: src/share/man/man4: ddb.4 Log Message: Quote minus so it does not become a dash. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/share/man/man4/ddb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ddb.4 diff -u src/share/man/man4/ddb.4:1.142 src/share/man/man4/ddb.4:1.143 --- src/share/man/man4/ddb.4:1.142 Thu Jun 23 16:02:20 2011 +++ src/share/man/man4/ddb.4 Thu Jun 23 20:54:24 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: ddb.4,v 1.142 2011/06/23 16:02:20 riz Exp $ +.\ $NetBSD: ddb.4,v 1.143 2011/06/23 20:54:24 wiz Exp $ .\ .\ Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -297,7 +297,7 @@ If .Ar count is supplied, continues -.Pq Ar count Ns -1 +.Pq Ar count Ns \-1 times before stopping at the breakpoint. If the breakpoint is set, a breakpoint number is printed with .Sq \# . @@ -1215,7 +1215,7 @@ the system to be rebooted instead of .Nm being entered. -Other useful settings are -1, which suppresses the stack trace before +Other useful settings are \-1, which suppresses the stack trace before reboot, and 2, which causes a stack trace to be printed and .Nm to be entered.
CVS commit: src/sys
Module Name:src Committed By: matt Date: Thu Jun 23 23:42:44 UTC 2011 Modified Files: src/sys/conf: files src/sys/kern: exec_subr.c src/sys/uvm: uvm_mmap.c Log Message: Allow PAX_ASLR to be used by itself. To generate a diff of this commit: cvs rdiff -u -r1.1016 -r1.1017 src/sys/conf/files cvs rdiff -u -r1.68 -r1.69 src/sys/kern/exec_subr.c cvs rdiff -u -r1.136 -r1.137 src/sys/uvm/uvm_mmap.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/conf/files diff -u src/sys/conf/files:1.1016 src/sys/conf/files:1.1017 --- src/sys/conf/files:1.1016 Sat May 28 19:30:19 2011 +++ src/sys/conf/files Thu Jun 23 23:42:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1016 2011/05/28 19:30:19 matt Exp $ +# $NetBSD: files,v 1.1017 2011/06/23 23:42:43 matt Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20100430 @@ -1480,7 +1480,7 @@ file kern/kern_mutex_obj.c file kern/kern_fileassoc.c fileassoc file kern/kern_ntptime.c -file kern/kern_pax.c pax_mprotect | pax_segvguard +file kern/kern_pax.c pax_mprotect | pax_segvguard | pax_aslr file kern/kern_physio.c file kern/kern_pmf.c file kern/kern_proc.c Index: src/sys/kern/exec_subr.c diff -u src/sys/kern/exec_subr.c:1.68 src/sys/kern/exec_subr.c:1.69 --- src/sys/kern/exec_subr.c:1.68 Fri Mar 4 04:25:58 2011 +++ src/sys/kern/exec_subr.c Thu Jun 23 23:42:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_subr.c,v 1.68 2011/03/04 04:25:58 christos Exp $ */ +/* $NetBSD: exec_subr.c,v 1.69 2011/06/23 23:42:44 matt Exp $ */ /* * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.68 2011/03/04 04:25:58 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.69 2011/06/23 23:42:44 matt Exp $); #include opt_pax.h @@ -46,9 +46,9 @@ #include sys/resourcevar.h #include sys/device.h -#ifdef PAX_MPROTECT +#if defined(PAX_ASLR) || defined(PAX_MPROTECT) #include sys/pax.h -#endif /* PAX_MPROTECT */ +#endif /* PAX_ASLR || PAX_MPROTECT */ #include uvm/uvm_extern.h Index: src/sys/uvm/uvm_mmap.c diff -u src/sys/uvm/uvm_mmap.c:1.136 src/sys/uvm/uvm_mmap.c:1.137 --- src/sys/uvm/uvm_mmap.c:1.136 Sun Jun 12 03:36:03 2011 +++ src/sys/uvm/uvm_mmap.c Thu Jun 23 23:42:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_mmap.c,v 1.136 2011/06/12 03:36:03 rmind Exp $ */ +/* $NetBSD: uvm_mmap.c,v 1.137 2011/06/23 23:42:44 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -46,7 +46,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_mmap.c,v 1.136 2011/06/12 03:36:03 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_mmap.c,v 1.137 2011/06/23 23:42:44 matt Exp $); #include opt_compat_netbsd.h #include opt_pax.h @@ -67,9 +67,9 @@ #include sys/verified_exec.h #endif /* NVERIEXEC 0 */ -#ifdef PAX_MPROTECT +#if defined(PAX_ASLR) || defined(PAX_MPROTECT) #include sys/pax.h -#endif /* PAX_MPROTECT */ +#endif /* PAX_ASLR || PAX_MPROTECT */ #include miscfs/specfs/specdev.h
CVS commit: src/sys/arch/evbppc/conf
Module Name:src Committed By: matt Date: Fri Jun 24 00:48:47 UTC 2011 Modified Files: src/sys/arch/evbppc/conf: RB800 Log Message: Turn on PAX_ASLR To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/conf/RB800 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/evbppc/conf/RB800 diff -u src/sys/arch/evbppc/conf/RB800:1.9 src/sys/arch/evbppc/conf/RB800:1.10 --- src/sys/arch/evbppc/conf/RB800:1.9 Mon Jun 20 05:04:10 2011 +++ src/sys/arch/evbppc/conf/RB800 Fri Jun 24 00:48:46 2011 @@ -1,4 +1,4 @@ -# $NetBSD: RB800,v 1.9 2011/06/20 05:04:10 matt Exp $ +# $NetBSD: RB800,v 1.10 2011/06/24 00:48:46 matt Exp $ # # RB800 -- everything that's currently supported # @@ -7,7 +7,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident RB800-$Revision: 1.9 $ +ident RB800-$Revision: 1.10 $ maxusers 32 @@ -19,6 +19,8 @@ no options GUR_BASE options GUR_BASE=0xe000 +options PAX_ASLR=1 + #options INSECURE # disable kernel security levels #options NTP # NTP phase/frequency locked loop options KTRACE # system call tracing via ktrace(1)
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Fri Jun 24 01:03:09 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: amap_pp_adjref: fix regression, spotted by nonaka@. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/uvm/uvm_amap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.96 src/sys/uvm/uvm_amap.c:1.97 --- src/sys/uvm/uvm_amap.c:1.96 Thu Jun 23 18:15:30 2011 +++ src/sys/uvm/uvm_amap.c Fri Jun 24 01:03:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.96 2011/06/23 18:15:30 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.97 2011/06/24 01:03:08 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.96 2011/06/23 18:15:30 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.97 2011/06/24 01:03:08 rmind Exp $); #include opt_uvmhist.h @@ -1167,7 +1167,7 @@ } prevlcv = lcv; } - if (lcv) { + if (lcv == 0) { /* * Ensure that the prevref == ref test below always * fails, since we are starting from the beginning of
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Fri Jun 24 01:10:32 UTC 2011 Modified Files: src/usr.bin/xlint/lint1: decl.c lint1.h mem1.c Log Message: Always use our own align macro and explain a bit more why this is bogus. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.24 -r1.25 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.14 -r1.15 src/usr.bin/xlint/lint1/mem1.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/xlint/lint1/decl.c diff -u src/usr.bin/xlint/lint1/decl.c:1.52 src/usr.bin/xlint/lint1/decl.c:1.53 --- src/usr.bin/xlint/lint1/decl.c:1.52 Tue May 24 08:49:11 2011 +++ src/usr.bin/xlint/lint1/decl.c Thu Jun 23 21:10:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $ */ +/* $NetBSD: decl.c,v 1.53 2011/06/24 01:10:31 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(lint) -__RCSID($NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $); +__RCSID($NetBSD: decl.c,v 1.53 2011/06/24 01:10:31 christos Exp $); #endif #include sys/param.h @@ -926,15 +926,15 @@ } else if (t == FUNC) { /* compiler takes alignment of function */ error(14); - a = ALIGN(1) * CHAR_BIT; + a = WORST_ALIGN(1) * CHAR_BIT; } else { if ((a = size(t)) == 0) { a = CHAR_BIT; - } else if (a ALIGN(1) * CHAR_BIT) { - a = ALIGN(1) * CHAR_BIT; + } else if (a WORST_ALIGN(1) * CHAR_BIT) { + a = WORST_ALIGN(1) * CHAR_BIT; } } - if (a CHAR_BIT || a ALIGN(1) * CHAR_BIT) + if (a CHAR_BIT || a WORST_ALIGN(1) * CHAR_BIT) LERROR(getbound()); return (a); } Index: src/usr.bin/xlint/lint1/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.24 src/usr.bin/xlint/lint1/lint1.h:1.25 --- src/usr.bin/xlint/lint1/lint1.h:1.24 Fri Oct 2 15:01:14 2009 +++ src/usr.bin/xlint/lint1/lint1.h Thu Jun 23 21:10:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.24 2009/10/02 19:01:14 christos Exp $ */ +/* $NetBSD: lint1.h,v 1.25 2011/06/24 01:10:31 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,9 +35,19 @@ #include lint.h #include op.h -/* XXX - works for most systems, but the whole ALIGN thing needs to go away */ -#ifndef ALIGN -#define ALIGN(x) (((x) + 7) ~7) +/* + * XXX - Super conservative so that works for most systems, but we should + * not depend on the host settings but the target settings in determining + * the alignment. The only valid use for this is in mem1.c; uses in decl.c + * are bogus. + */ +#ifndef WORST_ALIGN +#ifdef _LP64 +# define AVAL 15 +#else +# define AVAL 7 +#endif +#define WORST_ALIGN(x) (((x) + AVAL) ~AVAL) #endif /* Index: src/usr.bin/xlint/lint1/mem1.c diff -u src/usr.bin/xlint/lint1/mem1.c:1.14 src/usr.bin/xlint/lint1/mem1.c:1.15 --- src/usr.bin/xlint/lint1/mem1.c:1.14 Sun Jan 16 22:04:10 2011 +++ src/usr.bin/xlint/lint1/mem1.c Thu Jun 23 21:10:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mem1.c,v 1.14 2011/01/17 03:04:10 christos Exp $ */ +/* $NetBSD: mem1.c,v 1.15 2011/06/24 01:10:31 christos Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(lint) -__RCSID($NetBSD: mem1.c,v 1.14 2011/01/17 03:04:10 christos Exp $); +__RCSID($NetBSD: mem1.c,v 1.15 2011/06/24 01:10:31 christos Exp $); #endif #include sys/types.h @@ -192,7 +192,7 @@ void *p; size_t t = 0; - s = ALIGN(s); + s = WORST_ALIGN(s); if ((mb = *mbp) == NULL || mb-nfree s) { if ((mb = frmblks) == NULL || mb-size s) { if (s mblklen) {
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Fri Jun 24 01:23:05 UTC 2011 Modified Files: src/sys/uvm: uvm_anon.c Log Message: uvm_anon_release: fix a locking error after the rmind-uvmplock merge To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/uvm/uvm_anon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_anon.c diff -u src/sys/uvm/uvm_anon.c:1.55 src/sys/uvm/uvm_anon.c:1.56 --- src/sys/uvm/uvm_anon.c:1.55 Fri Jun 17 02:12:35 2011 +++ src/sys/uvm/uvm_anon.c Fri Jun 24 01:23:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.c,v 1.55 2011/06/17 02:12:35 rmind Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.56 2011/06/24 01:23:05 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.55 2011/06/17 02:12:35 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.56 2011/06/24 01:23:05 yamt Exp $); #include opt_uvmhist.h @@ -404,8 +404,9 @@ uvm_anon_release(struct vm_anon *anon) { struct vm_page *pg = anon-an_page; + kmutex_t *lock = anon-an_lock; - KASSERT(mutex_owned(anon-an_lock)); + KASSERT(mutex_owned(lock)); KASSERT(pg != NULL); KASSERT((pg-flags PG_RELEASED) != 0); KASSERT((pg-flags PG_BUSY) != 0); @@ -417,9 +418,11 @@ mutex_enter(uvm_pageqlock); uvm_pagefree(pg); mutex_exit(uvm_pageqlock); - mutex_exit(anon-an_lock); KASSERT(anon-an_page == NULL); + mutex_obj_hold(lock); uvm_anfree(anon); + mutex_exit(lock); + mutex_obj_free(lock); }
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Fri Jun 24 01:39:22 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c uvm_anon.c uvm_anon.h uvm_fault.c Log Message: Fix uvmplock regression - a lock against oneself case in amap_swap_off(). Happens since amap is NULL in uvmfault_anonget(), so uvmfault_unlockall() keeps anon locked, when it should unlock it. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/uvm/uvm_amap.c cvs rdiff -u -r1.56 -r1.57 src/sys/uvm/uvm_anon.c cvs rdiff -u -r1.28 -r1.29 src/sys/uvm/uvm_anon.h cvs rdiff -u -r1.187 -r1.188 src/sys/uvm/uvm_fault.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.97 src/sys/uvm/uvm_amap.c:1.98 --- src/sys/uvm/uvm_amap.c:1.97 Fri Jun 24 01:03:08 2011 +++ src/sys/uvm/uvm_amap.c Fri Jun 24 01:39:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.97 2011/06/24 01:03:08 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.97 2011/06/24 01:03:08 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $); #include opt_uvmhist.h @@ -1358,7 +1358,7 @@ am-am_flags |= AMAP_SWAPOFF; - rv = uvm_anon_pagein(anon); + rv = uvm_anon_pagein(am, anon); amap_lock(am); am-am_flags = ~AMAP_SWAPOFF; Index: src/sys/uvm/uvm_anon.c diff -u src/sys/uvm/uvm_anon.c:1.56 src/sys/uvm/uvm_anon.c:1.57 --- src/sys/uvm/uvm_anon.c:1.56 Fri Jun 24 01:23:05 2011 +++ src/sys/uvm/uvm_anon.c Fri Jun 24 01:39:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.c,v 1.56 2011/06/24 01:23:05 yamt Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.57 2011/06/24 01:39:22 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.56 2011/06/24 01:23:05 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.57 2011/06/24 01:39:22 rmind Exp $); #include opt_uvmhist.h @@ -311,18 +311,19 @@ */ bool -uvm_anon_pagein(struct vm_anon *anon) +uvm_anon_pagein(struct vm_amap *amap, struct vm_anon *anon) { struct vm_page *pg; struct uvm_object *uobj; KASSERT(mutex_owned(anon-an_lock)); + KASSERT(anon-an_lock == amap-am_lock); /* * Get the page of the anon. */ - switch (uvmfault_anonget(NULL, NULL, anon)) { + switch (uvmfault_anonget(NULL, amap, anon)) { case 0: /* Success - we have the page. */ KASSERT(mutex_owned(anon-an_lock)); Index: src/sys/uvm/uvm_anon.h diff -u src/sys/uvm/uvm_anon.h:1.28 src/sys/uvm/uvm_anon.h:1.29 --- src/sys/uvm/uvm_anon.h:1.28 Sun Jun 12 03:36:02 2011 +++ src/sys/uvm/uvm_anon.h Fri Jun 24 01:39:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.h,v 1.28 2011/06/12 03:36:02 rmind Exp $ */ +/* $NetBSD: uvm_anon.h,v 1.29 2011/06/24 01:39:22 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -109,7 +109,7 @@ #define uvm_anon_dropswap(a) /* nothing */ #endif /* defined(VMSWAP) */ void uvm_anon_release(struct vm_anon *); -bool uvm_anon_pagein(struct vm_anon *); +bool uvm_anon_pagein(struct vm_amap *, struct vm_anon *); #endif /* _KERNEL */ #endif /* _UVM_UVM_ANON_H_ */ Index: src/sys/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.187 src/sys/uvm/uvm_fault.c:1.188 --- src/sys/uvm/uvm_fault.c:1.187 Thu Jun 23 17:36:59 2011 +++ src/sys/uvm/uvm_fault.c Fri Jun 24 01:39:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.187 2011/06/23 17:36:59 rmind Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.188 2011/06/24 01:39:22 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.187 2011/06/23 17:36:59 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.188 2011/06/24 01:39:22 rmind Exp $); #include opt_uvmhist.h @@ -275,7 +275,7 @@ UVMHIST_FUNC(uvmfault_anonget); UVMHIST_CALLED(maphist); KASSERT(mutex_owned(anon-an_lock)); - KASSERT(amap == NULL || anon-an_lock == amap-am_lock); + KASSERT(anon-an_lock == amap-am_lock); /* Increment the counters.*/ uvmexp.fltanget++;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: yamt Date: Fri Jun 24 01:39:41 UTC 2011 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: pmap_map_ptes: fix a bug introduced by rmind-uvmplock merge To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 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.125 src/sys/arch/x86/x86/pmap.c:1.126 --- src/sys/arch/x86/x86/pmap.c:1.125 Thu Jun 23 16:25:09 2011 +++ src/sys/arch/x86/x86/pmap.c Fri Jun 24 01:39:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.125 2011/06/23 16:25:09 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.126 2011/06/24 01:39:41 yamt Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.125 2011/06/23 16:25:09 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.126 2011/06/24 01:39:41 yamt Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -744,8 +744,8 @@ l = curlwp; retry: - ci = curcpu(); mutex_enter(pmap-pm_lock); + ci = curcpu(); curpmap = ci-ci_pmap; if (vm_map_pmap(l-l_proc-p_vmspace-vm_map) == pmap) { /* Our own pmap so just load it: easy. */
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Fri Jun 24 01:48:43 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: amap_copy: fix one more regression, thanks to enami@. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/uvm/uvm_amap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.98 src/sys/uvm/uvm_amap.c:1.99 --- src/sys/uvm/uvm_amap.c:1.98 Fri Jun 24 01:39:22 2011 +++ src/sys/uvm/uvm_amap.c Fri Jun 24 01:48:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.99 2011/06/24 01:48:43 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.99 2011/06/24 01:48:43 rmind Exp $); #include opt_uvmhist.h @@ -818,7 +818,11 @@ UVMHIST_LOG(maphist, - done [creating new amap 0x%x-0x%x], entry-start, entry-end, 0, 0); - /* Allocate an initialised amap and install it. */ + /* + * Allocate an initialised amap and install it. + * Note: we must update the length after clipping. + */ + len = entry-end - entry-start; entry-aref.ar_pageoff = 0; entry-aref.ar_amap = amap_alloc(len, 0, waitf); if (entry-aref.ar_amap != NULL) {
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: mrg Date: Fri Jun 24 05:25:24 UTC 2011 Modified Files: src/external/gpl3/gcc/usr.bin: Makefile Log Message: look in the right path for defs.mk. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/Makefile 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/usr.bin/Makefile diff -u src/external/gpl3/gcc/usr.bin/Makefile:1.1 src/external/gpl3/gcc/usr.bin/Makefile:1.2 --- src/external/gpl3/gcc/usr.bin/Makefile:1.1 Tue Jun 21 06:03:13 2011 +++ src/external/gpl3/gcc/usr.bin/Makefile Fri Jun 24 05:25:24 2011 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2011/06/21 06:03:13 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/24 05:25:24 mrg Exp $ NOOBJ=# defined .include bsd.own.mk -.if ${MKGCC} != no exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk) +.if ${MKGCC} != no exists(${.CURDIR}/gcc/arch/${MACHINE_ARCH}/defs.mk) # We keep libcpp here since it depends upon frontend.
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: mrg Date: Fri Jun 24 05:27:57 UTC 2011 Modified Files: src/external/gpl3/gcc/usr.bin: Makefile.inc Log Message: - fix the path for GCCARCH and GCCARCH - force DEVPHASE to release - To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/Makefile.inc diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.2 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.3 --- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.2 Thu Jun 23 11:47:13 2011 +++ src/external/gpl3/gcc/usr.bin/Makefile.inc Fri Jun 24 05:27:57 2011 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/06/23 11:47:13 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.3 2011/06/24 05:27:57 mrg Exp $ .include bsd.own.mk TOP= ${NETBSDSRCDIR} DIST= ${TOP}/external/gpl3/gcc/dist -GCCARCH= ${.CURDIR}/../arch/${MACHINE_ARCH} +GCCARCH= ${.CURDIR}/../gcc/arch/${MACHINE_ARCH} CPPFLAGS+= -DLOCALEDIR=\/usr/share/locale\ -DNETBSD_NATIVE HOST_CPPFLAGS+= -I${.CURDIR}/.. @@ -21,13 +21,15 @@ LIBIBERTYOBJ!= cd ${.CURDIR}/../../lib/libiberty ${PRINTOBJDIR} FRONTENDOBJ!= cd ${.CURDIR}/../frontend ${PRINTOBJDIR} BACKENDOBJ!= cd ${.CURDIR}/../backend ${PRINTOBJDIR} -LIBCPPOBJ!= cd ${.CURDIR}/../../lib/libcpp ${PRINTOBJDIR} +LIBCPPOBJ!= cd ${.CURDIR}/../libcpp ${PRINTOBJDIR} HOSTLIBIBERTYOBJ!= cd ${.CURDIR}/../host-libiberty ${PRINTOBJDIR} HOSTLIBIBERTY= ${HOSTLIBIBERTYOBJ}/libiberty/libiberty.a BASEVER!= cat ${GNUHOSTDIST}/gcc/BASE-VER -DEVPHASE!= cat ${GNUHOSTDIST}/gcc/DEV-PHASE +# XXX +#DEVPHASE!= cat ${GNUHOSTDIST}/gcc/DEV-PHASE +DEVPHASE=release DATESTAMP!= cat ${GNUHOSTDIST}/gcc/DATESTAMP BASEVERSTR= \$(BASEVER)\
CVS commit: src/external/gpl3/gcc/lib/libiberty
Module Name:src Committed By: mrg Date: Fri Jun 24 05:28:48 UTC 2011 Modified Files: src/external/gpl3/gcc/lib/libiberty: defs.mk Log Message: update this for GCC 4.5's libiberty. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libiberty/defs.mk 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/libiberty/defs.mk diff -u src/external/gpl3/gcc/lib/libiberty/defs.mk:1.1 src/external/gpl3/gcc/lib/libiberty/defs.mk:1.2 --- src/external/gpl3/gcc/lib/libiberty/defs.mk:1.1 Tue Jun 21 06:02:27 2011 +++ src/external/gpl3/gcc/lib/libiberty/defs.mk Fri Jun 24 05:28:48 2011 @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.45 2009/12/17 15:48:13 uebayasi Exp +# Generated from: NetBSD: mknative-gcc,v 1.46 2011/06/21 04:11:12 mrg Exp # Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp # G_ALLOCA= G_EXTRA_OFILES= G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o strncmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o alloca.o argv.o choose-temp.o concat.o cp-demint.o dyn-string.o fdmatch.o fibheap.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o sort.o spaces.o splay-tree.o strerror.o strsignal.o ternary.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o sort.o spaces.o splay-tree.o strerror.o strsignal.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o