aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sysctl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 16:03:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 16:03:11 -0500
commit73b4f63aebd6d57db4ca1d31fa6f8516651207b0 (patch)
tree49adf7fb3b8f45d040f7e633ba34040541279c28 /Documentation/sysctl
parentbfe9183fdcc0575a648d1401facc649888a1f49a (diff)
parent52e68924dfa8d9de5d82f6798352eecc5f03a97d (diff)
Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6
Pull documentation updates from Jonathan Corbet: "Highlights this time around include: - A thrashing of SubmittingPatches to bring it out of the "send everything to Linus" era of kernel development. - A new document on completions from Nicholas McGuire - Lots of typo fixes, formatting improvements, corrections, build fixes, and more" * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (35 commits) Documentation: Fix the wrong command `echo -1 > set_ftrace_pid` for cleaning the filter. can-doc: Fixed a wrong filepath in can.txt Documentation: Fix trivial typo in comment. kgdb,docs: Fix typo and minor style issues Documentation: add description for FTRACE probe status doc: brief user documentation for completion Documentation/misc-devices/mei: Fix indentation of embedded code. Documentation/misc-devices/mei: Fix indentation of enumeration. Documentation/misc-devices/mei: Fix spacing around parentheses. Documentation/misc-devices/mei: Fix formatting of headings. Documentation: devicetree: Fix double words in Doumentation/devicetree Documentation: mm: Fix typo in vm.txt lockstat: Add documentation on contention and contenting points Documentation: fix blackfin gptimers-example build errors Fixes column alignment in table of contents entry 1.9 in Documentation/filesystems/proc.txt CodingStyle: enable emacs display of trailing whitespace DocBook: Do not exceed argument list limit gpio: board.txt: Fix the gpio name example Documentation/SubmittingPatches: unify whitespace/tabs for the DCO MAINTAINERS: Add the docs-next git tree to the maintainer entry ...
Diffstat (limited to 'Documentation/sysctl')
-rw-r--r--Documentation/sysctl/vm.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 4415aa915681..de3afef76837 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -728,7 +728,7 @@ The default value is 60.
728 728
729- user_reserve_kbytes 729- user_reserve_kbytes
730 730
731When overcommit_memory is set to 2, "never overommit" mode, reserve 731When overcommit_memory is set to 2, "never overcommit" mode, reserve
732min(3% of current process size, user_reserve_kbytes) of free memory. 732min(3% of current process size, user_reserve_kbytes) of free memory.
733This is intended to prevent a user from starting a single memory hogging 733This is intended to prevent a user from starting a single memory hogging
734process, such that they cannot recover (kill the hog). 734process, such that they cannot recover (kill the hog).
1cef8a908357793ca'>d683ef7afe8
bfc0f5947af
d683ef7afe8
bfc0f5947af
d683ef7afe8















bfc0f5947af
d683ef7afe8












a977c400957
cce3e057242
a977c400957





cce3e057242
ec0c15afb41






a977c400957
ec0c15afb41













a977c400957

ec0c15afb41



















a977c400957
ec0c15afb41




a977c400957
ec0c15afb41



a977c400957
ec0c15afb41


6ac40ed0413


































b6e61eef4f9






9e8912e04e6
6ac40ed0413
9e8912e04e6

bfc0f5947af
6ac40ed0413
b6e61eef4f9
6ac40ed0413
9e8912e04e6
6ac40ed0413
9e8912e04e6







6ac40ed0413


9e8912e04e6



6ac40ed0413
9e8912e04e6

bfc0f5947af
6ac40ed0413

9e8912e04e6



6ac40ed0413
bfc0f5947af

6ac40ed0413








bfc0f5947af
bfc0f5947af
6ac40ed0413



a6a80e1d8cf





b6e61eef4f9
a6a80e1d8cf
9e8912e04e6








b6e61eef4f9












6ac40ed0413
6ac40ed0413
9e8912e04e6
6ac40ed0413
9e8912e04e6





















6ac40ed0413
ec0c15afb41
bfc0f5947af
e93ef949fd9
bfc0f5947af
e93ef949fd9
bfc0f5947af
827014be05e
fbb16e24388
2d826404f0b
a977c400957
bfc0f5947af
6ac40ed0413

bfc0f5947af
6ac40ed0413

bfc0f5947af
fbb16e24388























a977c400957






ec0c15afb41
fbb16e24388


ec0c15afb41


fbb16e24388
ec0c15afb41
827014be05e
a977c400957
827014be05e
fbb16e24388

ec0c15afb41

fbb16e24388

827014be05e
fbb16e24388






d683ef7afe8
827014be05e
d683ef7afe8
827014be05e
fbb16e24388
fbb16e24388
a977c400957















fbb16e24388

a977c400957










fbb16e24388
bfc0f5947af

fbb16e24388
bfc0f5947af
fbb16e24388

de014d61763
fbb16e24388

827014be05e
fbb16e24388






a977c400957
fbb16e24388








bfc0f5947af
fbb16e24388
827014be05e
fbb16e24388

bfc0f5947af

fbb16e24388

a977c400957

fbb16e24388
bfc0f5947af

fbb16e24388


a977c400957
fbb16e24388
a977c400957

fbb16e24388

bfc0f5947af

bfc0f5947af





2d826404f0b
e93ef949fd9
bfc0f5947af












2dbe06faf37























84599f8a59e
2dbe06faf37
8fbbc4b45ce
2dbe06faf37
84599f8a59e
2dbe06faf37





84599f8a59e
2dbe06faf37



84599f8a59e
2dbe06faf37
84599f8a59e

2dbe06faf37

























931db6a32db
2dbe06faf37



931db6a32db
2dbe06faf37
931db6a32db
2dbe06faf37
2dbe06faf37









878f4f533e5
2dbe06faf37





52a8968ce95
2dbe06faf37









060700b5717



2dbe06faf37







8fbbc4b45ce
















8e19608e8b5
8fbbc4b45ce






431ceb83f70
8fbbc4b45ce

7d96fd41cad









8fbbc4b45ce



431ceb83f70
8fbbc4b45ce
1be39679489




8fbbc4b45ce



1be39679489
8fbbc4b45ce












7285dd7fd37
8fbbc4b45ce

7285dd7fd37


8fbbc4b45ce
7285dd7fd37
8fbbc4b45ce

























395628ef4ea

8fbbc4b45ce
395628ef4ea
8fbbc4b45ce
8fbbc4b45ce


395628ef4ea
8fbbc4b45ce
395628ef4ea
8fbbc4b45ce
395628ef4ea


8fbbc4b45ce









3e5095d1527
8fbbc4b45ce






















395628ef4ea

8fbbc4b45ce







08047c4f174





















































8fbbc4b45ce




845b3944bbd

8fbbc4b45ce


2d826404f0b
e93ef949fd9
8fbbc4b45ce
e93ef949fd9
8fbbc4b45ce



8fbbc4b45ce


8fbbc4b45ce
8fbbc4b45ce


















70de9a97049



8fbbc4b45ce






395628ef4ea
8fbbc4b45ce


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
                         



                         
                             
                          



                              
                        

                     



                      
                           
                    
                         
 
                                                                              
                       

                                   




                                                             
                                      



                                                       
                                           
 
                                    























                                                                          
                                          








































                                                                          
 








                                             





                                                                    
                                          






                                           
                                                                   
                    
                                                  






                                             
  
                                                  
   
                                                                      
 
                
 















                                                                     
 












                                           
                          
                                                           





                                                            
 






                                                      
                                                                                













                                                                    

                                 



















                                                      
                                                                




                                                              
                                                     



                                     
                          


                     


































                                                              






                                                   
                                                                                     
 

                    
 
                                                 
                                         
                              
                                   
         







                                                              


  



                                                    
   

                                                                                
 

                                              



                             
                                                

                                               








                                                         
                         
 



                             





                                                             
                          
 








                                                                       












                                                                     
                 
         
                                                
                 





















                                                               
 
 
   
                                                   
   
                                        
 
                                          
                                                                       
                                                       
                                                 
 

                                               
                                 

                                      
 























                                                                      






                                    
                                          


                                                                  


                                                                  
                   
                                      
                                                  
                                                                    
                                                  

                                         

                                                                

                                                 
                                            






                                                                         
                         
                                                               
                    
                                                                  
 
                                                                     















                                                                             

                 










                                                                      
         

          
                                 
           

                                              
                                                                              

                                                                      
                                              






                                                                               
                                            








                                                                         
 
                                                                                
                                      

                                                                       

         

                                                                          

                                                                            
                                   

         


                                                                   
                                                                  
           

                                                                                

                                                               

 





                                            
                                                       
                                  












                                                                  























                                                                              
                                                  
 
                                                            
 
                                                    





                                       
                                              



                                        
                      
                                                                        

                                                                             

























                                                                               
                           



                                                                    
                                             
                 
                                                 
                                                           









                                                                               
                                                                               





                                                                          
                                             









                                                            



                                                   







                                                               
















                                                                     
                                               






                                                  
                    

                                            









                                                                 



                                                             
      
 




                                       



                                             
                                             












                                                              
                                                                             

                                                                 


                                                                       
                                                   
                 

























                                                                      

                                                  
                       
                                        
                       


                                                                 
                                                                        
                                
                                             
      


                                                   









                                                                    
                 






















                                                                       

                                                                   







                                                                     





















































                                                                      




                          

                                       


                         
                                               
                          
 
                       



                                                                 


                                                                     
 


















                                                                    



                                    






                                                         
                                    


                               
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/timer.h>
#include <linux/acpi_pmtmr.h>
#include <linux/cpufreq.h>
#include <linux/dmi.h>
#include <linux/delay.h>
#include <linux/clocksource.h>
#include <linux/percpu.h>
#include <linux/timex.h>

#include <asm/hpet.h>
#include <asm/timer.h>
#include <asm/vgtod.h>
#include <asm/time.h>
#include <asm/delay.h>
#include <asm/hypervisor.h>
#include <asm/nmi.h>
#include <asm/x86_init.h>

unsigned int __read_mostly cpu_khz;	/* TSC clocks / usec, not used here */
EXPORT_SYMBOL(cpu_khz);

unsigned int __read_mostly tsc_khz;
EXPORT_SYMBOL(tsc_khz);

/*
 * TSC can be unstable due to cpufreq or due to unsynced TSCs
 */
static int __read_mostly tsc_unstable;

/* native_sched_clock() is called before tsc_init(), so
   we must start with the TSC soft disabled to prevent
   erroneous rdtsc usage on !cpu_has_tsc processors */
static int __read_mostly tsc_disabled = -1;

static int tsc_clocksource_reliable;
/*
 * Scheduler clock - returns current time in nanosec units.
 */
u64 native_sched_clock(void)
{
	u64 this_offset;

	/*
	 * Fall back to jiffies if there's no TSC available:
	 * ( But note that we still use it if the TSC is marked
	 *   unstable. We do this because unlike Time Of Day,
	 *   the scheduler clock tolerates small errors and it's
	 *   very important for it to be as fast as the platform
	 *   can achive it. )
	 */
	if (unlikely(tsc_disabled)) {
		/* No locking but a rare wrong value is not a big deal: */
		return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
	}

	/* read the Time Stamp Counter: */
	rdtscll(this_offset);

	/* return the value in ns */
	return __cycles_2_ns(this_offset);
}

/* We need to define a real function for sched_clock, to override the
   weak default version */
#ifdef CONFIG_PARAVIRT
unsigned long long sched_clock(void)
{
	return paravirt_sched_clock();
}
#else
unsigned long long
sched_clock(void) __attribute__((alias("native_sched_clock")));
#endif

int check_tsc_unstable(void)
{
	return tsc_unstable;
}
EXPORT_SYMBOL_GPL(check_tsc_unstable);

#ifdef CONFIG_X86_TSC
int __init notsc_setup(char *str)
{
	printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "
			"cannot disable TSC completely.\n");
	tsc_disabled = 1;
	return 1;
}
#else
/*
 * disable flag for tsc. Takes effect by clearing the TSC cpu flag
 * in cpu/common.c
 */
int __init notsc_setup(char *str)
{
	setup_clear_cpu_cap(X86_FEATURE_TSC);
	return 1;
}
#endif

__setup("notsc", notsc_setup);

static int __init tsc_setup(char *str)
{
	if (!strcmp(str, "reliable"))
		tsc_clocksource_reliable = 1;
	return 1;
}

__setup("tsc=", tsc_setup);

#define MAX_RETRIES     5
#define SMI_TRESHOLD    50000

/*
 * Read TSC and the reference counters. Take care of SMI disturbance
 */
static u64 tsc_read_refs(u64 *p, int hpet)
{
	u64 t1, t2;
	int i;

	for (i = 0; i < MAX_RETRIES; i++) {
		t1 = get_cycles();
		if (hpet)
			*p = hpet_readl(HPET_COUNTER) & 0xFFFFFFFF;
		else
			*p = acpi_pm_read_early();
		t2 = get_cycles();
		if ((t2 - t1) < SMI_TRESHOLD)
			return t2;
	}
	return ULLONG_MAX;
}

/*
 * Calculate the TSC frequency from HPET reference
 */
static unsigned long calc_hpet_ref(u64 deltatsc, u64 hpet1, u64 hpet2)
{
	u64 tmp;

	if (hpet2 < hpet1)
		hpet2 += 0x100000000ULL;
	hpet2 -= hpet1;
	tmp = ((u64)hpet2 * hpet_readl(HPET_PERIOD));
	do_div(tmp, 1000000);
	do_div(deltatsc, tmp);

	return (unsigned long) deltatsc;
}

/*
 * Calculate the TSC frequency from PMTimer reference
 */
static unsigned long calc_pmtimer_ref(u64 deltatsc, u64 pm1, u64 pm2)
{
	u64 tmp;

	if (!pm1 && !pm2)
		return ULONG_MAX;

	if (pm2 < pm1)
		pm2 += (u64)ACPI_PM_OVRRUN;
	pm2 -= pm1;
	tmp = pm2 * 1000000000LL;
	do_div(tmp, PMTMR_TICKS_PER_SEC);
	do_div(deltatsc, tmp);

	return (unsigned long) deltatsc;
}

#define CAL_MS		10
#define CAL_LATCH	(CLOCK_TICK_RATE / (1000 / CAL_MS))
#define CAL_PIT_LOOPS	1000

#define CAL2_MS		50
#define CAL2_LATCH	(CLOCK_TICK_RATE / (1000 / CAL2_MS))
#define CAL2_PIT_LOOPS	5000


/*
 * Try to calibrate the TSC against the Programmable
 * Interrupt Timer and return the frequency of the TSC
 * in kHz.
 *
 * Return ULONG_MAX on failure to calibrate.
 */
static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin)
{
	u64 tsc, t1, t2, delta;
	unsigned long tscmin, tscmax;
	int pitcnt;

	/* Set the Gate high, disable speaker */
	outb((inb(0x61) & ~0x02) | 0x01, 0x61);

	/*
	 * Setup CTC channel 2* for mode 0, (interrupt on terminal
	 * count mode), binary count. Set the latch register to 50ms
	 * (LSB then MSB) to begin countdown.
	 */
	outb(0xb0, 0x43);
	outb(latch & 0xff, 0x42);
	outb(latch >> 8, 0x42);

	tsc = t1 = t2 = get_cycles();

	pitcnt = 0;
	tscmax = 0;
	tscmin = ULONG_MAX;
	while ((inb(0x61) & 0x20) == 0) {
		t2 = get_cycles();
		delta = t2 - tsc;
		tsc = t2;
		if ((unsigned long) delta < tscmin)
			tscmin = (unsigned int) delta;
		if ((unsigned long) delta > tscmax)
			tscmax = (unsigned int) delta;
		pitcnt++;
	}

	/*
	 * Sanity checks:
	 *
	 * If we were not able to read the PIT more than loopmin
	 * times, then we have been hit by a massive SMI
	 *
	 * If the maximum is 10 times larger than the minimum,
	 * then we got hit by an SMI as well.
	 */
	if (pitcnt < loopmin || tscmax > 10 * tscmin)
		return ULONG_MAX;

	/* Calculate the PIT value */
	delta = t2 - t1;
	do_div(delta, ms);
	return delta;
}

/*
 * This reads the current MSB of the PIT counter, and
 * checks if we are running on sufficiently fast and
 * non-virtualized hardware.
 *
 * Our expectations are:
 *
 *  - the PIT is running at roughly 1.19MHz
 *
 *  - each IO is going to take about 1us on real hardware,
 *    but we allow it to be much faster (by a factor of 10) or
 *    _slightly_ slower (ie we allow up to a 2us read+counter
 *    update - anything else implies a unacceptably slow CPU
 *    or PIT for the fast calibration to work.
 *
 *  - with 256 PIT ticks to read the value, we have 214us to
 *    see the same MSB (and overhead like doing a single TSC
 *    read per MSB value etc).
 *
 *  - We're doing 2 reads per loop (LSB, MSB), and we expect
 *    them each to take about a microsecond on real hardware.
 *    So we expect a count value of around 100. But we'll be
 *    generous, and accept anything over 50.
 *
 *  - if the PIT is stuck, and we see *many* more reads, we
 *    return early (and the next caller of pit_expect_msb()
 *    then consider it a failure when they don't see the
 *    next expected value).
 *
 * These expectations mean that we know that we have seen the
 * transition from one expected value to another with a fairly
 * high accuracy, and we didn't miss any events. We can thus
 * use the TSC value at the transitions to calculate a pretty
 * good value for the TSC frequencty.
 */
static inline int pit_verify_msb(unsigned char val)
{
	/* Ignore LSB */
	inb(0x42);
	return inb(0x42) == val;
}

static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap)
{
	int count;
	u64 tsc = 0;

	for (count = 0; count < 50000; count++) {
		if (!pit_verify_msb(val))
			break;
		tsc = get_cycles();
	}
	*deltap = get_cycles() - tsc;
	*tscp = tsc;

	/*
	 * We require _some_ success, but the quality control
	 * will be based on the error terms on the TSC values.
	 */
	return count > 5;
}

/*
 * How many MSB values do we want to see? We aim for
 * a maximum error rate of 500ppm (in practice the
 * real error is much smaller), but refuse to spend
 * more than 25ms on it.
 */
#define MAX_QUICK_PIT_MS 25
#define MAX_QUICK_PIT_ITERATIONS (MAX_QUICK_PIT_MS * PIT_TICK_RATE / 1000 / 256)

static unsigned long quick_pit_calibrate(void)
{
	int i;
	u64 tsc, delta;
	unsigned long d1, d2;

	/* Set the Gate high, disable speaker */
	outb((inb(0x61) & ~0x02) | 0x01, 0x61);

	/*
	 * Counter 2, mode 0 (one-shot), binary count
	 *
	 * NOTE! Mode 2 decrements by two (and then the
	 * output is flipped each time, giving the same
	 * final output frequency as a decrement-by-one),
	 * so mode 0 is much better when looking at the
	 * individual counts.
	 */
	outb(0xb0, 0x43);

	/* Start at 0xffff */
	outb(0xff, 0x42);
	outb(0xff, 0x42);

	/*
	 * The PIT starts counting at the next edge, so we
	 * need to delay for a microsecond. The easiest way
	 * to do that is to just read back the 16-bit counter
	 * once from the PIT.
	 */
	pit_verify_msb(0);

	if (pit_expect_msb(0xff, &tsc, &d1)) {
		for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) {
			if (!pit_expect_msb(0xff-i, &delta, &d2))
				break;

			/*