The stuff in sys_stime I meant to remove! However, it just eliminates
the guts of stime and uses settimeofday instead. This is a goodness (TM)
as we now have one fewer place where the clock is set!
Actually, I'm now getting concerned about interrupts happening
between doing the LATCH and the RDTSC. [pause to try an experiment]
Yup -- adding a cli() / restore pair around the crucial code
in pentium_timer_interrupt helps a lot.
I attach a chunk of code that can be used to test any
kernel time implementation. It is truly horrible code.
The way it works is to construct a user space emulation of
clock_gettime based on reading the TSC, and then comparing this
with gettimeofday. This code can be compiled with 'cc -O2'.
I'm not going to explain the output, except to say that if it
says 'This is not good at all!', then there are problems with
the kernel timing code. There are various things that can be
tweaked.
Philip
Andrew Derrick Balsa wrote:
>
> Hi Philip,
>
> On Mon, 13 Jul 1998, Philip Gladstone wrote:
> >>Hi,
> >
> >This code suffers from the same problem that all the existing
> >do_fast code suffers from -- namely, the assumption that the timer
> >interrupt is processed exactly on the 100Hz tick.
>
> You are right. :-)
>
> Even the "top half" of the timer interrupt sometimes doesn't run immediately,
> when e.g. a driver has disabled interrupts and is waiting for something to
> happen.
>
> >
> >The attached patch fixes the problem for 2.0.3x series kernels
> >and has been running for a time without problems. It also includes
> >a debugging function (do_both_gettimeoffset) that can be used
> >to demonstrate the problem.
>
> Looks very good, specially the debugging function.
> >
> >The trick is to record (using the do_slow mechanism) the time
> >when the interrupt is actually taken, and then factor that into
> >the calculation.
>
> Excellent, and the cost is not high at all (2 I/O cycles every 10 ms).
>
> Just one microscopic knitpicking, if you allow me: since reading the TSC is
> *much* faster than latching the 8253/82C54 CTC, it should come first.
>
> And a question:
> What are and why did you do those changes in /kernel/time.c? (I mean, I
> understood those in /arch/i386/kernel/time.c)
>
> Cheers,
> ---------------------
> Andrew D. Balsa
> andrebalsa@altern.org
-- Philip Gladstone +1 781 530 2461 Raptor Systems / Axent Technologies Waltham, MA http://www.raptor.com/ --------------E8CB033E5C0D7E12FA64F126 Content-Type: application/x-unknown-content-type-cfile; name="pent_time.c" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="pent_time.c"LyoKICoKICogQ29weXJpZ2h0IChDKSBSYXB0b3IgU3lzdGVtcyAxOTk4LiBBIGJ1c2luZXNz IHVuaXQgb2YgQXhlbnQgVGVjaG5vbG9naWVzLgogKiBiYXNlZCBvbiBMaW51eCBrZXJuZWwg Y29kZS4KICogCiAqCiAqICAgICAgVGhpcyBwcm92aWRlcyBlbXVsYXRpb24gb2YgdGltZSBh bmQgZ2V0dGltZW9mZGF5IGluIHVzZXIgc3BhY2UuCiAqICAgICAgVGhpcyBpcyBkb25lIGFz IGZvbGxvd3M6CiAqICAgICAgICAgICAgICAKICogICAgICAgICAgICAgIGlmIHdlIGRvbid0 IGhhdmUgYW4gZXN0aW1hdGUgb2YgdGhlIGNsb2NrIHJhdGUKICogICAgICAgICAgICAgICAg ICAgICAgZ2V0IHRoZSB0aW1lIG5vdywgd2l0aCBUU0MKICogICAgICAgICAgICAgICAgICAg ICAgaWYgd2Ugc3RpbGwgZG9uJ3QgaGF2ZSBhbiBlc3RpbWF0ZSwKICogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0CiAqICAgICAgICAgICAgICBnZXQgdGhl IFRTQyBhbmQgY2FsY3VsYXRlIGRpZmZlcmVuY2Ugc2luY2UgbGFzdAogKiAgICAgICAgICAg ICAgICAgICAgICBhYnNvbHV0ZSB0aW1lIHJlZmVyZW5jZS4KICogICAgICAgICAgICAgIGlm IGRpZmZlcmVuY2UgPjAgJiYgPCAxIHNlY29uZAogKiAgICAgICAgICAgICAgICAgICAgICBp bnRlcnBvbGF0ZSBzaW5jZSBsYXN0IHJlZmVyZW5jZQogKiAgICAgICAgICAgICAgICAgICAg ICByZXR1cm4KICogICAgICAgICAgICAgIGdldCBhYnNvbHV0ZSB0aW1lCiAqICAgICAgICAg ICAgICB1cGRhdGUgcmVmZXJlbmNlCiAqICAgICAgICAgICAgICB1cGRhdGUgY2xvY2sgcmF0 ZSAoaWYgbmV3IHJhdGUgaXMgdmFsaWQpLgogKiAgICAgICAgICAgICAgcmV0dXJuCiAqCiAq IAogKi8KCiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8ZmNudGwuaD4KI2luY2x1ZGUg PHN5cy90aW1lLmg+CgojaW5jbHVkZSA8c3lzL3V0c25hbWUuaD4KCnR5cGVkZWYgc3RydWN0 IHsKICAgIHVuc2lnbmVkIGludCBwYXJ0X2w7CiAgICB1bnNpZ25lZCBpbnQgcGFydF9oOwp9 IFRTOwoKVFMgZ3RfbGFzdF9hYnM7CnN0cnVjdCB0aW1lc3BlYyBndF9sYXN0X3RzOwoKVFMg Z3RfYmFzZV9hYnM7CnN0cnVjdCB0aW1lc3BlYyBndF9iYXNlX3RzOwoKc3RhdGljIHVuc2ln bmVkIGludCBjeWNsZXNfcGVyX3NlY29uZDsKc3RhdGljIHVuc2lnbmVkIGludCBxdW90aWVu dDsKCiNkZWZpbmUgU1lNQk9MX05BTUVfU1RSKHgpICAgICAgI3gKCmludCBtYXhlcnIgPSAx MDA7IC8qIGluIDEwIG5zZWNzICovCmludCBhY3RlcnIgPSAwOwppbnQgZXJyZGlzcGxheWVk ID0gMDsKCnN0YXRpYyBpbnQgbWluY3ljbGVzID0gMjAwMDsKCmludCBtZW1mZDsKdW5zaWdu ZWQgaW50IGNxYV9hZGRyOwoKCmludCBza2V3ID0gNTsgICAgICAgICAgIC8qIDAgLSAxNiAq LwoKCnN0YXRpYyB2b2lkCnVwZGF0ZV9jbG9ja19yYXRlKHN0cnVjdCB0aW1lc3BlYyAqdHMs IHVuc2lnbmVkIGludCByX2VheCwgdW5zaWduZWQgaW50IHJfZWR4KQp7CiAgICBpZiAoZ3Rf YmFzZV90cy50dl9zZWMpIHsKICAgICAgICBpbnQgdXNlY3MgPSAodHMtPnR2X3NlYyAtIGd0 X2Jhc2VfdHMudHZfc2VjKSAqIDEwMDAwMDAgKwogICAgICAgICAgICAgICAgICAgICh0cy0+ dHZfbnNlYyAtIGd0X2Jhc2VfdHMudHZfbnNlYykgLyAxMDAwOwoKICAgICAgICBpZiAodXNl Y3MgPCAwKSB7CiAgICAgICAgICAgIGd0X2Jhc2VfdHMudHZfc2VjID0gMDsKICAgICAgICAg ICAgcXVvdGllbnQgPSAwOwogICAgICAgIH0gZWxzZSBpZiAodXNlY3MgPiA2MDAwMDAwMCkg eyAgLyogNjAgc2Vjb25kcyAqLwogICAgICAgICAgICBndF9iYXNlX3RzLnR2X3NlYyA9IDA7 CiAgICAgICAgfSBlbHNlIGlmICh1c2VjcyA+IDUwMDAwMDApIHsKICAgICAgICAgICAgdW5z aWduZWQgaW50IG5lYXgsIG5lZHg7CgogICAgICAgICAgICBfX2FzbV9fKCJzdWJsICJTWU1C T0xfTkFNRV9TVFIoZ3RfYmFzZV9hYnMpIiwlMFxuXHQiCiAgICAgICAgICAgICAgICAgICAg InNiYmwgIlNZTUJPTF9OQU1FX1NUUihndF9iYXNlX2FicykiKzQsJTEiCiAgICAgICAgICAg ICAgICAgICAgOiI9YSIgKG5lYXgpLCAiPWQiIChuZWR4KQogICAgICAgICAgICAgICAgICAg IDoiMCIgKHJfZWF4KSwgIjEiIChyX2VkeCkpOwoKICAgICAgICAgICAgLyogTm93IGhhdmUg dGhlIGRpZmZlcmVuY2UgKi8KCiAgICAgICAgICAgIF9fYXNtX18oIm11bGwgJTIiCiAgICAg ICAgICAgICAgICAgICAgOiI9YSIgKG5lYXgpLCAiPWQiIChuZWR4KQogICAgICAgICAgICAg ICAgICAgIDoiciIgKDEwMDAwMDApLAogICAgICAgICAgICAgICAgICAgICAiMCIgKG5lYXgp LCAiMSIgKG5lZHgpKTsKCiAgICAgICAgICAgIC8qIE5vdyBoYXZlIG9uZSBtaWxsaW9uIHRp bWVzIHRoZSBkaWZmZXJlbmNlICovCgogICAgICAgICAgICBfX2FzbV9fKCJkaXZsICUyIgog ICAgICAgICAgICAgICAgICAgIDoiPWEiIChuZWF4KSwgIj1kIiAobmVkeCkKICAgICAgICAg ICAgICAgICAgICA6InIiICh1c2VjcyksCiAgICAgICAgICAgICAgICAgICAgICIwIiAobmVh eCksICIxIiAobmVkeCkpOwoKICAgICAgICAgICAgLyogTm93IGhhdmUgY3ljbGVzL3NlYyAq LwogICAgICAgICAgICBpZiAobmVheCA8IDEwMDAwMDAwMCB8fCBuZWF4ID4gMTAwMDAwMDAw MCkgewogICAgICAgICAgICAgICAgLyogQ2xvY2sgcmF0ZSBvdXQgb2YgcmFuZ2UgKi8KICAg ICAgICAgICAgICAgIGd0X2Jhc2VfdHMudHZfc2VjID0gMDsKICAgICAgICAgICAgfSBlbHNl IHsKICAgICAgICAgICAgICAgIC8qIENsb2NrIHJhdGUgaW4gcmFuZ2UgKi8KICAgICAgICAg ICAgICAgIGN5Y2xlc19wZXJfc2Vjb25kID0gbmVheDsKCiAgICAgICAgICAgICAgICBuZWF4 ID0gMDsKICAgICAgICAgICAgICAgIG5lZHggPSAxMDAwMDAwMDA7CgoJCV9fYXNtX18oImRp dmwgJTIiCgkJCToiPWEiIChuZWF4KSwgIj1kIiAobmVkeCkKCQkJOiJyIiAoY3ljbGVzX3Bl cl9zZWNvbmQpLAoJCQkgIjAiIChuZWF4KSwgIjEiIChuZWR4KSk7CgogICAgICAgICAgICAg ICAgcXVvdGllbnQgPSBuZWF4OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSBlbHNl IHsKICAgICAgICBndF9iYXNlX2Ficy5wYXJ0X2wgPSByX2VheDsKICAgICAgICBndF9iYXNl X2Ficy5wYXJ0X2ggPSByX2VkeDsKICAgICAgICBndF9iYXNlX3RzID0gKnRzOwogICAgfQog ICAgZ3RfbGFzdF9hYnMucGFydF9sID0gcl9lYXg7CiAgICBndF9sYXN0X2Ficy5wYXJ0X2gg PSByX2VkeDsKICAgIGd0X2xhc3RfdHMgPSAqdHM7CiNpZiAwCiAgICBmcHJpbnRmKHN0ZGVy ciwgIlUiKTsKI2VuZGlmCn0KCmludAp1c2VyX2Nsb2NrX2dldHRpbWUoaW50IGp1bmssIHN0 cnVjdCB0aW1lc3BlYyAqdHMpCnsKICAgIHVuc2lnbmVkIGludCByX2VheCwgcl9lZHg7CiAg ICB1bnNpZ25lZCBpbnQgcl9lYXgxLCByX2VkeDE7CiAgICBzdGF0aWMgaW50IGlzX3BlbnRp dW0gPSAwOwogICAgc3RydWN0IHRpbWV2YWwgdHY7CgogICAgaWYgKHF1b3RpZW50KSB7CiAg ICAgICAgLyogUmVhZCB0aGUgdGltZSBjb3VudGVyICovCiAgICAgICAgX19hc21fXygiLmJ5 dGUgMHgwZiwweDMxIgogICAgICAgICAgICAgICAgOiI9YSIgKHJfZWF4KSwgIj1kIiAocl9l ZHgpKTsKCiAgICAgICAgX19hc21fXygic3VibCAiU1lNQk9MX05BTUVfU1RSKGd0X2xhc3Rf YWJzKSIsJTBcblx0IgogICAgICAgICAgICAgICAgInNiYmwgIlNZTUJPTF9OQU1FX1NUUihn dF9sYXN0X2FicykiKzQsJTEiCiAgICAgICAgICAgICAgICA6Ij1hIiAocl9lYXgpLCAiPWQi IChyX2VkeCkKICAgICAgICAgICAgICAgIDoiMCIgKHJfZWF4KSwgIjEiIChyX2VkeCkpOwoK ICAgICAgICBpZiAoIXJfZWR4ICYmIHJfZWF4IDwgY3ljbGVzX3Blcl9zZWNvbmQpIHsKICAg ICAgICAgICAgdW5zaWduZWQgaW50IG4xMHNlYzsKCiAgICAgICAgICAgIF9fYXNtX18oIm11 bGwgJTIiCiAgICAgICAgICAgICAgICAgICAgOiI9YSIgKHJfZWF4KSwgIj1kIiAocl9lZHgp CiAgICAgICAgICAgICAgICAgICAgOiJyIiAocXVvdGllbnQpLAogICAgICAgICAgICAgICAg ICAgICAiMCIgKHJfZWF4KSwgIjEiIChyX2VkeCkpOwoKICAgICAgICAgICAgbjEwc2VjID0g cl9lZHggKyBndF9sYXN0X3RzLnR2X25zZWMgLyAxMDsKCiAgICAgICAgICAgIGlmIChuMTBz ZWMgPj0gMTAwMDAwMDAwKSB7CiAgICAgICAgICAgICAgICB0cy0+dHZfbnNlYyA9IChuMTBz ZWMgLSAxMDAwMDAwMDApICogMTA7CiAgICAgICAgICAgICAgICB0cy0+dHZfc2VjID0gZ3Rf bGFzdF90cy50dl9zZWMgKyAxOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAg ICAgdHMtPnR2X25zZWMgPSBuMTBzZWMgKiAxMDsKICAgICAgICAgICAgICAgIHRzLT50dl9z ZWMgPSBndF9sYXN0X3RzLnR2X3NlYzsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmV0 dXJuIDA7CiAgICAgICAgfQoKICAgICAgICBpZiAocl9lZHggPCAwKQogICAgICAgICAgICBx dW90aWVudCA9IDA7CiAgICB9CgogICAgX19hc21fXygiLmJ5dGUgMHgwZiwweDMxIgogICAg ICAgICAgICA6Ij1hIiAocl9lYXgpLCAiPWQiIChyX2VkeCkpOwoKICAgIC8qIHNrZXcgaXMg dGhlIGRpc3RhbmNlIGludG8gdGhlIGdldHRpbWVvZmRheSB3aGVyZSB0aGUgcmVhZCBoYXBw ZW5zICovCiAgICAvKiAwIGlzIG5lYXIgdGhlIHN0YXJ0ICovCiAgICBnZXR0aW1lb2ZkYXko JnR2LCAwKTsKCiAgICBfX2FzbV9fKCIuYnl0ZSAweDBmLDB4MzEiCiAgICAgICAgICAgIDoi PWEiIChyX2VheDEpLCAiPWQiIChyX2VkeDEpKTsKCiAgICB0cy0+dHZfc2VjID0gdHYudHZf c2VjOwogICAgdHMtPnR2X25zZWMgPSB0di50dl91c2VjICogMTAwMCArIDUwMCAvKiBvbiBh dmVyYWdlICovOwoKICAgIGlmIChyX2VkeCA9PSByX2VkeDEpIHsKICAgICAgICBpZiAocl9l YXgxID4gcl9lYXgpIHsKICAgICAgICAgICAgaWYgKHJfZWF4MSAtIHJfZWF4IDwgbWluY3lj bGVzKSB7CiAgICAgICAgICAgICAgICBtaW5jeWNsZXMgPSAoKHJfZWF4MSAtIHJfZWF4KSAq IDMpIC8gMjsKCiNpZiAxCiAgICAgICAgICAgICAgICB1cGRhdGVfY2xvY2tfcmF0ZSh0cywg KHJfZWF4ID4+IDQpICogKDE2IC0gc2tldykgKyAocl9lYXgxID4+IDQpICogc2tldywgcl9l ZHgpOwojZWxzZQogICAgICAgICAgICAgICAgdXBkYXRlX2Nsb2NrX3JhdGUodHMsIHJfZWF4 LCByX2VkeCk7CiNlbmRpZgogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIHJl dHVybiAwOwp9Cgp2b2lkIGFmdGVyKHN0cnVjdCB0aW1lc3BlYyAqdiwgc3RydWN0IHRpbWVz cGVjICpvbGRlciwgY2hhciAqc3RyKSAKewogICAgaW50IG9kaWZmID0gKHYtPnR2X3NlYyAt IG9sZGVyLT50dl9zZWMpICogMTAwMDAwMDAwICsgKHYtPnR2X25zZWMgLSBvbGRlci0+dHZf bnNlYykgLyAxMDsKCiAgICBpZiAob2RpZmYgPCAtbWF4ZXJyKSB7CiAgICAgICAgZnByaW50 ZihzdGRlcnIsICJcbiVzOiAlZC4lMDlkIGlzIGJlZm9yZSAlZC4lMDlkICglZDAgbnNlY3Mp Iiwgc3RyLAogICAgICAgICAgICAgICAgdi0+dHZfc2VjLCB2LT50dl9uc2VjLCBvbGRlci0+ dHZfc2VjLCBvbGRlci0+dHZfbnNlYywgLW9kaWZmKTsKICAgICAgICBlcnJkaXNwbGF5ZWQr KzsKICAgIH0KCiAgICBpZiAob2RpZmYgPCAtYWN0ZXJyKSB7CiAgICAgICAgaW50IGNxOwoK ICAgICAgICBhY3RlcnIgPSAtb2RpZmY7CiAgICAgICAgZnByaW50ZihzdGRlcnIsICJcbiVz OiAlZC4lMDlkIGJlZm9yZSAlZC4lMDlkICglZDAgbnNlY3MpIiwgc3RyLAogICAgICAgICAg ICAgICAgdi0+dHZfc2VjLCB2LT50dl9uc2VjLCBvbGRlci0+dHZfc2VjLCBvbGRlci0+dHZf bnNlYywgLW9kaWZmKTsKICAgICAgICAKI2lmIDAKICAgICAgICBpZiAobWVtZmQgPj0gMCkg ewogICAgICAgICAgICBsc2VlayhtZW1mZCwgY3FhX2FkZHIsIDApOwogICAgICAgICAgICBy ZWFkKG1lbWZkLCAmY3EsIDQpOwogICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIiBjcT0l ZCIsIGNxKTsKICAgICAgICB9CiNlbmRpZgogICAgfQp9CgptYWluKCkKewogICAgc3RydWN0 IHRpbWV2YWwgdHYsIHN5c3R2OwogICAgc3RydWN0IHRpbWV2YWwgdF9zdGFydCwgdF9lbmQ7 CiAgICBzdHJ1Y3QgdGltZXNwZWMgdHMsIHN5c3RzOwogICAgaW50IGk7CgoKICAgIGZvciAo aSA9IDA7IGkgPCAxMDA7IGkrKykgewogICAgICAgIHVzZXJfY2xvY2tfZ2V0dGltZSgwLCAm dHMpOwogICAgICAgIGdldHRpbWVvZmRheSgmc3lzdHYsIDApOwojaWYgMQogICAgICAgIHBy aW50ZigidXNlci0+JWQuJTA5ZCwgc3lzLT4lZC4lMDZkLCBkaWZmPSVkIG5zZWNzLCBjcHM9 JWRcbiIsCiAgICAgICAgICAgICAgICB0cy50dl9zZWMsIHRzLnR2X25zZWMsIHN5c3R2LnR2 X3NlYywgc3lzdHYudHZfdXNlYywKICAgICAgICAgICAgICAgIChzeXN0di50dl9zZWMgLSB0 cy50dl9zZWMpICogMTAwMDAwMDAwMCArCiAgICAgICAgICAgICAgICBzeXN0di50dl91c2Vj ICogMTAwMCAtIHRzLnR2X25zZWMsIGN5Y2xlc19wZXJfc2Vjb25kKTsKI2VuZGlmCgogICAg ICAgIHVzbGVlcCgxMDAwMDApOwogICAgfQoKewogICAgRklMRSAqY3FhOwogICAgY3FhID0g cG9wZW4oImdyZXAgY2FjaGVkX3F1b3RpZW50IC9ib290L1N5c3RlbS5tYXAiLCAiciIpOwog ICAgaWYgKGNxYSkgewogICAgICAgIGlmIChmc2NhbmYoY3FhLCAiJXgiLCAmY3FhX2FkZHIp ID09IDEpIHsKICAgICAgICAgICAgbWVtZmQgPSBvcGVuKCIvZGV2L21lbSIsIE9fUkRPTkxZ KTsKCiAgICAgICAgICAgIGlmIChtZW1mZCA+PSAwKSB7CiAgICAgICAgICAgICAgICB1bnNp Z25lZCBpbnQgdmFsOwoKICAgICAgICAgICAgICAgIGxzZWVrKG1lbWZkLCBjcWFfYWRkciwg MCk7CiAgICAgICAgICAgICAgICBpZiAocmVhZChtZW1mZCwgJnZhbCwgc2l6ZW9mKHZhbCkp ID09IDQpIHsKICAgICAgICAgICAgICAgICAgICBwcmludGYoIkNhY2hlZCBxdW90aWVudCA9 ICVkLCBvdXIgcXVvdGllbnQgPSAlZFxuIiwKICAgICAgICAgICAgICAgICAgICAgICAgdmFs LCBxdW90aWVudCk7CiAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCJEaWZmZXJlbmNlIGFt b3VudHMgdG8gJWRucyBwZXIgc2Vjb25kXG4iLAogICAgICAgICAgICAgICAgICAgICAgICAo dmFsICogMTAwIC0gcXVvdGllbnQpICogMTAwMDAwMDAgLyAocXVvdGllbnQgLyAxMDApKTsK ICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcGNs b3NlKGNxYSk7CiAgICB9Cn0KCgogICAgLyogQ2hlY2sgbW9udG9uaWNpdHkgKi8KCiAgICBn ZXR0aW1lb2ZkYXkoJnN5c3R2LCAwKTsKICAgIHN5c3RzLnR2X3NlYyA9IHN5c3R2LnR2X3Nl YzsKICAgIHN5c3RzLnR2X25zZWMgPSBzeXN0di50dl91c2VjICogMTAwMDsKCiAgICBmb3Ig KGkgPSAwOyBpIDwgMTAwMDAwMDAgJiYgZXJyZGlzcGxheWVkIDwgMTAwOyBpKyspIHsKCiAg ICAgICAgdXNlcl9jbG9ja19nZXR0aW1lKDAsICZ0cyk7CgogICAgICAgIGFmdGVyKCZ0cywg JnN5c3RzLCAidSBhZnRlciBrIik7IAoKICAgICAgICBnZXR0aW1lb2ZkYXkoJnN5c3R2LCAw KTsKICAgICAgICBzeXN0cy50dl9zZWMgPSBzeXN0di50dl9zZWM7CiAgICAgICAgc3lzdHMu dHZfbnNlYyA9IHN5c3R2LnR2X3VzZWMgKiAxMDAwICsgOTk5OyAgICAgLyogV2UgZG9uJ3Qg a25vdyBxdWl0ZSB3aGVuICovCgogICAgICAgIGFmdGVyKCZzeXN0cywgJnRzLCAiayBhZnRl ciB1Iik7IAoKICAgICAgICBzeXN0cy50dl9uc2VjID0gc3lzdHYudHZfdXNlYyAqIDEwMDA7 CgogICAgICAgIGlmICgoaSAlIDEwMDAwKSA9PSAwKSB7CiAgICAgICAgICAgIGZwcmludGYo c3RkZXJyLCAiLiIpOwogICAgICAgIH0KICAgIH0KCiAgICBmcHJpbnRmKHN0ZGVyciwgIlxu VGhlIGxhcmdlc3QgZXJyb3Igd2FzICVkMG5zZWNzICVzXG4iLCBhY3RlcnIsIChhY3RlcnIg PCAxMDAgPyAiKHdoaWNoIHNlZW1zIE9LKSIgOiAiKHdoaWNoIGlzIG5vdCBnb29kKSIpKTsK ICAgIGlmIChlcnJkaXNwbGF5ZWQgPj0gMTAwKSB7CiAgICAgICAgZnByaW50ZihzdGRlcnIs ICJUaGVyZSB3ZXJlICVkIGVycm9ycyBpbiAlZCB0ZXN0cy4gVGhpcyBpcyBub3QgZ29vZCBh dCBhbGwhXG4iLCBlcnJkaXNwbGF5ZWQsIGkpOwogICAgfQogICAgZnByaW50ZihzdGRlcnIs ICJDeWNsZSBsaW1pdCBmb3Igc3lzdGVtIGdldHRpbWVvZmRheSA9ICVkXG4iLCBtaW5jeWNs ZXMpOwogICAgaWYgKG1lbWZkID49IDApIHsKICAgICAgICB1bnNpZ25lZCBpbnQgY3E7CiAg ICAgICAgbHNlZWsobWVtZmQsIGNxYV9hZGRyLCAwKTsKICAgICAgICByZWFkKG1lbWZkLCAm Y3EsIDQpOwogICAgICAgIGZwcmludGYoc3RkZXJyLCAiZmluYWwgY3E9JWRcbiIsIGNxKTsK ICAgIH0KCn0K --------------E8CB033E5C0D7E12FA64F126--
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html