Date: Wed, 12 Apr 2006 23:21:00 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95107 for review Message-ID: <200604122321.k3CNL063069867@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95107 Change 95107 by imp@imp_harmony on 2006/04/12 23:19:44 IFC @95102 Affected files ... .. //depot/projects/arm/src/sys/alpha/alpha/pmap.c#6 integrate .. //depot/projects/arm/src/sys/amd64/amd64/io_apic.c#7 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#8 integrate .. //depot/projects/arm/src/sys/amd64/conf/GENERIC#9 integrate .. //depot/projects/arm/src/sys/arm/arm/cpufunc.c#7 integrate .. //depot/projects/arm/src/sys/arm/arm/swtch.S#6 integrate .. //depot/projects/arm/src/sys/arm/arm/trap.c#9 integrate .. //depot/projects/arm/src/sys/arm/arm/undefined.c#8 integrate .. //depot/projects/arm/src/sys/arm/at91/at91.c#15 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_twi.c#14 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_usartreg.h#7 integrate .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#49 integrate .. //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#22 integrate .. //depot/projects/arm/src/sys/arm/include/pmap.h#7 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/uart_dev_sa1110.c#3 integrate .. //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_timer.c#5 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/README#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/arm_init.s#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/lib.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/linker.cfg#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/xmodem.c#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/xmodem.h#1 branch .. //depot/projects/arm/src/sys/boot/arm/at91/inc/AT91RM9200.h#1 branch .. //depot/projects/arm/src/sys/boot/i386/boot2/boot1.S#2 integrate .. //depot/projects/arm/src/sys/boot/i386/cdboot/cdboot.s#2 integrate .. //depot/projects/arm/src/sys/boot/i386/libi386/Makefile#5 integrate .. //depot/projects/arm/src/sys/boot/i386/libi386/gatea20.c#2 delete .. //depot/projects/arm/src/sys/boot/i386/libi386/libi386.h#5 integrate .. //depot/projects/arm/src/sys/boot/i386/pxeldr/pxeldr.S#2 integrate .. //depot/projects/arm/src/sys/boot/pc98/libpc98/Makefile#4 integrate .. //depot/projects/arm/src/sys/boot/pc98/libpc98/gatea20.c#3 delete .. //depot/projects/arm/src/sys/conf/files#24 integrate .. //depot/projects/arm/src/sys/conf/options#17 integrate .. //depot/projects/arm/src/sys/conf/options.arm#7 integrate .. //depot/projects/arm/src/sys/crypto/via/padlock.c#2 integrate .. //depot/projects/arm/src/sys/dev/aac/aac.c#4 integrate .. //depot/projects/arm/src/sys/dev/acpi_support/acpi_asus.c#4 integrate .. //depot/projects/arm/src/sys/dev/amr/amr.c#9 integrate .. //depot/projects/arm/src/sys/dev/amr/amr_pci.c#6 integrate .. //depot/projects/arm/src/sys/dev/amr/amrvar.h#5 integrate .. //depot/projects/arm/src/sys/dev/bce/if_bce.c#1 branch .. //depot/projects/arm/src/sys/dev/bce/if_bcefw.h#1 branch .. //depot/projects/arm/src/sys/dev/bce/if_bcereg.h#1 branch .. //depot/projects/arm/src/sys/dev/bge/if_bgereg.h#9 integrate .. //depot/projects/arm/src/sys/dev/drm/drm-preprocess.sh#3 integrate .. //depot/projects/arm/src/sys/dev/drm/drm.h#4 integrate .. //depot/projects/arm/src/sys/dev/drm/drm_agpsupport.c#4 integrate .. //depot/projects/arm/src/sys/dev/drm/drm_pciids.h#5 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_dma.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_drm.h#3 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_drv.h#3 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_irq.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/i915_mem.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/mga_drv.h#4 integrate .. //depot/projects/arm/src/sys/dev/drm/r300_cmdbuf.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/r300_reg.h#3 integrate .. //depot/projects/arm/src/sys/dev/drm/radeon_cp.c#4 integrate .. //depot/projects/arm/src/sys/dev/drm/radeon_drm.h#4 integrate .. //depot/projects/arm/src/sys/dev/drm/radeon_drv.h#4 integrate .. //depot/projects/arm/src/sys/dev/drm/radeon_state.c#6 integrate .. //depot/projects/arm/src/sys/dev/drm/savage_bci.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/savage_state.c#3 integrate .. //depot/projects/arm/src/sys/dev/drm/sis_ds.c#4 integrate .. //depot/projects/arm/src/sys/dev/drm/sis_ds.h#4 integrate .. //depot/projects/arm/src/sys/dev/drm/sis_mm.c#4 integrate .. //depot/projects/arm/src/sys/dev/em/LICENSE#2 integrate .. //depot/projects/arm/src/sys/dev/em/README#4 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#17 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.c#4 integrate .. //depot/projects/arm/src/sys/dev/em/if_em_hw.h#5 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_mod.c#8 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/arm/src/sys/dev/mii/brgphy.c#5 integrate .. //depot/projects/arm/src/sys/dev/mii/miidevs#4 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#9 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.h#8 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#10 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_pci.c#7 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_raid.c#4 integrate .. //depot/projects/arm/src/sys/dev/safe/safe.c#3 integrate .. //depot/projects/arm/src/sys/dev/ubsec/ubsec.c#3 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdevs#14 integrate .. //depot/projects/arm/src/sys/dev/usb/uscanner.c#4 integrate .. //depot/projects/arm/src/sys/fs/devfs/devfs.h#5 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.c#7 integrate .. //depot/projects/arm/src/sys/geom/geom.h#3 integrate .. //depot/projects/arm/src/sys/geom/geom_bsd.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_ccd.c#2 integrate .. //depot/projects/arm/src/sys/geom/geom_ctl.c#3 integrate .. //depot/projects/arm/src/sys/geom/geom_disk.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_gpt.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_slice.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_subr.c#4 integrate .. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#12 integrate .. //depot/projects/arm/src/sys/geom/mirror/g_mirror.h#8 integrate .. //depot/projects/arm/src/sys/geom/mirror/g_mirror_ctl.c#6 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#14 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.h#8 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3_ctl.c#6 integrate .. //depot/projects/arm/src/sys/i386/conf/GENERIC#8 integrate .. //depot/projects/arm/src/sys/i386/i386/io_apic.c#6 integrate .. //depot/projects/arm/src/sys/i386/i386/machdep.c#10 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#8 integrate .. //depot/projects/arm/src/sys/i386/isa/npx.c#5 integrate .. //depot/projects/arm/src/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/arm/src/sys/kern/kern_event.c#5 integrate .. //depot/projects/arm/src/sys/kern/kern_exit.c#15 integrate .. //depot/projects/arm/src/sys/kern/kern_shutdown.c#4 integrate .. //depot/projects/arm/src/sys/kern/subr_witness.c#8 integrate .. //depot/projects/arm/src/sys/kern/uipc_proto.c#3 integrate .. //depot/projects/arm/src/sys/modules/bce/Makefile#1 branch .. //depot/projects/arm/src/sys/net/if_arc.h#3 integrate .. //depot/projects/arm/src/sys/net/if_arcsubr.c#4 integrate .. //depot/projects/arm/src/sys/net/raw_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netgraph/ng_socket.c#4 integrate .. //depot/projects/arm/src/sys/netinet/tcp_input.c#10 integrate .. //depot/projects/arm/src/sys/netinet/tcp_sack.c#8 integrate .. //depot/projects/arm/src/sys/netinet6/frag6.c#2 integrate .. //depot/projects/arm/src/sys/netinet6/in6_pcb.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/ip6_mroute.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/raw_ip6.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/udp6_output.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec.c#5 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec.h#3 integrate .. //depot/projects/arm/src/sys/netipsec/xform_ah.c#4 integrate .. //depot/projects/arm/src/sys/netipsec/xform_esp.c#5 integrate .. //depot/projects/arm/src/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netnatm/natm.c#5 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_bio.c#5 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_vnops.c#8 integrate .. //depot/projects/arm/src/sys/nfsclient/nfsnode.h#3 integrate .. //depot/projects/arm/src/sys/nfsserver/nfs_srvsock.c#6 integrate .. //depot/projects/arm/src/sys/opencrypto/crypto.c#3 integrate .. //depot/projects/arm/src/sys/opencrypto/cryptosoft.c#4 integrate .. //depot/projects/arm/src/sys/posix4/ksched.c#2 integrate .. //depot/projects/arm/src/sys/posix4/p1003_1b.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/conf/GENERIC#6 integrate .. //depot/projects/arm/src/sys/security/mac/mac_vfs.c#3 integrate .. //depot/projects/arm/src/sys/sys/filedesc.h#3 integrate .. //depot/projects/arm/src/sys/sys/mac.h#3 integrate .. //depot/projects/arm/src/sys/sys/mac_policy.h#3 integrate .. //depot/projects/arm/src/sys/vm/swap_pager.c#5 integrate .. //depot/projects/arm/src/sys/vm/swap_pager.h#2 integrate Differences ... ==== //depot/projects/arm/src/sys/alpha/alpha/pmap.c#6 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.189 2006/04/12 04:22:50 alc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -696,22 +696,7 @@ * Low level helper routines..... ***************************************************/ - - /* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - -/* * Routine: pmap_extract * Function: * Extract the physical page address associated @@ -1346,10 +1331,8 @@ ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1449,10 +1432,8 @@ pmap->pm_stats.resident_count -= 1; if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); - if ((oldpte & PG_FOW) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } + if ((oldpte & PG_FOW) == 0) + vm_page_dirty(m); if ((oldpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); return pmap_remove_entry(pmap, m, va); @@ -1581,10 +1562,8 @@ /* * Update the vm_page_t clean and reference bits. */ - if ((tpte & PG_FOW) == 0) { - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); - } + if ((tpte & PG_FOW) == 0) + vm_page_dirty(m); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); @@ -1666,8 +1645,7 @@ if ((oldpte & PG_FOW) == 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte)); - if (pmap_track_modified(sva)) - vm_page_dirty(m); + vm_page_dirty(m); oldpte |= PG_FOW; } oldpte = (oldpte & ~PG_PROT) | newprot; @@ -1763,8 +1741,7 @@ * so we go ahead and sense modify status. */ if (origpte & PG_MANAGED) { - if ((origpte & PG_FOW) != PG_FOW - && pmap_track_modified(va)) + if ((origpte & PG_FOW) != PG_FOW) vm_page_dirty(m); } @@ -1788,6 +1765,8 @@ * called at interrupt time. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, mpte, m); managed |= PG_MANAGED; } @@ -1850,6 +1829,9 @@ register pt_entry_t *pte; int managed; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2168,8 +2150,7 @@ pmap->pm_stats.resident_count--; if ((tpte & PG_FOW) == 0) - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); npv = TAILQ_NEXT(pv, pv_plist); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); @@ -2209,14 +2190,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (!setem && bit == (PG_UWE|PG_KWE)) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - PMAP_LOCK(pv->pv_pmap); pte = pmap_lev3pte(pv->pv_pmap, pv->pv_va); ==== //depot/projects/arm/src/sys/amd64/amd64/io_apic.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.23 2006/03/20 19:39:07 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.24 2006/04/05 20:43:19 jhb Exp $"); #include "opt_atpic.h" #include "opt_isa.h" @@ -89,6 +89,7 @@ u_int io_edgetrigger:1; u_int io_masked:1; int io_bus:4; + uint32_t io_lowreg; }; struct ioapic { @@ -207,9 +208,7 @@ mtx_lock_spin(&icu_lock); if (intpin->io_masked) { - flags = ioapic_read(io->io_addr, - IOAPIC_REDTBL_LO(intpin->io_intpin)); - flags &= ~(IOART_INTMASK); + flags = intpin->io_lowreg & ~IOART_INTMASK; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), flags); intpin->io_masked = 0; @@ -226,9 +225,7 @@ mtx_lock_spin(&icu_lock); if (!intpin->io_masked && !intpin->io_edgetrigger) { - flags = ioapic_read(io->io_addr, - IOAPIC_REDTBL_LO(intpin->io_intpin)); - flags |= IOART_INTMSET; + flags = intpin->io_lowreg | IOART_INTMSET; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), flags); intpin->io_masked = 1; @@ -313,6 +310,7 @@ /* Write the values to the APIC. */ mtx_lock_spin(&icu_lock); + intpin->io_lowreg = low; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low); value = ioapic_read(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin)); value &= ~IOART_DEST; ==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#8 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.543 2006/04/04 20:17:35 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.544 2006/04/12 04:22:50 alc Exp $"); /* * Manages physical address maps. @@ -619,20 +619,6 @@ * Low level helper routines..... ***************************************************/ - -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static PMAP_INLINE int -pmap_track_modified(vm_offset_t va) -{ - if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) - return 1; - else - return 0; -} - #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -1532,8 +1518,7 @@ KASSERT((tpte & PG_RW), ("pmap_collect: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -1751,8 +1736,7 @@ KASSERT((oldpte & PG_RW), ("pmap_remove_pte: modified page not writable: va: %#lx, pte: %#lx", va, oldpte)); - if (pmap_track_modified(va)) - vm_page_dirty(m); + vm_page_dirty(m); } if (oldpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1940,8 +1924,7 @@ KASSERT((tpte & PG_RW), ("pmap_remove_all: modified page not writable: va: %#lx, pte: %#lx", pv->pv_va, tpte)); - if (pmap_track_modified(pv->pv_va)) - vm_page_dirty(m); + vm_page_dirty(m); } pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -2030,8 +2013,7 @@ vm_page_flag_set(m, PG_REFERENCED); pbits &= ~PG_A; } - if ((pbits & PG_M) != 0 && - pmap_track_modified(sva)) { + if ((pbits & PG_M) != 0) { if (m == NULL) m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); @@ -2182,6 +2164,8 @@ * Enter on the PV list if part of our managed memory. */ if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); pmap_insert_entry(pmap, va, m); pa |= PG_MANAGED; } @@ -2227,8 +2211,7 @@ KASSERT((origpte & PG_RW), ("pmap_enter: modified page not writable: va: %#lx, pte: %#lx", va, origpte)); - if ((origpte & PG_MANAGED) && - pmap_track_modified(va)) + if ((origpte & PG_MANAGED) != 0) vm_page_dirty(om); if ((newpte & PG_RW) == 0) invlva = TRUE; @@ -2258,6 +2241,9 @@ pt_entry_t *pte; vm_paddr_t pa; + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, + ("pmap_enter_quick: managed mapping within the clean submap")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); PMAP_LOCK(pmap); @@ -2836,13 +2822,6 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * if the bit being tested is the modified bit, then - * mark clean_map and ptes as never - * modified. - */ - if (!pmap_track_modified(pv->pv_va)) - continue; pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2898,14 +2877,6 @@ * setting RO do we need to clear the VAC? */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - /* - * don't write protect pager mappings - */ - if (bit == PG_RW) { - if (!pmap_track_modified(pv->pv_va)) - continue; - } - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); @@ -2983,9 +2954,6 @@ TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - if (!pmap_track_modified(pv->pv_va)) - continue; - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); ==== //depot/projects/arm/src/sys/amd64/conf/GENERIC#9 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.451 2006/03/31 23:04:48 emax Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.452 2006/04/10 20:04:22 ps Exp $ cpu HAMMER ident GENERIC @@ -192,6 +192,7 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support +device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes ==== //depot/projects/arm/src/sys/arm/arm/cpufunc.c#7 (text+ko) ==== @@ -45,7 +45,7 @@ * Created : 30/01/97 */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.9 2005/05/25 13:46:32 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.10 2006/04/09 23:07:31 cognet Exp $"); #include <sys/cdefs.h> ==== //depot/projects/arm/src/sys/arm/arm/swtch.S#6 (text+ko) ==== @@ -83,7 +83,7 @@ #include <machine/asm.h> #include <machine/asmacros.h> #include <machine/armreg.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.18 2005/10/04 20:47:27 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.19 2006/04/09 20:16:47 cognet Exp $"); /* @@ -467,7 +467,7 @@ bl _C_LABEL(fork_exit) /* Kill irq"s */ mrs r0, cpsr - orr r0, r0, #(I32_bit) + orr r0, r0, #(I32_bit|F32_bit) msr cpsr_c, r0 DO_AST PULLFRAME ==== //depot/projects/arm/src/sys/arm/arm/trap.c#9 (text+ko) ==== @@ -82,7 +82,7 @@ #include "opt_ktrace.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.23 2006/03/01 20:43:51 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.24 2006/04/09 20:16:47 cognet Exp $"); #include <sys/types.h> @@ -271,9 +271,13 @@ /* Grab the current pcb */ pcb = td->td_pcb; /* Re-enable interrupts if they were enabled previously */ - if (td->td_md.md_spinlock_count == 0 && - __predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); + if (td->td_md.md_spinlock_count == 0) { + if (__predict_true(tf->tf_spsr & I32_bit) == 0) + enable_interrupts(I32_bit); + if (__predict_true(tf->tf_spsr & F32_bit) == 0) + enable_interrupts(F32_bit); + } + /* Invoke the appropriate handler, if necessary */ if (__predict_false(data_aborts[fsr & FAULT_TYPE_MASK].func != NULL)) { @@ -487,6 +491,7 @@ mode = TRAP_USERMODE(tf) ? "user" : "kernel"; + disable_interrupts(I32_bit|F32_bit); if (td != NULL) { printf("Fatal %s mode data abort: '%s'\n", mode, data_aborts[fsr & FAULT_TYPE_MASK].desc); @@ -730,9 +735,13 @@ thread_user_enter(td); } fault_pc = tf->tf_pc; - if (td->td_md.md_spinlock_count == 0 && - __predict_true((tf->tf_spsr & I32_bit) == 0)) - enable_interrupts(I32_bit); + if (td->td_md.md_spinlock_count == 0) { + if (__predict_true(tf->tf_spsr & I32_bit) == 0) + enable_interrupts(I32_bit); + if (__predict_true(tf->tf_spsr & F32_bit) == 0) + enable_interrupts(F32_bit); + } + /* See if the cpu state needs to be fixed up */ @@ -1012,9 +1021,13 @@ * Since all syscalls *should* come from user mode it will always * be safe to enable them, but check anyway. */ - if (td->td_md.md_spinlock_count == 0 && !(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit); - + if (td->td_md.md_spinlock_count == 0) { + if (__predict_true(frame->tf_spsr & I32_bit) == 0) + enable_interrupts(I32_bit); + if (__predict_true(frame->tf_spsr & F32_bit) == 0) + enable_interrupts(F32_bit); + } + syscall(td, frame, insn); } ==== //depot/projects/arm/src/sys/arm/arm/undefined.c#8 (text+ko) ==== @@ -48,7 +48,7 @@ #include "opt_ddb.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.12 2006/03/01 18:33:45 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.13 2006/04/09 20:16:47 cognet Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -189,7 +189,7 @@ /* Enable interrupts if they were enabled before the exception. */ if (!(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit); + enable_interrupts(I32_bit|F32_bit); frame->tf_pc -= INSN_SIZE; PCPU_LAZY_INC(cnt.v_trap); ==== //depot/projects/arm/src/sys/arm/at91/at91.c#15 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.3 2006/03/18 01:35:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.4 2006/04/06 04:32:29 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/at91/at91_twi.c#14 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_twi.c,v 1.1 2006/02/04 23:32:13 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_twi.c,v 1.2 2006/04/06 04:31:19 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/at91/at91_usartreg.h#7 (text+ko) ==== @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/arm/at91/at91_usartreg.h,v 1.1 2006/02/04 23:32:13 imp Exp $ */ +/* $FreeBSD: src/sys/arm/at91/at91_usartreg.h,v 1.2 2006/04/06 04:29:24 imp Exp $ */ #ifndef AT91USARTREG_H_ #define AT91USARTREG_H_ ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#49 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.5 2006/03/18 01:43:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.6 2006/04/06 04:30:23 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#22 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.3 2006/03/22 21:16:09 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.5 2006/04/06 20:47:54 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/include/pmap.h#7 (text+ko) ==== @@ -44,7 +44,7 @@ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 * - * $FreeBSD: src/sys/arm/include/pmap.h,v 1.15 2006/03/01 23:04:25 cognet Exp $ + * $FreeBSD: src/sys/arm/include/pmap.h,v 1.16 2006/04/09 20:03:03 cognet Exp $ */ #ifndef _MACHINE_PMAP_H_ ==== //depot/projects/arm/src/sys/arm/sa11x0/uart_dev_sa1110.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_dev_sa1110.c,v 1.2 2005/01/05 21:58:48 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_dev_sa1110.c,v 1.3 2006/04/06 20:47:54 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_timer.c#5 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_timer.c,v 1.9 2005/12/22 22:16:06 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_timer.c,v 1.10 2006/04/06 17:11:08 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -76,6 +76,11 @@ static uint32_t counts_per_hz; +#ifdef XSCALE_DISABLE_CCNT +static uint32_t offset; +static uint32_t last = -1; +#endif + static int ticked = 0; #ifndef COUNTS_PER_SEC @@ -88,7 +93,11 @@ i80321_timer_get_timecount, /* get_timecount */ NULL, /* no poll_pps */ ~0u, /* counter_mask */ +#ifdef XSCALE_DISABLE_CCNT + COUNTS_PER_SEC, +#else COUNTS_PER_SEC * 3, /* frequency */ +#endif "i80321 timer", /* name */ 1000 /* quality */ }; @@ -241,11 +250,26 @@ static unsigned i80321_timer_get_timecount(struct timecounter *tc) { +#ifdef XSCALE_DISABLE_CCNT + uint32_t cur = tcr0_read(); + + if (cur > last && last != -1) { + offset += counts_per_hz; + if (ticked > 0) + ticked--; + } + if (ticked) { + offset += ticked * counts_per_hz; + ticked = 0; + } + return (counts_per_hz - cur + offset); +#else uint32_t ret; __asm __volatile("mrc p14, 0, %0, c1, c0, 0\n" : "=r" (ret)); return (ret); +#endif } /* @@ -327,12 +351,14 @@ tc_init(&i80321_timer_timecounter); restore_interrupts(oldirqstate); rid = 0; +#ifndef XSCALE_DISABLE_CCNT /* Enable the clock count register. */ __asm __volatile("mrc p14, 0, %0, c0, c0, 0\n" : "=r" (rid)); rid &= ~(1 << 3); rid |= (1 << 2) | 1; __asm __volatile("mcr p14, 0, %0, c0, c0, 0\n" : : "r" (rid)); +#endif } ==== //depot/projects/arm/src/sys/boot/i386/boot2/boot1.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.30 2004/08/28 08:32:23 yar Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.31 2006/04/11 20:09:42 jhb Exp $ */ /* Memory Locations */ @@ -212,8 +212,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 -seta20.3: - sti # Enable interrupts +seta20.3: sti # Enable interrupts jmp start+MEM_JMP-MEM_ORG # Start BTX ==== //depot/projects/arm/src/sys/boot/i386/cdboot/cdboot.s#2 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.13 2004/06/22 21:55:22 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.16 2006/04/11 17:36:08 jhb Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -400,7 +400,7 @@ ff.checkname: lea DIR_NAME(%bx),%di # Address name in record push %si # Save repe cmpsb # Compare name - jcxz ff.match # We have a winner! + je ff.match # We have a winner! pop %si # Restore jmp ff.nextrec # Keep looking. ff.match: add $2,%sp # Discard saved %si @@ -485,10 +485,17 @@ ret # -# Enable A20 +# Enable A20. Put an upper limit on the amount of time we wait for the +# keyboard controller to get ready (65K x ISA access time). If +# we wait more than that amount, the hardware is probably +# legacy-free and simply doesn't have a keyboard controller. +# Thus, the A20 line is already enabled. # seta20: cli # Disable interrupts -seta20.1: in $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + in $0x64,%al # Get status test $0x2,%al # Busy? jnz seta20.1 # Yes mov $0xd1,%al # Command: Write @@ -498,7 +505,7 @@ jnz seta20.2 # Yes mov $0xdf,%al # Enable out %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts ret # To caller # ==== //depot/projects/arm/src/sys/boot/i386/libi386/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.41 2006/03/14 19:02:00 jkim Exp $ +# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.42 2006/04/11 20:11:30 jhb Exp $ # LIB= i386 INTERNALLIB= @@ -6,7 +6,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c gatea20.c \ + elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S ==== //depot/projects/arm/src/sys/boot/i386/libi386/libi386.h#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.24 2006/03/09 22:49:44 jkim Exp $ + * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.25 2006/04/11 20:11:30 jhb Exp $ */ @@ -104,8 +104,6 @@ void smbios_detect(void); -void gateA20(void); - int i386_autoload(void); int bi_getboothowto(char *kargs); ==== //depot/projects/arm/src/sys/boot/i386/pxeldr/pxeldr.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.13 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.14 2006/04/11 20:53:49 sobomax Exp $ */ /* @@ -227,10 +227,17 @@ jmp putstr # keep looping /* - * Enable A20 + * Enable A20. Put an upper limit on the amount of time we wait for the + * keyboard controller to get ready (65K x ISA access time). If + * we wait more than that amount, the hardware is probably + * legacy-free and simply doesn't have a keyboard controller. + * Thus, the A20 line is already enabled. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status + xor %cx,%cx # Clear +seta20.1: inc %cx # Increment, overflow? + jz seta20.3 # Yes + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -240,7 +247,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts retw # To caller /* ==== //depot/projects/arm/src/sys/boot/pc98/libpc98/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.23 2005/12/20 08:54:30 sobomax Exp $ +# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.24 2006/04/11 20:11:30 jhb Exp $ # LIB= pc98 INTERNALLIB= @@ -7,7 +7,7 @@ SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 ==== //depot/projects/arm/src/sys/conf/files#24 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1107 2006/03/30 21:39:36 marcel Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1108 2006/04/10 20:04:21 ps Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -475,6 +475,7 @@ dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard +dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bktr/bktr_audio.c optional bktr pci ==== //depot/projects/arm/src/sys/conf/options#17 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.533 2006/04/03 18:14:01 sam Exp $ +# $FreeBSD: src/sys/conf/options,v 1.534 2006/04/10 20:04:21 ps Exp $ # # On the handling of kernel options # @@ -636,6 +636,9 @@ ED_3C503 opt_ed.h ED_SIC opt_ed.h +# bce driver +BCE_DEBUG opt_bce.h + # bge driver BGE_FAKE_AUTONEG opt_bge.h >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604122321.k3CNL063069867>