PERFORCE change 93481 for review
Warner Losh
imp at FreeBSD.org
Sat Mar 18 00:55:07 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=93481
Change 93481 by imp at imp_harmony on 2006/03/18 00:54:05
IFC @93479
Affected files ...
.. //depot/projects/arm/src/sys/Makefile#5 integrate
.. //depot/projects/arm/src/sys/alpha/alpha/clock.c#6 integrate
.. //depot/projects/arm/src/sys/alpha/include/pcpu.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/apic_vector.S#6 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/db_trace.c#6 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/io_apic.c#5 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/machdep.c#8 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/mp_machdep.c#8 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#5 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/trap.c#8 integrate
.. //depot/projects/arm/src/sys/amd64/conf/NOTES#6 integrate
.. //depot/projects/arm/src/sys/amd64/include/asmacros.h#3 integrate
.. //depot/projects/arm/src/sys/amd64/include/bus.h#3 integrate
.. //depot/projects/arm/src/sys/amd64/include/pmap.h#4 integrate
.. //depot/projects/arm/src/sys/amd64/include/trap.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_machdep.c#4 integrate
.. //depot/projects/arm/src/sys/amd64/pci/pci_bus.c#5 integrate
.. //depot/projects/arm/src/sys/arm/arm/in_cksum.c#5 integrate
.. //depot/projects/arm/src/sys/arm/include/in_cksum.h#5 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_aau.c#4 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i80321/i80321_dma.c#3 integrate
.. //depot/projects/arm/src/sys/boot/Makefile#2 integrate
.. //depot/projects/arm/src/sys/boot/alpha/common/Makefile.common#2 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/Makefile#4 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/libi386.h#4 integrate
.. //depot/projects/arm/src/sys/boot/i386/libi386/smbios.c#2 integrate
.. //depot/projects/arm/src/sys/boot/i386/loader/Makefile#3 integrate
.. //depot/projects/arm/src/sys/boot/ia64/efi/Makefile#2 integrate
.. //depot/projects/arm/src/sys/boot/ia64/ski/Makefile#2 integrate
.. //depot/projects/arm/src/sys/boot/pc98/loader/Makefile#3 integrate
.. //depot/projects/arm/src/sys/boot/powerpc/loader/Makefile#2 integrate
.. //depot/projects/arm/src/sys/boot/sparc64/loader/Makefile#2 integrate
.. //depot/projects/arm/src/sys/bsm/audit.h#4 integrate
.. //depot/projects/arm/src/sys/bsm/audit_internal.h#3 integrate
.. //depot/projects/arm/src/sys/cam/scsi/scsi_da.c#7 integrate
.. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_misc.c#8 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#17 integrate
.. //depot/projects/arm/src/sys/conf/files#21 integrate
.. //depot/projects/arm/src/sys/conf/files.alpha#4 integrate
.. //depot/projects/arm/src/sys/conf/files.amd64#9 integrate
.. //depot/projects/arm/src/sys/conf/files.i386#11 integrate
.. //depot/projects/arm/src/sys/conf/files.ia64#4 integrate
.. //depot/projects/arm/src/sys/conf/files.pc98#6 integrate
.. //depot/projects/arm/src/sys/conf/files.powerpc#5 integrate
.. //depot/projects/arm/src/sys/conf/files.sparc64#6 integrate
.. //depot/projects/arm/src/sys/conf/options#15 integrate
.. //depot/projects/arm/src/sys/conf/options.i386#6 integrate
.. //depot/projects/arm/src/sys/conf/options.pc98#5 integrate
.. //depot/projects/arm/src/sys/contrib/pf/net/if_pflog.h#4 integrate
.. //depot/projects/arm/src/sys/ddb/db_command.c#3 integrate
.. //depot/projects/arm/src/sys/ddb/ddb.h#3 integrate
.. //depot/projects/arm/src/sys/dev/aic7xxx/aic79xx_osm.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-all.c#8 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-all.h#11 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#15 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-disk.c#6 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-pci.h#9 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-queue.c#10 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-raid.c#10 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-usb.c#1 branch
.. //depot/projects/arm/src/sys/dev/ata/atapi-cd.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-fd.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-fd.h#4 integrate
.. //depot/projects/arm/src/sys/dev/ath/ath_rate/sample/sample.c#5 integrate
.. //depot/projects/arm/src/sys/dev/atkbdc/psm.c#4 integrate
.. //depot/projects/arm/src/sys/dev/bge/if_bge.c#12 integrate
.. //depot/projects/arm/src/sys/dev/cs/if_cs.c#3 integrate
.. //depot/projects/arm/src/sys/dev/dc/if_dc.c#6 integrate
.. //depot/projects/arm/src/sys/dev/dc/if_dcreg.h#4 integrate
.. //depot/projects/arm/src/sys/dev/exca/exca.c#3 integrate
.. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_logging.c#3 integrate
.. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_mod.c#5 integrate
.. //depot/projects/arm/src/sys/dev/ieee488/upd7210.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ipw/if_ipw.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ipw/if_ipwreg.h#2 integrate
.. //depot/projects/arm/src/sys/dev/ipw/if_ipwvar.h#2 integrate
.. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#7 integrate
.. //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#5 integrate
.. //depot/projects/arm/src/sys/dev/iwi/if_iwireg.h#4 integrate
.. //depot/projects/arm/src/sys/dev/iwi/if_iwivar.h#3 integrate
.. //depot/projects/arm/src/sys/dev/kbdmux/kbdmux.c#4 integrate
.. //depot/projects/arm/src/sys/dev/mpt/mpt.c#7 integrate
.. //depot/projects/arm/src/sys/dev/mpt/mpt.h#6 integrate
.. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#8 integrate
.. //depot/projects/arm/src/sys/dev/ral/if_ral.c#6 delete
.. //depot/projects/arm/src/sys/dev/ral/if_ral_pccard.c#2 delete
.. //depot/projects/arm/src/sys/dev/ral/if_ral_pci.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ral/if_ralreg.h#4 delete
.. //depot/projects/arm/src/sys/dev/ral/if_ralvar.h#3 delete
.. //depot/projects/arm/src/sys/dev/ral/rt2560.c#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2560reg.h#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2560var.h#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2661.c#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2661_ucode.h#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2661reg.h#1 branch
.. //depot/projects/arm/src/sys/dev/ral/rt2661var.h#1 branch
.. //depot/projects/arm/src/sys/dev/re/if_re.c#9 integrate
.. //depot/projects/arm/src/sys/dev/sound/pci/ich.c#7 integrate
.. //depot/projects/arm/src/sys/dev/sound/pcm/sound.c#4 integrate
.. //depot/projects/arm/src/sys/dev/sound/pcm/sound.h#4 integrate
.. //depot/projects/arm/src/sys/dev/sound/pcm/vchan.c#4 integrate
.. //depot/projects/arm/src/sys/dev/tdfx/tdfx_linux.c#1 branch
.. //depot/projects/arm/src/sys/dev/tdfx/tdfx_pci.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/umass.c#10 integrate
.. //depot/projects/arm/src/sys/fs/fifofs/fifo_vnops.c#4 integrate
.. //depot/projects/arm/src/sys/fs/nullfs/null_vnops.c#5 integrate
.. //depot/projects/arm/src/sys/geom/geom_io.c#4 integrate
.. //depot/projects/arm/src/sys/geom/label/g_label_ufs.c#6 integrate
.. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#9 integrate
.. //depot/projects/arm/src/sys/geom/mirror/g_mirror.h#6 integrate
.. //depot/projects/arm/src/sys/geom/mirror/g_mirror_ctl.c#4 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#11 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3.h#6 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3_ctl.c#4 integrate
.. //depot/projects/arm/src/sys/gnu/fs/xfs/FreeBSD/support/kdb.c#3 integrate
.. //depot/projects/arm/src/sys/i386/conf/NOTES#11 integrate
.. //depot/projects/arm/src/sys/i386/conf/PAE#4 integrate
.. //depot/projects/arm/src/sys/i386/conf/XBOX#4 integrate
.. //depot/projects/arm/src/sys/i386/i386/geode.c#4 integrate
.. //depot/projects/arm/src/sys/i386/i386/identcpu.c#11 integrate
.. //depot/projects/arm/src/sys/i386/i386/machdep.c#9 integrate
.. //depot/projects/arm/src/sys/i386/i386/mp_machdep.c#8 integrate
.. //depot/projects/arm/src/sys/i386/i386/vm_machdep.c#3 integrate
.. //depot/projects/arm/src/sys/i386/include/xbox.h#3 integrate
.. //depot/projects/arm/src/sys/i386/xbox/xboxfb.c#4 integrate
.. //depot/projects/arm/src/sys/isa/syscons_isa.c#3 integrate
.. //depot/projects/arm/src/sys/isofs/cd9660/cd9660_rrip.c#2 integrate
.. //depot/projects/arm/src/sys/kern/imgact_aout.c#4 integrate
.. //depot/projects/arm/src/sys/kern/kern_cpu.c#4 integrate
.. //depot/projects/arm/src/sys/kern/kern_environment.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_exec.c#7 integrate
.. //depot/projects/arm/src/sys/kern/kern_exit.c#13 integrate
.. //depot/projects/arm/src/sys/kern/kern_fork.c#7 integrate
.. //depot/projects/arm/src/sys/kern/kern_malloc.c#6 integrate
.. //depot/projects/arm/src/sys/kern/kern_mbuf.c#8 integrate
.. //depot/projects/arm/src/sys/kern/kern_resource.c#7 integrate
.. //depot/projects/arm/src/sys/kern/kern_sig.c#10 integrate
.. //depot/projects/arm/src/sys/kern/kern_tc.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_thread.c#8 integrate
.. //depot/projects/arm/src/sys/kern/subr_prf.c#4 integrate
.. //depot/projects/arm/src/sys/kern/uipc_mbuf.c#11 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket.c#9 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket2.c#7 integrate
.. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#7 integrate
.. //depot/projects/arm/src/sys/kern/vfs_mount.c#12 integrate
.. //depot/projects/arm/src/sys/kern/vfs_subr.c#13 integrate
.. //depot/projects/arm/src/sys/kern/vfs_syscalls.c#11 integrate
.. //depot/projects/arm/src/sys/kern/vfs_vnops.c#6 integrate
.. //depot/projects/arm/src/sys/modules/3dfx/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/3dfx_linux/Makefile#1 branch
.. //depot/projects/arm/src/sys/modules/Makefile#15 integrate
.. //depot/projects/arm/src/sys/modules/acpi/acpi_video/Makefile#2 integrate
.. //depot/projects/arm/src/sys/modules/ata/atausb/Makefile#1 branch
.. //depot/projects/arm/src/sys/modules/ce/Makefile#2 integrate
.. //depot/projects/arm/src/sys/modules/cp/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/dummynet/Makefile#4 integrate
.. //depot/projects/arm/src/sys/modules/if_bridge/Makefile#2 integrate
.. //depot/projects/arm/src/sys/modules/if_gif/Makefile#4 integrate
.. //depot/projects/arm/src/sys/modules/ipfilter/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/ipfw/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/iwi/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/netgraph/Makefile#3 integrate
.. //depot/projects/arm/src/sys/modules/pf/Makefile#4 integrate
.. //depot/projects/arm/src/sys/modules/pflog/Makefile#2 integrate
.. //depot/projects/arm/src/sys/modules/ral/Makefile#2 integrate
.. //depot/projects/arm/src/sys/modules/smbfs/Makefile#4 integrate
.. //depot/projects/arm/src/sys/net/bridgestp.c#4 integrate
.. //depot/projects/arm/src/sys/net/if_bridge.c#10 integrate
.. //depot/projects/arm/src/sys/net/if_bridgevar.h#5 integrate
.. //depot/projects/arm/src/sys/net/if_ethersubr.c#11 integrate
.. //depot/projects/arm/src/sys/net/if_media.h#4 integrate
.. //depot/projects/arm/src/sys/net/if_tap.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_vlan.c#9 integrate
.. //depot/projects/arm/src/sys/net/route.h#3 integrate
.. //depot/projects/arm/src/sys/net/rtsock.c#4 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_input.c#7 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_node.c#8 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_node.h#4 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_output.c#7 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_proto.c#7 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_var.h#9 integrate
.. //depot/projects/arm/src/sys/netatalk/ddp_pcb.c#2 integrate
.. //depot/projects/arm/src/sys/netatalk/ddp_usrreq.c#2 integrate
.. //depot/projects/arm/src/sys/netgraph/ng_tcpmss.c#2 integrate
.. //depot/projects/arm/src/sys/netinet/if_ether.c#9 integrate
.. //depot/projects/arm/src/sys/netinet/ip_fw2.c#9 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_syncache.c#9 integrate
.. //depot/projects/arm/src/sys/netinet6/mld6.c#3 integrate
.. //depot/projects/arm/src/sys/netipsec/ipsec.h#2 integrate
.. //depot/projects/arm/src/sys/netipsec/ipsec_mbuf.c#3 integrate
.. //depot/projects/arm/src/sys/netipsec/xform_ah.c#2 integrate
.. //depot/projects/arm/src/sys/netipsec/xform_esp.c#2 integrate
.. //depot/projects/arm/src/sys/netipsec/xform_ipcomp.c#2 integrate
.. //depot/projects/arm/src/sys/netnatm/natm.c#3 integrate
.. //depot/projects/arm/src/sys/netsmb/smb_crypt.c#2 integrate
.. //depot/projects/arm/src/sys/netsmb/smb_smb.c#2 integrate
.. //depot/projects/arm/src/sys/nfsclient/nfs_socket.c#7 integrate
.. //depot/projects/arm/src/sys/nfsclient/nfs_vnops.c#7 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs_serv.c#6 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs_srvsock.c#5 integrate
.. //depot/projects/arm/src/sys/opencrypto/crypto.c#2 integrate
.. //depot/projects/arm/src/sys/pc98/conf/NOTES#9 integrate
.. //depot/projects/arm/src/sys/pc98/pc98/machdep.c#5 integrate
.. //depot/projects/arm/src/sys/security/audit/audit.c#6 integrate
.. //depot/projects/arm/src/sys/security/audit/audit_bsm_token.c#2 integrate
.. //depot/projects/arm/src/sys/security/audit/audit_pipe.c#2 integrate
.. //depot/projects/arm/src/sys/security/audit/audit_private.h#3 integrate
.. //depot/projects/arm/src/sys/security/mac/mac_process.c#3 integrate
.. //depot/projects/arm/src/sys/security/mac_bsdextended/mac_bsdextended.c#4 integrate
.. //depot/projects/arm/src/sys/sys/ata.h#4 integrate
.. //depot/projects/arm/src/sys/sys/cdefs.h#6 integrate
.. //depot/projects/arm/src/sys/sys/disk.h#2 integrate
.. //depot/projects/arm/src/sys/sys/event.h#5 integrate
.. //depot/projects/arm/src/sys/sys/hash.h#1 branch
.. //depot/projects/arm/src/sys/sys/mbuf.h#10 integrate
.. //depot/projects/arm/src/sys/sys/md5.h#3 integrate
.. //depot/projects/arm/src/sys/sys/mount.h#9 integrate
.. //depot/projects/arm/src/sys/sys/proc.h#12 integrate
.. //depot/projects/arm/src/sys/sys/protosw.h#3 integrate
.. //depot/projects/arm/src/sys/sys/queue.h#6 integrate
.. //depot/projects/arm/src/sys/sys/signalvar.h#4 integrate
.. //depot/projects/arm/src/sys/sys/socketvar.h#6 integrate
.. //depot/projects/arm/src/sys/sys/vnode.h#10 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_extern.h#4 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_rawread.c#3 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_snapshot.c#9 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_softdep.c#8 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_vfsops.c#9 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufs_inode.c#6 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufs_lookup.c#3 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufs_quota.c#8 integrate
.. //depot/projects/arm/src/sys/ufs/ufs/ufsmount.h#3 integrate
.. //depot/projects/arm/src/sys/vm/swap_pager.c#4 integrate
.. //depot/projects/arm/src/sys/vm/vm_contig.c#6 integrate
.. //depot/projects/arm/src/sys/vm/vm_fault.c#8 integrate
.. //depot/projects/arm/src/sys/vm/vm_map.c#6 integrate
.. //depot/projects/arm/src/sys/vm/vm_object.c#8 integrate
.. //depot/projects/arm/src/sys/vm/vm_page.c#9 integrate
.. //depot/projects/arm/src/sys/vm/vm_pageq.c#6 integrate
.. //depot/projects/arm/src/sys/vm/vnode_pager.c#7 integrate
Differences ...
==== //depot/projects/arm/src/sys/Makefile#5 (text+ko) ====
@@ -1,7 +1,9 @@
-# $FreeBSD: src/sys/Makefile,v 1.34 2006/01/10 20:58:27 rees Exp $
+# $FreeBSD: src/sys/Makefile,v 1.35 2006/03/17 18:54:34 ru Exp $
+
+.include <bsd.own.mk>
# The boot loader
-.if !defined(NO_BOOT)
+.if ${MK_BOOT} != "no"
.if ${MACHINE_ARCH} != "arm"
SUBDIR= boot
.endif
==== //depot/projects/arm/src/sys/alpha/alpha/clock.c#6 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.42 2005/12/22 22:16:04 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.44 2006/03/07 22:12:09 jhb Exp $");
#include "opt_clock.h"
@@ -49,6 +49,7 @@
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/queue.h>
+#include <sys/smp.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -89,8 +90,6 @@
device_t clockdev;
int clockinitted;
-int tickfix;
-int tickfixinterval;
int adjkerntz; /* local offset from GMT in seconds */
int disable_rtc_set; /* disable resettodr() if != 0 */
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
@@ -103,15 +102,8 @@
#define TIMER_FREQ 1193182
#endif
u_int32_t timer_freq = TIMER_FREQ;
-int timer0_max_count;
-
-static u_int32_t i8254_lastcount;
-static u_int32_t i8254_offset;
-static int i8254_ticked;
-static int clkintr_pending = 0;
extern int cycles_per_sec;
-extern int ncpus;
static timecounter_get_t i8254_get_timecount;
static timecounter_get_t alpha_get_timecount;
@@ -128,7 +120,7 @@
static struct timecounter i8254_timecounter = {
i8254_get_timecount, /* get_timecount */
0, /* no poll_pps */
- ~0u, /* counter_mask */
+ 0xffff, /* counter_mask */
0, /* frequency */
"i8254" /* name */
};
@@ -142,25 +134,10 @@
/* static u_char timer0_state; */
static u_char timer2_state;
-/*
- * Algorithm for missed clock ticks from Linux/alpha.
- */
-
-/*
- * Shift amount by which scaled_ticks_per_cycle is scaled. Shifting
- * by 48 gives us 16 bits for HZ while keeping the accuracy good even
- * for large CPU clock rates.
- */
-#define FIX_SHIFT 48
-
-static u_int64_t scaled_ticks_per_cycle;
-static u_int32_t max_cycles_per_tick;
-static u_int32_t last_time;
-
-static void handleclock(int usermode, uintfptr_t pc);
static void calibrate_clocks(u_int32_t firmware_freq, u_int32_t *pcc,
u_int32_t *timer);
static void set_timer_freq(u_int freq, int intr_freq);
+static uint64_t read_cycle_count(void);
void
clockattach(device_t dev)
@@ -176,6 +153,7 @@
calibrate_clocks(cycles_per_sec, &pcc, &freq);
cycles_per_sec = pcc;
+ set_cputicker(read_cycle_count, cycles_per_sec, 0);
/*
* XXX: TurboLaser doesn't have an i8254 counter.
@@ -206,7 +184,6 @@
freq, timer_freq);
}
set_timer_freq(timer_freq, hz);
- i8254_timecounter.tc_frequency = timer_freq;
out:
#ifdef EVCNT_COUNTERS
@@ -235,21 +212,12 @@
void
cpu_initclocks()
{
- u_int32_t freq;
if (clockdev == NULL)
panic("cpu_initclocks: no clock attached");
tick = 1000000 / hz; /* number of microseconds between interrupts */
- tickfix = 1000000 - (hz * tick);
- if (tickfix) {
- int ftp;
- ftp = min(ffs(tickfix), ffs(hz));
- tickfix >>= (ftp - 1);
- tickfixinterval = hz >> (ftp - 1);
- }
-
/*
* Establish the clock interrupt; it's a special case.
*
@@ -262,24 +230,18 @@
* hardclock, which would then fall over because p->p_stats
* isn't set at that time.
*/
- freq = cycles_per_sec;
- last_time = alpha_rpcc();
- scaled_ticks_per_cycle = ((u_int64_t)hz << FIX_SHIFT) / freq;
- max_cycles_per_tick = 2*freq / hz;
/*
* XXX: TurboLaser doesn't have an i8254 counter.
* XXX: A replacement is needed, and another method
* XXX: of determining this would be nice.
*/
- if (hwrpb->rpb_type != ST_DEC_21000) {
+ if (hwrpb->rpb_type != ST_DEC_21000)
tc_init(&i8254_timecounter);
- platform.clockintr = handleclock;
- } else
- platform.clockintr = hardclock;
+ platform.clockintr = hardclock;
- if (ncpus == 1) {
- alpha_timecounter.tc_frequency = freq;
+ if (mp_ncpus == 1) {
+ alpha_timecounter.tc_frequency = cycles_per_sec;
tc_init(&alpha_timecounter);
}
@@ -375,7 +337,7 @@
if (count == 0)
goto fail;
if (count > prev_count)
- tot_count += prev_count - (count - timer0_max_count);
+ tot_count += prev_count - (count - 0xffff);
else
tot_count += prev_count - count;
prev_count = count;
@@ -410,40 +372,16 @@
static void
set_timer_freq(u_int freq, int intr_freq)
{
- int new_timer0_max_count;
mtx_lock_spin(&clock_lock);
timer_freq = freq;
- new_timer0_max_count = TIMER_DIV(intr_freq);
- if (new_timer0_max_count != timer0_max_count) {
- timer0_max_count = new_timer0_max_count;
- outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
- outb(TIMER_CNTR0, timer0_max_count & 0xff);
- outb(TIMER_CNTR0, timer0_max_count >> 8);
- }
+ i8254_timecounter.tc_frequency = timer_freq;
+ outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
+ outb(TIMER_CNTR0, 0);
+ outb(TIMER_CNTR0, 0);
mtx_unlock_spin(&clock_lock);
}
-static void
-handleclock(int usermode, uintfptr_t pc)
-{
-
- KASSERT(hwrpb->rpb_type != ST_DEC_21000,
- ("custom clock handler called on TurboLaser"));
- if (timecounter->tc_get_timecount == i8254_get_timecount) {
- mtx_lock_spin(&clock_lock);
- if (i8254_ticked)
- i8254_ticked = 0;
- else {
- i8254_offset += timer0_max_count;
- i8254_lastcount = 0;
- }
- clkintr_pending = 0;
- mtx_unlock_spin(&clock_lock);
- }
- hardclock(usermode, pc);
-}
-
void
cpu_startprofclock(void)
{
@@ -609,29 +547,8 @@
static unsigned
i8254_get_timecount(struct timecounter *tc)
{
- u_int count;
- u_int high, low;
- mtx_lock_spin(&clock_lock);
-
- /* Select timer0 and latch counter value. */
- outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
-
- low = inb(TIMER_CNTR0);
- high = inb(TIMER_CNTR0);
- count = timer0_max_count - ((high << 8) | low);
- if (count < i8254_lastcount ||
- (!i8254_ticked && (clkintr_pending ||
- ((count < 20) && (inb(IO_ICU1) & 1)))
- )) {
- i8254_ticked = 1;
- i8254_offset += timer0_max_count;
- }
- i8254_lastcount = count;
- count += i8254_offset;
-
- mtx_unlock_spin(&clock_lock);
- return (count);
+ return (0xffff - get_8254_ctr());
}
static unsigned
@@ -640,6 +557,30 @@
return alpha_rpcc();
}
+/*
+ * The RPCC register actually consists of two halves. The lower half
+ * is a raw 32-bit counter that wraps. The upper half is defined in
+ * the Digital UNIX PAL as being a raw per-process cycle count mod 2^32
+ * that is updated on each call to swpctx. In order to produce a 64-bit
+ * counter, we just use the lower half and simulate the upper 32-bits.
+ * The architecture guarantees that there will always be at least one
+ * clock interrupt in between overlaps in the lower half, so as long as
+ * we call this function every clock interrupt we should not miss any
+ * overlaps.
+ */
+uint64_t
+read_cycle_count(void)
+{
+ unsigned pcc_cnt;
+
+ /* Assert a critical section? */
+ pcc_cnt = alpha_rpcc() & 0xffffffff;
+ if (pcc_cnt < PCPU_GET(last_pcc_cnt))
+ PCPU_SET(pcc_base, PCPU_GET(pcc_base) + 1);
+ PCPU_SET(last_pcc_cnt, pcc_cnt);
+ return (pcc_cnt | ((uint64_t)PCPU_GET(pcc_base) << 32));
+}
+
int
acquire_timer2(int mode)
{
==== //depot/projects/arm/src/sys/alpha/include/pcpu.h#2 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/alpha/include/pcpu.h,v 1.15 2004/11/05 19:16:44 jhb Exp $
+ * $FreeBSD: src/sys/alpha/include/pcpu.h,v 1.16 2006/03/07 22:12:09 jhb Exp $
*/
#ifndef _MACHINE_PCPU_H_
@@ -38,7 +38,9 @@
u_int64_t pc_idlepcbphys; /* pa of pc_idlepcb */ \
u_int64_t pc_pending_ipis; /* pending IPI's */ \
u_int32_t pc_next_asn; /* next ASN to alloc */ \
- u_int32_t pc_current_asngen /* ASN rollover check */
+ u_int32_t pc_current_asngen; /* ASN rollover check */ \
+ u_int32_t pc_last_pcc_cnt; /* Previous PCC_CNT value */ \
+ u_int32_t pc_pcc_base /* Hi word of cycle count. */
struct pcpu;
==== //depot/projects/arm/src/sys/amd64/amd64/apic_vector.S#6 (text+ko) ====
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* from: vector.s, 386BSD 0.1 unknown origin
- * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.107 2005/12/14 21:47:01 jhb Exp $
+ * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.108 2006/03/13 23:55:31 peter Exp $
*/
/*
@@ -188,11 +188,7 @@
jmp doreti
/*
- * Executed by a CPU when it receives an Xcpustop IPI from another CPU,
- *
- * - Signals its receipt.
- * - Waits for permission to restart.
- * - Signals its restart.
+ * Executed by a CPU when it receives an IPI_STOP from another CPU.
*/
.text
SUPERALIGN_TEXT
==== //depot/projects/arm/src/sys/amd64/amd64/db_trace.c#6 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.73 2005/12/27 23:23:47 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.74 2006/03/13 23:56:44 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -192,6 +192,7 @@
#define TRAP 1
#define INTERRUPT 2
#define SYSCALL 3
+#define TRAP_INTERRUPT 5
static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *);
static int db_numargs(struct amd64_frame *);
@@ -326,6 +327,12 @@
frame_type = INTERRUPT;
else if (strcmp(name, "Xfast_syscall") == 0)
frame_type = SYSCALL;
+ /* XXX: These are interrupts with trap frames. */
+ else if (strcmp(name, "Xtimerint") == 0 ||
+ strcmp(name, "Xcpustop") == 0 ||
+ strcmp(name, "Xrendezvous") == 0 ||
+ strcmp(name, "Xipi_intr_bitmap_handler") == 0)
+ frame_type = TRAP_INTERRUPT;
}
/*
@@ -357,6 +364,7 @@
db_printf("--- syscall");
decode_syscall(tf->tf_rax, td);
break;
+ case TRAP_INTERRUPT:
case INTERRUPT:
db_printf("--- interrupt");
break;
==== //depot/projects/arm/src/sys/amd64/amd64/io_apic.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.21 2006/02/28 22:24:54 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.22 2006/03/13 23:55:31 peter Exp $");
#include "opt_atpic.h"
#include "opt_isa.h"
@@ -73,6 +73,10 @@
* IRQs behave as PCI IRQs by default. We also assume that the pin for
* IRQ 0 is actually an ExtINT pin. The apic enumerators override the
* configuration of individual pins as indicated by their tables.
+ *
+ * Documentation for the I/O APIC: "82093AA I/O Advanced Programmable
+ * Interrupt Controller (IOAPIC)", May 1996, Intel Corp.
+ * ftp://download.intel.com/design/chipsets/datashts/29056601.pdf
*/
struct ioapic_intsrc {
==== //depot/projects/arm/src/sys/amd64/amd64/machdep.c#8 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.646 2006/02/03 02:49:14 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.648 2006/03/14 16:13:54 jhb Exp $");
#include "opt_atalk.h"
#include "opt_atpic.h"
@@ -247,8 +247,8 @@
struct sigacts *psp;
char *sp;
struct trapframe *regs;
+ int sig;
int oonstack;
- int sig;
td = curthread;
p = td->td_proc;
@@ -1749,8 +1749,7 @@
* could halt the system by setting a breakpoint in the kernel
* (if ddb was enabled). Thus, we need to check to make sure
* that no breakpoints are being enabled for addresses outside
- * process's address space, unless, perhaps, we were called by
- * uid 0.
+ * process's address space.
*
* XXX - what about when the watched area of the user's
* address space is written into from within the kernel
@@ -1758,27 +1757,25 @@
* from within kernel mode?
*/
- if (suser(td) != 0) {
- if (dbregs->dr[7] & 0x3) {
- /* dr0 is enabled */
- if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS)
- return (EINVAL);
- }
- if (dbregs->dr[7] & 0x3<<2) {
- /* dr1 is enabled */
- if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS)
- return (EINVAL);
- }
- if (dbregs->dr[7] & 0x3<<4) {
- /* dr2 is enabled */
- if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS)
- return (EINVAL);
- }
- if (dbregs->dr[7] & 0x3<<6) {
- /* dr3 is enabled */
- if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS)
- return (EINVAL);
- }
+ if (dbregs->dr[7] & 0x3) {
+ /* dr0 is enabled */
+ if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS)
+ return (EINVAL);
+ }
+ if (dbregs->dr[7] & 0x3<<2) {
+ /* dr1 is enabled */
+ if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS)
+ return (EINVAL);
+ }
+ if (dbregs->dr[7] & 0x3<<4) {
+ /* dr2 is enabled */
+ if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS)
+ return (EINVAL);
+ }
+ if (dbregs->dr[7] & 0x3<<6) {
+ /* dr3 is enabled */
+ if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS)
+ return (EINVAL);
}
pcb->pcb_dr0 = dbregs->dr[0];
==== //depot/projects/arm/src/sys/amd64/amd64/mp_machdep.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.269 2006/02/28 22:24:54 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.270 2006/03/09 16:38:52 jhb Exp $");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
@@ -612,12 +612,12 @@
continue;
if (cpu_info[apic_id].cpu_bsp)
continue;
-#if 0
+
/* Don't let hyperthreads service interrupts. */
if (hyperthreading_cpus > 1 &&
apic_id % hyperthreading_cpus != 0)
continue;
-#endif
+
intr_add_cpu(apic_id);
}
}
==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#5 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.536 2006/02/03 00:16:36 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.537 2006/03/13 08:13:37 ps Exp $");
/*
* Manages physical address maps.
@@ -1360,7 +1360,7 @@
return sysctl_handle_long(oidp, &ksize, 0, req);
}
SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD,
- 0, 0, kvm_size, "IU", "Size of KVM");
+ 0, 0, kvm_size, "LU", "Size of KVM");
static int
kvm_free(SYSCTL_HANDLER_ARGS)
@@ -1370,7 +1370,7 @@
return sysctl_handle_long(oidp, &kfree, 0, req);
}
SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD,
- 0, 0, kvm_free, "IU", "Amount of KVM free");
+ 0, 0, kvm_free, "LU", "Amount of KVM free");
/*
* grow the number of kernel page table entries, if needed
==== //depot/projects/arm/src/sys/amd64/amd64/trap.c#8 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.302 2006/02/08 08:09:15 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.303 2006/03/13 23:55:31 peter Exp $");
/*
* AMD64 Trap and System call handling
@@ -872,7 +872,6 @@
*/
if (orig_tf_rflags & PSL_T) {
frame.tf_rflags &= ~PSL_T;
-
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = SIGTRAP;
ksi.ksi_code = TRAP_TRACE;
==== //depot/projects/arm/src/sys/amd64/conf/NOTES#6 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.51 2005/12/03 01:23:49 anholt Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.52 2006/03/06 15:29:28 yar Exp $
#
#
@@ -170,11 +170,10 @@
# the tdfx DRI module from XFree86 and is completely unrelated.
#
# To enable Linuxulator support, one must also include COMPAT_LINUX in the
-# config as well, or you will not have the dependencies. The other option
-# is to load both as modules.
+# config as well. The other option is to load both as modules.
device tdfx # Enable 3Dfx Voodoo support
-#XXX#options TDFX_LINUX # Enable Linuxulator support
+#XXX#device tdfx_linux # Enable Linuxulator support
#
# ACPI support using the Intel ACPI Component Architecture reference
==== //depot/projects/arm/src/sys/amd64/include/asmacros.h#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/asmacros.h,v 1.29 2005/12/08 18:33:30 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/asmacros.h,v 1.30 2006/03/14 00:01:56 peter Exp $
*/
#ifndef _MACHINE_ASMACROS_H_
@@ -130,7 +130,7 @@
#ifdef LOCORE
/*
- * Convenience macros for declaring interrupt entry points.
+ * Convenience macro for declaring interrupt entry points.
*/
#define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \
.type __CONCAT(X,name), at function; __CONCAT(X,name):
==== //depot/projects/arm/src/sys/amd64/include/bus.h#3 (text+ko) ====
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/bus.h,v 1.16 2005/05/29 04:42:15 nyan Exp $
+ * $FreeBSD: src/sys/amd64/include/bus.h,v 1.17 2006/03/14 00:01:56 peter Exp $
*/
/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */
@@ -1004,6 +1004,17 @@
#endif
}
+#ifdef BUS_SPACE_NO_LEGACY
+#undef inb
+#undef outb
+#define inb(a) compiler_error
+#define inw(a) compiler_error
+#define inl(a) compiler_error
+#define outb(a, b) compiler_error
+#define outw(a, b) compiler_error
+#define outl(a, b) compiler_error
+#endif
+
#include <machine/bus_dma.h>
/*
==== //depot/projects/arm/src/sys/amd64/include/pmap.h#4 (text+ko) ====
@@ -39,7 +39,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.128 2005/12/06 21:09:01 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.129 2006/03/14 00:01:56 peter Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -176,7 +176,7 @@
* the corresponding pde that in turn maps it.
*/
pt_entry_t *vtopte(vm_offset_t);
-#define vtophys(va) pmap_kextract((vm_offset_t)(va))
+#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
static __inline pt_entry_t
pte_load(pt_entry_t *ptep)
==== //depot/projects/arm/src/sys/amd64/include/trap.h#2 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.h 5.4 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/trap.h,v 1.14 2004/04/05 21:25:51 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/trap.h,v 1.15 2006/03/14 00:01:22 peter Exp $
*/
#ifndef _MACHINE_TRAP_H_
@@ -72,16 +72,6 @@
#define ILL_ALIGN_FAULT T_ALIGNFLT
#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */
-/* portable macros for SIGFPE/ARITHTRAP */
-#define FPE_INTOVF 1 /* integer overflow */
-#define FPE_INTDIV 2 /* integer divide by zero */
-#define FPE_FLTDIV 3 /* floating point divide by zero */
-#define FPE_FLTOVF 4 /* floating point overflow */
-#define FPE_FLTUND 5 /* floating point underflow */
-#define FPE_FLTRES 6 /* floating point inexact result */
-#define FPE_FLTINV 7 /* invalid floating point operation */
-#define FPE_FLTSUB 8 /* subscript out of range */
-
/* old FreeBSD macros, deprecated */
#define FPE_INTOVF_TRAP 0x1 /* integer overflow */
#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */
==== //depot/projects/arm/src/sys/amd64/linux32/linux32_machdep.c#4 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.11 2006/02/06 22:06:53 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.12 2006/03/08 20:21:53 ups Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -130,7 +130,7 @@
copystr(fname, args->fname, PATH_MAX, &length) :
copyinstr(fname, args->fname, PATH_MAX, &length);
if (error != 0)
- return (error);
+ goto err_exit;
/*
* extract arguments first
@@ -139,16 +139,16 @@
for (;;) {
error = copyin(p32++, &arg, sizeof(arg));
if (error)
- return (error);
+ goto err_exit;
if (arg == 0)
break;
argp = PTRIN(arg);
error = copyinstr(argp, args->endp, args->stringspace, &length);
if (error) {
if (error == ENAMETOOLONG)
- return (E2BIG);
- else
- return (error);
+ error = E2BIG;
+
+ goto err_exit;
}
args->stringspace -= length;
args->endp += length;
@@ -165,7 +165,7 @@
for (;;) {
error = copyin(p32++, &arg, sizeof(arg));
if (error)
- return (error);
+ goto err_exit;
if (arg == 0)
break;
envp = PTRIN(arg);
@@ -173,9 +173,8 @@
&length);
if (error) {
if (error == ENAMETOOLONG)
- return (E2BIG);
- else
- return (error);
+ error = E2BIG;
+ goto err_exit;
}
args->stringspace -= length;
args->endp += length;
@@ -184,6 +183,12 @@
}
return (0);
+
+err_exit:
+ kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
+ PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+ args->buf = NULL;
+ return (error);
}
int
==== //depot/projects/arm/src/sys/amd64/pci/pci_bus.c#5 (text+ko) ====
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list