The NetBSD Project

CVS log for src/sys/arch/x86/x86/tsc.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / x86 / x86

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.60 / (download) - annotate - [select for diffs], Mon Feb 19 20:10:09 2024 UTC (8 weeks, 3 days ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.59: +2 -3 lines
Diff to previous 1.59 (colored) to selected 1.13.4.4 (colored)

remove unintended printf() in previous.  (thx dh)

Revision 1.59 / (download) - annotate - [select for diffs], Mon Feb 19 09:22:31 2024 UTC (8 weeks, 4 days ago) by mrg
Branch: MAIN
Changes since 1.58: +15 -2 lines
Diff to previous 1.58 (colored) to selected 1.13.4.4 (colored)

make TSC get a quality of -100 on AMD Family 15h and 16h

this should "fix" PR#56322 and is known as AMD errata
"778: Processor Core Time Stamp Counters May Experience Drift"

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 9 18:37:03 2023 UTC (7 months, 1 week ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.57: +13 -15 lines
Diff to previous 1.57 (colored) to selected 1.13.4.4 (colored)

tsc_get_timecount(): cover the backwards check by DIAGNOSTIC since it has
proven the point by now.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 15 18:12:48 2021 UTC (2 years, 6 months ago) by jmcneill
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.13.4.4 (colored)

Fix typo in comment: "porniters" -> "pointers"

Revision 1.54.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:26 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.54: +19 -3 lines
Diff to previous 1.54 (colored) next main 1.55 (colored) to selected 1.13.4.4 (colored)

Sync w/ HEAD.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jun 2 06:48:10 2021 UTC (2 years, 10 months ago) by nia
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x
Changes since 1.55: +4 -3 lines
Diff to previous 1.55 (colored) to selected 1.13.4.4 (colored)

when warning about TSC going backwards, provide advice to the sysadmin.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jun 1 21:29:24 2021 UTC (2 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.54: +17 -2 lines
Diff to previous 1.54 (colored) to selected 1.13.4.4 (colored)

x86: Reset cached tsc in every lwp to 0 on suspend/resume.

This avoids spuriously warning about tsc going backwards, which is to
be expected after a suspend/resume cycle.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:41 2021 UTC (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.52: +7 -4 lines
Diff to previous 1.52 (colored) next main 1.53 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Feb 19 02:15:58 2021 UTC (3 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.53: +4 -2 lines
Diff to previous 1.53 (colored) to selected 1.13.4.4 (colored)

Penalize TSC on VirtualBox because it is not accurate enough.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 17 06:33:47 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.52: +5 -4 lines
Diff to previous 1.52 (colored) to selected 1.13.4.4 (colored)

x86/tsc: fix double space in warning about TSC going backwards

Revision 1.36.22.2 / (download) - annotate - [select for diffs], Wed Aug 5 16:20:08 2020 UTC (3 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.36.22.1: +7 -2 lines
Diff to previous 1.36.22.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored) to selected 1.13.4.4 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1593:

	sys/arch/x86/conf/files.x86			1.108
	sys/arch/x86/include/apicvar.h			1.7 via patch
	sys/arch/x86/include/cpu.h			1.121
	sys/arch/x86/x86/cpu.c				1.185 via patch
	sys/arch/x86/x86/hyperv.c			1.7
	sys/arch/x86/x86/tsc.c				1.41
	sys/arch/xen/conf/files.xen			1.181

Get TSC frequency from CPUID 0x15 and/or x16 if it's available.
This change fixes a problem that newer Intel processors' timer
counts very slowly.

Revision 1.37.8.2 / (download) - annotate - [select for diffs], Wed Jul 15 17:25:08 2020 UTC (3 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.37.8.1: +7 -2 lines
Diff to previous 1.37.8.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored) to selected 1.13.4.4 (colored)

Pull up the following, requested by msaitoh in ticket #1015

	sys/arch/x86/conf/files.x86			1.108 (via patch)
	sys/arch/x86/include/apicvar.h			1.7 (via patch)
	sys/arch/x86/include/cpu.h			1.121 (via patch)
	sys/arch/x86/x86/cpu.c				1.185 (via patch)
	sys/arch/x86/x86/hyperv.c			1.7 (via patch)
	sys/arch/x86/x86/tsc.c				1.41 (via patch)
	sys/arch/xen/conf/files.xen			1.181 (via patch)

Get TSC frequency from CPUID 0x15 and/or x16 if it's available.
This change fixes a problem that newer Intel processors' timer
counts very slowly.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jun 15 20:27:30 2020 UTC (3 years, 10 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.51: +2 -3 lines
Diff to previous 1.51 (colored) to selected 1.13.4.4 (colored)

Nix trailing whitespace.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jun 15 09:09:24 2020 UTC (3 years, 10 months ago) by msaitoh
Branch: MAIN
Changes since 1.50: +50 -2 lines
Diff to previous 1.50 (colored) to selected 1.13.4.4 (colored)

Serialize rdtsc using with lfence, mfence or cpuid to read TSC more precisely.

 x86/x86/tsc.c rev. 1.67 reduced cache problem and got big improvement, but it
 still has room. I measured the effect of lfence, mfence, cpuid and rdtscp.
The impact to TSC skew and/or drift is:

	AMD:   mfence > rdtscp > cpuid > lfence-serialize > lfence = nomodify
	Intel: lfence > rdtscp > cpuid > nomodify

So, mfence is the best on AMD and lfence is the best on Intel. If it has no
SSE2, we can use cpuid.

NOTE:
  - An AMD's document says DE_CFG_LFENCE_SERIALIZE bit can be used for
    serializing, but it's not so good.
  - On Intel i386(not amd64), it seems the improvement is very little.
  - rdtscp instruct can be used as serializing instruction + rdtsc, but
    it's not good as [lm]fence. Both Intel and AMD's document say that
    the latency of rdtscp is bigger than rdtsc, so I suspect the difference
    of the result comes from it.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jun 14 23:24:20 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.49: +6 -2 lines
Diff to previous 1.49 (colored) to selected 1.13.4.4 (colored)

tsc_get_timecount(): disable the "clock goes backwards" check on i386 for
the moment since it requires 64-bit store to be atomic because of nesting
via interrupt.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jun 13 23:58:52 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.48: +37 -3 lines
Diff to previous 1.48 (colored) to selected 1.13.4.4 (colored)

Print a rate limited warning if the TSC timecounter goes backwards from the
viewpoint of any single LWP.

Revision 1.48 / (download) - annotate - [select for diffs], Wed May 27 18:46:15 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.47: +4 -4 lines
Diff to previous 1.47 (colored) to selected 1.13.4.4 (colored)

tsc_delay(): use tsc_freq in preference to cpu_frequency().

Revision 1.47 / (download) - annotate - [select for diffs], Wed May 20 20:19:02 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.46: +16 -7 lines
Diff to previous 1.46 (colored) to selected 1.13.4.4 (colored)

The boot CPU suffers a cache miss during TSC sync, before RDTSC.  Make the
secondary CPU take a miss as well to try and delay it an equal amount.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 19 21:56:51 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.45: +2 -3 lines
Diff to previous 1.45 (colored) to selected 1.13.4.4 (colored)

Ignore x86_delay, for xen

Revision 1.45 / (download) - annotate - [select for diffs], Tue May 19 21:43:36 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.44: +25 -5 lines
Diff to previous 1.44 (colored) to selected 1.13.4.4 (colored)

If the the TSC timecounter is good then use the TSC for DELAY() too.

Revision 1.44 / (download) - annotate - [select for diffs], Fri May 8 22:01:55 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.43: +23 -29 lines
Diff to previous 1.43 (colored) to selected 1.13.4.4 (colored)

Fix the TSC timecounter (on the systems I have access to):

- Make the early i8254-based calculation of frequency a bit more accurate.

- Keep track of how far the HPET & TSC advance between HPET attach and
  secondary CPU boot, and use to compute an accurate value before attaching
  the timecounter.  Initial idea from joerg@.

- When determining skew and drift between CPUs, make each measurement 1000
  times and pick the lowest observed value.  Increase the error threshold to
  1000 clock cycles.

- Use the frequency computed on the boot CPU for secondary CPUs too.

- Remove cpu_counter_serializing().

Revision 1.43 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:18 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored) to selected 1.13.4.4 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:23:57 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.40: +18 -7 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.13.4.4 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.42 / (download) - annotate - [select for diffs], Thu Apr 23 20:38:33 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.41: +13 -7 lines
Diff to previous 1.41 (colored) to selected 1.13.4.4 (colored)

When computing TSC skew make 8 measurements and use the average.

Revision 1.37.4.2 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:12 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.37.4.1: +5 -0 lines
Diff to previous 1.37.4.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 21 02:56:37 2020 UTC (3 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200421
Changes since 1.40: +7 -2 lines
Diff to previous 1.40 (colored) to selected 1.13.4.4 (colored)

Get TSC frequency from CPUID 0x15 and/or x16 for newer Intel processors.

 - If the max CPUID leaf is >= 0x15, take TSC value from CPUID. Some processors
   can take TSC/core crystal clock ratio but core crystal clock frequency
   can't be taken. Intel SDM give us the values for some processors.
 - It also required to change lapic_per_second to make LAPIC timer correctly.
 - Add new file x86/x86/identcpu_subr.c to share common subroutines between
   kernel and userland. Some code in x86/x86/identcpu.c and cpuctl/arch/i386.c
   will be moved to this file in future.
 - Add comment to clarify.

Revision 1.36.22.1 / (download) - annotate - [select for diffs], Wed Apr 15 14:25:09 2020 UTC (4 years ago) by martin
Branch: netbsd-8
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored) to selected 1.13.4.4 (colored)

Pull up the following, requested by msaitoh in ticket #1530:

	sys/arch/x86/x86/procfs_machdep.c		1.33-1.36
	sys/arch/x86/x86/tsc.c				1.40
	sys/arch/x86/x86/specialreg.h			1.159-1.161
	usr.sbin/cpuctl/arch/i386.c			1.109-1.110 via patch

- Print avx512ifma, cqm_mbm_total, cqm_mbm_local, waitpkg, rdpru,
  Fast Short Rep Mov(fsrm), AVX512_VP2INTERSECT, SERIALIZE and
  TSXLDTRK.
- Rename CPUID Fn8000_0007 %edx bit 8 from "TSC" to "ITSC"
  (Invariant TSC) to avoid confusion.
- Print CPUID 0x80000007 %edx on both Intel and AMD.
- Remove ci_max_ext_cpuid from usr.sbin/cpuctl/arch/i386.c because it's
  the same as ci_cpuid_extlevel.
- Use unsigned to avoid undefined behavior in procfs_getonefeatreg().

Revision 1.37.8.1 / (download) - annotate - [select for diffs], Tue Apr 14 17:15:02 2020 UTC (4 years ago) by martin
Branch: netbsd-9
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) to selected 1.13.4.4 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #833):

	usr.sbin/cpuctl/arch/i386.c: revision 1.109
	sys/arch/x86/include/specialreg.h: revision 1.159
	usr.sbin/cpuctl/arch/i386.c: revision 1.110
	sys/arch/x86/include/specialreg.h: revision 1.160
	sys/arch/x86/include/specialreg.h: revision 1.161
	sys/arch/x86/x86/tsc.c: revision 1.40
	sys/arch/x86/x86/procfs_machdep.c: revision 1.35
	sys/arch/x86/x86/procfs_machdep.c: revision 1.36

  Add Fast Short Rep Mov(fsrm).

Add AVX512_VP2INTERSECT, SERIALIZE and TSXLDTRK(TSX suspend load addr tracking)

  CPUID Fn00000001 %edx bit 8 is printed as "TSC", so rename CPUID Fn8000_0007
%edx bit 8 from "TSC" to "ITSC" (Invariant TSC) to avoid confusion.

  Rename CPUID_APM_TSC to CPUID_APM_ITSC. No functional change.

  Remove ci_max_ext_cpuid because it's the same as ci_cpuid_extlevel.

  Print CPUID 0x80000007 %edx on both Intel and AMD.

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.37: +8 -8 lines
Diff to previous 1.37 (colored) to selected 1.13.4.4 (colored)

Merge changes from current as of 20200406

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 6 09:24:50 2020 UTC (4 years ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored) to selected 1.13.4.4 (colored)

 Rename CPUID_APM_TSC to CPUID_APM_ITSC. No functional change.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Apr 3 03:05:39 2020 UTC (4 years ago) by knakahara
Branch: MAIN
Changes since 1.38: +6 -6 lines
Diff to previous 1.38 (colored) to selected 1.13.4.4 (colored)

Fix TSC drift is observed almost every time wrongly.

Ths "TSC drift" in tsc_tc_init() means the cpu_cc_skew delta between
first measurement (in cpu_start_secondary) and second measurement
(in cpu_boot_secondary), that is, the TSC drift is expected to be
almost zero.  However, the second measument in current implementation
is added extra cpu_cc_skew accidentally, so current delta value means
almost cpu_cc_skew wrongly.

tsc_sync_bp and tsc_sync_ap should use rdtsc() to get raw values.

Advised by nonaka@n.o, thanks.

Revision 1.37.10.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:33 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) next main 1.38 (colored) to selected 1.13.4.4 (colored)

Sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 21 00:26:22 2020 UTC (4 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) to selected 1.13.4.4 (colored)

Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.

Revision 1.30.12.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.30.12.1: +32 -0 lines
Diff to previous 1.30.12.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored) to selected 1.13.4.4 (colored)

update from HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Mon Oct 2 19:23:16 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: phil-wifi, netbsd-9, ad-namecache
Changes since 1.36: +34 -2 lines
Diff to previous 1.36 (colored) to selected 1.13.4.4 (colored)

Add a machdep.tsc_user_enable sysctl, to enable/disable the rdtsc
instruction in usermode. It defaults to enabled.

Revision 1.30.12.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:29 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.30: +60 -39 lines
Diff to previous 1.30 (colored) to selected 1.13.4.4 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.30: +60 -39 lines
Diff to previous 1.30 (colored) next main 1.31 (colored) to selected 1.13.4.4 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.31.2.1: +58 -40 lines
Diff to previous 1.31.2.1 (colored) next main 1.32 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.36 / (download) - annotate - [select for diffs], Wed Dec 18 03:20:19 2013 UTC (10 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored) to selected 1.13.4.4 (colored)

Fix comment.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Dec 11 02:14:08 2013 UTC (10 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.34: +24 -10 lines
Diff to previous 1.34 (colored) to selected 1.13.4.4 (colored)

 Make new function named tsc_is_invariant() to avoid code duplication.
The behavior of acpicpu_md_flags() will change on some CPUs because
the detecting code of invariant TSC is replaced with newer code.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Dec 8 04:07:38 2013 UTC (10 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.33: +34 -30 lines
Diff to previous 1.33 (colored) to selected 1.13.4.4 (colored)

 Update invariant TSC detect code from both Intel and AMD documents.
The best way to check whether the TSC counter is invariant or not is to check
CPUID 80000007.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 15 08:47:55 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.32: +8 -8 lines
Diff to previous 1.32 (colored) to selected 1.13.4.4 (colored)

 Modify some macros and add some new macros for CPU family and model
to reduce code duplication and to avoid bug.

CPUID_TO_STEPPING(cpuid)	(not changed)

CPUID_TO_FAMILY(cpuid)		(new)
CPUID_TO_MODEL(cpuid)		(new)

	Return the display family and the display model.
	The macro names are the same as FreeBSD.

CPUID_TO_BASEFAMILY(cpuid)	(The old name was CPUID2FAMILY)
CPUID_TO_BASEMODEL(cpuid)	(The old name was CPUID2MODEL)

	Only for the base field.

CPUID_TO_EXTFAMILY(cpuid)	(The old name was CPUID2EXTFAMILY)
CPUID_TO_EXTMODEL(cpuid)	(The old name was CPUID2EXTMODEL)

	Only for the extended field.

See http://mail-index.netbsd.org/port-amd64/2013/11/12/msg001978.html

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:24 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.31: +4 -5 lines
Diff to previous 1.31 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 2 00:01:17 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.31: +4 -5 lines
Diff to previous 1.31 (colored) to selected 1.13.4.4 (colored)

- remove unused variable
- call rdmsr() twice to avoid the 5.4210108624275222e-18% probability that
  rdmsr() returns 0.
From dsl@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 27 00:37:34 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
Branch point for: rmind-smpnet
Changes since 1.30: +7 -3 lines
Diff to previous 1.30 (colored) to selected 1.13.4.4 (colored)

detect a bad msr tsc and don't use it.

Revision 1.24.2.5 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:30 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.24.2.4: +2 -2 lines
Diff to previous 1.24.2.4 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Aug 8 17:00:23 2011 UTC (12 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jym-xensuspend-nbase, jym-xensuspend-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.29: +2 -22 lines
Diff to previous 1.29 (colored) to selected 1.13.4.4 (colored)

revert previous

Revision 1.29 / (download) - annotate - [select for diffs], Mon Aug 8 11:18:34 2011 UTC (12 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.28: +22 -2 lines
Diff to previous 1.28 (colored) to selected 1.13.4.4 (colored)

If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates that OSPM
should use a platform provided timer (either HPET or the PM timer). A
platform may set this flag if internal processor clock(s) cannot provide
consistent monotonically non-decreasing counters. Set TSC quality to -100
if this flag is set.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:07:09 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.27: +15 -6 lines
Diff to previous 1.27 (colored) next main 1.28 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Mon Mar 28 23:04:54 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.24.2.3: +15 -6 lines
Diff to previous 1.24.2.3 (colored) to branchpoint 1.24 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.

Revision 1.25.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:52:31 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.25.4.1: +16 -7 lines
Diff to previous 1.25.4.1 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.27.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:19:45 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.27: +15 -6 lines
Diff to previous 1.27 (colored) next main 1.28 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD

Revision 1.28 / (download) - annotate - [select for diffs], Wed Feb 2 12:26:42 2011 UTC (13 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: uebayasi-xip-base7, rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.27: +15 -6 lines
Diff to previous 1.27 (colored) to selected 1.13.4.4 (colored)

Some CPU have cpu counter (CPUID_TSC is there) but don't handle the
rdmsr instruction (CPUID_MSR is not there).
Introduce a cpu_counter_serializing() function to remplace rdmsr(MSR_TSC)
calls, which does a rdmsr(MSR_TSC) if available and cpu_counter() otherwise.
This makes the cpu counter useable on vortex86 CPUs.
OK ad@

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:20 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.24.2.2: +5 -5 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Fri Oct 22 07:21:43 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.25.2.1: +1 -1 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD (-D20101022).

Revision 1.13.4.5 / (download) - annotate - [select for diffs], Sat Oct 9 03:31:58 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.13.4.4: +3 -3 lines
Diff to previous 1.13.4.4 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

sync with head

Revision 1.27 / (download) - annotate - [select for diffs], Sat Aug 21 01:57:34 2010 UTC (13 years, 8 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.13.4.4 (colored)

Use a constant from <x86/specialreg.h>.

Revision 1.13.4.4 / (download) - annotate - [selected], Wed Aug 11 22:52:58 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.13.4.3: +4 -4 lines
Diff to previous 1.13.4.3 (colored) to branchpoint 1.13 (colored)

sync with head.

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:13 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:39:59 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Apr 18 23:47:51 2010 UTC (14 years ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored) to selected 1.13.4.4 (colored)

This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

- replace cpu_feature and ci_feature_flags variables by cpu_feature and
ci_feat_val arrays. This makes it cleaner and brings kernel code closer
to the design of cpuctl(8). A warning will be raised for each CPU that
does not expose the same features as the Boot Processor (BP).

- the blacklist of CPU features is now a macro defined in the
specialreg.h header, instead of hardcoding it inside MD initialization
code; fix comments.

- replace checks against CPUID_TSC with the cpu_hascounter() function.

- clean up the code in init_x86_64(), as cpu_feature variables are set
inside cpu_probe().

- use cpu_init_msrs() for i386. It will be eventually used later for NX
feature under i386 PAE kernels.

- remove code that checks for CPUID_NOX in amd64 mptramp.S, this is already
performed by cpu_hatch() through cpu_init_msrs().

- remove cpu_signature and feature_flags members from struct mpbios_proc
(they were never used).

This patch was tested with i386 MONOLITHIC, XEN3PAE_DOM0 and XEN3_DOM0 under
a native i386 host, and amd64 GENERIC, XEN3_DOM0 via QEMU virtual machines.

XXX Should kernel rev be bumped?

XXX A similar patch should be pulled-up for NetBSD-5, hopefully tomorrow.

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:18 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.24.2.1: +0 -0 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:18:45 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.24: +33 -13 lines
Diff to previous 1.24 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.13.4.3 / (download) - annotate - [select for diffs], Mon May 4 10:32:18 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.13.4.2: +2 -7 lines
Diff to previous 1.13.4.2 (colored) to branchpoint 1.13 (colored) to selected 1.13.4.4 (colored)

fix a merge botch.

Revision 1.13.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:11 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.13.4.1: +54 -21 lines
Diff to previous 1.13.4.1 (colored) to branchpoint 1.13 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:34:57 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.20.2.1: +33 -13 lines
Diff to previous 1.20.2.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 27 19:53:20 2009 UTC (15 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, uebayasi-xip-base, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, matt-premerge-20091211, jymxensuspend-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.24: +33 -13 lines
Diff to previous 1.24 (colored) to selected 1.13.4.4 (colored)

Rearrange TSC inter-CPU synchronization code so that the gory details
are dealt with in x86/tsc.c and callers don't have to care that much.
Also add some comments and make some variables static.
approved by ad (a while ago)

Revision 1.20.4.4 / (download) - annotate - [select for diffs], Mon Feb 2 19:41:50 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.20.4.3: +18 -7 lines
Diff to previous 1.20.4.3 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.13.4.4 (colored)

Pull up following revision(s) (requested by ad in ticket #362):
	sys/arch/x86/x86/tsc.c: revision 1.24
Bah, re-apply. I still see errors without it.

Revision 1.20.4.3 / (download) - annotate - [select for diffs], Mon Feb 2 19:41:10 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.20.4.2: +7 -18 lines
Diff to previous 1.20.4.2 (colored) to branchpoint 1.20 (colored) to selected 1.13.4.4 (colored)

Pull up following revision(s) (requested by ad in ticket #362):
	sys/arch/x86/x86/tsc.c: revision 1.23
Back out previous. atomic_cas_64() doesn't work during early boot. I'll
fix that instead.

Revision 1.20.4.2 / (download) - annotate - [select for diffs], Mon Feb 2 19:40:26 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.20.4.1: +18 -7 lines
Diff to previous 1.20.4.1 (colored) to branchpoint 1.20 (colored) to selected 1.13.4.4 (colored)

Pull up following revision(s) (requested by ad in ticket #362):
	sys/arch/x86/x86/tsc.c: revision 1.22
More paranoia.

Revision 1.20.4.1 / (download) - annotate - [select for diffs], Mon Feb 2 19:39:38 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored) to selected 1.13.4.4 (colored)

Pull up following revision(s) (requested by ad in ticket #362):
	sys/arch/x86/x86/tsc.c: revision 1.21
A fix for failed TSC calibration with the message "ERROR: %lld cycle TSC
drift observed".
On i386, cpu_cc_skew was written out as two 32-bit words. If unlucky, the
boot processor could read the whole 64-bit value after only 32-bits of the
update were written back to main memory.

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:09 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.20: +19 -8 lines
Diff to previous 1.20 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.11.14.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:38 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.14.3: +17 -6 lines
Diff to previous 1.11.14.3 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Dec 19 11:21:52 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.23: +18 -7 lines
Diff to previous 1.23 (colored) to selected 1.13.4.4 (colored)

Bah, re-apply. I still see errors without it.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Dec 19 11:11:55 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.22: +7 -18 lines
Diff to previous 1.22 (colored) to selected 1.13.4.4 (colored)

Back out previous. atomic_cas_64() doesn't work during early boot. I'll
fix that instead.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 15 12:46:28 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.21: +18 -7 lines
Diff to previous 1.21 (colored) to selected 1.13.4.4 (colored)

More paranoia.

Revision 1.19.4.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:39 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.19.4.1: +4 -4 lines
Diff to previous 1.19.4.1 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored) to selected 1.13.4.4 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Nov 25 15:40:30 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored) to selected 1.13.4.4 (colored)

A fix for failed TSC calibration with the message "ERROR: %lld cycle TSC
drift observed".

On i386, cpu_cc_skew was written out as two 32-bit words. If unlucky, the
boot processor could read the whole 64-bit value after only 32-bits of the
update were written back to main memory.

Revision 1.19.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:08 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.19: +6 -4 lines
Diff to previous 1.19 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.11.14.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:12 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.14.2: +4 -2 lines
Diff to previous 1.11.14.2 (colored) to branchpoint 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 04:33:38 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.15.2.2: +6 -4 lines
Diff to previous 1.15.2.2 (colored) next main 1.16 (colored) to selected 1.13.4.4 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 31 17:24:14 2008 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.19: +6 -4 lines
Diff to previous 1.19 (colored) to selected 1.13.4.4 (colored)

If tsc_freq is 0 (probably due to bad virtualization, as currently
seen under VirtualBox), don't try to use TSC as a timecounter source
to avoid trouble. Matches the FreeBSD behavior.

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Tue Jun 24 04:15:51 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.15.2.1: +150 -250 lines
Diff to previous 1.15.2.1 (colored) to selected 1.13.4.4 (colored)

Hand-merge files that didn't merge right in recent sync w/ current.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:30:51 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.15: +3 -6 lines
Diff to previous 1.15 (colored) to selected 1.13.4.4 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.11.14.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:52 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.14.1: +151 -253 lines
Diff to previous 1.11.14.1 (colored) to branchpoint 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:04 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.13: +152 -254 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:23:29 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.13: +156 -253 lines
Diff to previous 1.13 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.19 / (download) - annotate - [select for diffs], Sun May 11 12:41:13 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: haad-dm
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored) to selected 1.13.4.4 (colored)

Fix a potential hang during skew detection (not observed).

Revision 1.18 / (download) - annotate - [select for diffs], Sat May 10 16:44:00 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.17: +7 -6 lines
Diff to previous 1.17 (colored) to selected 1.13.4.4 (colored)

Assume that TSC is stable on P-II and P-III Xeons, since systems with those
CPUs are likely to have a TSC-friendly configuration.

Revision 1.17 / (download) - annotate - [select for diffs], Sat May 10 16:37:08 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored) to selected 1.13.4.4 (colored)

TSC should also be enabled for intel f03.

Revision 1.16 / (download) - annotate - [select for diffs], Sat May 10 16:12:32 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.15: +150 -254 lines
Diff to previous 1.15 (colored) to selected 1.13.4.4 (colored)

Improve x86 tsc handling:

- Ditch the cross-CPU calibration stuff. It didn't work properly, and it's
  near impossible to synchronize the CPUs in a running system, because bus
  traffic will interfere with any calibration attempt, messing up the
  timings.

- Only enable the TSC on CPUs where we are sure it does not drift. If we are
  On a known good CPU, give the TSC high timecounter quality, making it the
  default.

- When booting CPUs, detect TSC skew and account for it. Most Intel MP
  systems have synchronized counters, but that need not be true if the
  system has a complicated bus structure. As far as I know, AMD systems
  do not have synchronized TSCs and so we need to handle skew.

- While an AP is waiting to be set running, try and make the TSC drift by
  entering a reduced power state. If we detect drift, ensure that the TSC
  does not get a high timecounter quality. This should not happen and is
  only for safety.

- Make cpu_counter() stuff LKM safe.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:40 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.14: +2 -9 lines
Diff to previous 1.14 (colored) to selected 1.13.4.4 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.14 / (download) - annotate - [select for diffs], Sun Apr 27 22:43:08 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.13: +14 -6 lines
Diff to previous 1.13 (colored) to selected 1.13.4.4 (colored)

Make preemption safe.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 16 16:06:52 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-pf42-X, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.13.4.4 (colored)

- use aprint_*_dev and device_xname
- use POSIX integer types

Revision 1.11.14.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:31 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.11: +6 -5 lines
Diff to previous 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.11.10.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:15:09 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.11: +6 -5 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.10.28.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:28 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.10.28.1: +6 -5 lines
Diff to previous 1.10.28.1 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored) to selected 1.13.4.4 (colored)

sync with HEAD

Revision 1.5.6.5 / (download) - annotate - [select for diffs], Mon Mar 17 09:14:36 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.6.4: +6 -5 lines
Diff to previous 1.5.6.4 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 10 22:03:40 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.11: +6 -5 lines
Diff to previous 1.11 (colored) to selected 1.13.4.4 (colored)

Implement an optimized, preemption-safe asm version of tsc_get_timecount().
The C version needs work to be preemption safe. Cuts the clock cycles
for microtime() from 950 down to 300 on a Pentium D.

Revision 1.10.28.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:00 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.13.4.4 (colored)

sync with HEAD

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:22 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.10.34.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:47:04 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.10.32.1 / (download) - annotate - [select for diffs], Sun Nov 18 19:34:51 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD

Revision 1.5.6.4 / (download) - annotate - [select for diffs], Thu Nov 15 11:43:43 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.6.3: +3 -3 lines
Diff to previous 1.5.6.3 (colored) to branchpoint 1.5 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.10.26.1 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:17 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.13.4.4 (colored)

Sync with HEAD.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 14 14:51:03 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.13.4.4 (colored)

Use i8254_delay().

Revision 1.5.6.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:47:22 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.6.2: +9 -3 lines
Diff to previous 1.5.6.2 (colored) to branchpoint 1.5 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.6.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:16:43 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.6.6.1: +4 -4 lines
Diff to previous 1.6.6.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:29:39 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.6: +7 -3 lines
Diff to previous 1.6 (colored) next main 1.7 (colored) to selected 1.13.4.4 (colored)

Sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Nov 16 01:32:39 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-idlelwp-base8, yamt-idlelwp, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, ppcoea-renovation-base, ppcoea-renovation, post-newlock2-merge, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, mjf-ufs-trans-base, mjf-ufs-trans, matt-nb4-arm-base, matt-nb4-arm, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored) to selected 1.13.4.4 (colored)

__unused removal on arguments; approved by core.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:05:16 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.6: +9 -5 lines
Diff to previous 1.6 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 12 01:30:44 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored) to selected 1.13.4.4 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 23 18:43:56 2006 UTC (17 years, 6 months ago) by xtraeme
Branch: MAIN
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored) to selected 1.13.4.4 (colored)

Protect opt_powernow_k7.h with ifdef i386, I forget that it's only
available on i386...

Revision 1.7 / (download) - annotate - [select for diffs], Sat Sep 23 16:18:06 2006 UTC (17 years, 6 months ago) by xtraeme
Branch: MAIN
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored) to selected 1.13.4.4 (colored)

Do not use the TSC in POWERNOW_K[78] case (same behaviour than
enhanced speedstep), closes PR port-amd64/34550.

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:44:49 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.6.4.1: +323 -0 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.13.4.4 (colored)

sync with head

Revision 1.5.8.3 / (download) - annotate - [select for diffs], Sun Sep 3 15:23:37 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.5.8.2: +4 -2 lines
Diff to previous 1.5.8.2 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.6.4.1, Sun Sep 3 07:00:48 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.6: +0 -323 lines
FILE REMOVED

file tsc.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:44:49 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Sun Sep 3 07:00:48 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, rpaulo-netinet-merge-pcb, newlock2
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored) to selected 1.13.4.4 (colored)

add missing initializers

Revision 1.5.8.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:45:40 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.5.8.1: +321 -0 lines
Diff to previous 1.5.8.1 (colored) to branchpoint 1.5 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.5.6.2 / (download) - annotate - [select for diffs], Wed Jun 21 14:58:06 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5.6.1: +321 -0 lines
Diff to previous 1.5.6.1 (colored) to branchpoint 1.5 (colored) to selected 1.13.4.4 (colored)

sync with head.

Revision 1.5.4.2 / (download) - annotate - [select for diffs], Mon Jun 19 03:45:15 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.5.4.1: +321 -0 lines
Diff to previous 1.5.4.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored) to selected 1.13.4.4 (colored)

Sync with head.

Revision 1.5.8.1, Tue Jun 13 17:37:06 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.5: +0 -321 lines
FILE REMOVED

file tsc.c was added on branch yamt-pdpolicy on 2006-06-26 12:45:40 +0000

Revision 1.5.6.1, Tue Jun 13 17:37:06 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.5: +0 -321 lines
FILE REMOVED

file tsc.c was added on branch yamt-lazymbuf on 2006-06-21 14:58:06 +0000

Revision 1.5.4.1, Tue Jun 13 17:37:06 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.5: +0 -321 lines
FILE REMOVED

file tsc.c was added on branch chap-midi on 2006-06-19 03:45:15 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 13 17:37:06 2006 UTC (17 years, 10 months ago) by dogcow
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-pdpolicy, yamt-lazymbuf, chap-midi
Changes since 1.4: +2 -0 lines
Diff to previous 1.4 (colored) to selected 1.13.4.4 (colored)

...and since amd64 doesn't actually have enhanced speedstep (yet!), only
include the opt file on i386.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 13 17:30:05 2006 UTC (17 years, 10 months ago) by dogcow
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored) to selected 1.13.4.4 (colored)

we need opt_enhanced_speedstep.h to get whether ENHANCED_SPEEDSTEP is defined.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jun 10 20:50:02 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
Changes since 1.2: +7 -2 lines
Diff to previous 1.2 (colored) to selected 1.13.4.4 (colored)

Don't pick TSC by default on systems the have ENHANCED_SPEEDSTEP
compiled in. Many TSC's out there are sensitive to cpu frequency
changes. On these platforms we need to use other fixed frequency
timers (e. g. ACPI_PM_TIMER). Maybe we should add detection code
here whether TSC is sensible to cpu frequency changes.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 7 22:41:09 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
Changes since 1.1: +313 -0 lines
Diff to previous 1.1 (colored) to selected 1.13.4.4 (colored)

add timecounter support (from branch simonb-timecounters)

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Apr 30 17:56:44 2006 UTC (17 years, 11 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.1: +313 -0 lines
Diff to previous 1.1 (colored) next main 1.2 (colored) to selected 1.13.4.4 (colored)

- provide TSC for UNI and MP systems
  (shared between i386 and amd64)

Revision 1.1, Sun Apr 30 17:56:44 2006 UTC (17 years, 11 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, elad-kernelauth-nbase
Branch point for: simonb-timecounters
FILE REMOVED

file tsc.c was initially added on branch simonb-timecounters.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>