Re: [git pull] timer fix

From: Ingo Molnar
Date: Wed Feb 04 2009 - 17:59:26 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> } while ((s32)(hpet_readl(HPET_COUNTER) - hpet_t1_cmp) > 0);

that is also more efficient code by 6 bytes:

before:

ffffffff81020856: ff c3 inc %ebx
ffffffff81020858: 48 05 f0 00 00 00 add $0xf0,%rax
ffffffff8102085e: 8b 00 mov (%rax),%eax
ffffffff81020860: 8b 15 2a 79 85 00 mov 0x85792a(%rip),%edx # ffffffff81878190 <hpet_t1_cmp>
ffffffff81020866: 89 c0 mov %eax,%eax
ffffffff81020868: 48 29 d0 sub %rdx,%rax
ffffffff8102086b: 48 85 c0 test %rax,%rax
ffffffff8102086e: 7f bf jg ffffffff8102082f <hpet_rtc_interrupt+0x68>
ffffffff81020870: 85 db test %ebx,%ebx

after:

ffffffff81020856: ff c3 inc %ebx
ffffffff81020858: 48 05 f0 00 00 00 add $0xf0,%rax
ffffffff8102085e: 8b 00 mov (%rax),%eax
ffffffff81020860: 2b 05 2a 79 85 00 sub 0x85792a(%rip),%eax # ffffffff81878190 <hpet_t1_cmp>
ffffffff81020866: 85 c0 test %eax,%eax
ffffffff81020868: 7f c5 jg ffffffff8102082f <hpet_rtc_interrupt+0x68>
ffffffff8102086a: 85 db test %ebx,%ebx

Kirill, Pavel, could you please re-test the updated commit attached below?

Ingo

---------------->