Re: [PATCH] oprofile: re-arm APIC_DM_NMI in ppro_check_ctrs()

From: Cyrill Gorcunov
Date: Mon Nov 10 2008 - 11:31:51 EST


[Eric Dumazet - Mon, Nov 10, 2008 at 05:19:20PM +0100]
...
>>
>> Hi Eric,
>>
>> for the record
>>
>> apic_write(APIC_LVTPC, APIC_DM_NMI);
>>
>> is not just 'unmask' but also *zeroify* (not sure if I wrote this
>> word right :) all fields when the origianl code was just 'unmasking'
>> TPC register
>>
>> apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
>>
>> that is why apic_read() was in former.
>>
>
> Well, given that APIC_LVTPC is initialized by oprofile init to value APIC_DM_NMI,
> I avoid an apic_read() and just write APIC_DM_NMI again...
>
> Presumably, apic_read(APIC_LVTPC) should return APIC_DM_NMI or APIC_DM_NMI|APIC_LVT_MASKED
>
> Thanks
>

Yes, just grepped the sources -- it seems nobody else touching
this register indeed.
- Cyrill -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/