Michal Suchánek <msucha...@suse.de> writes:
> Hello,
>
> On Thu, Apr 21, 2022 at 12:16:57AM +1000, Michael Ellerman wrote:
>> This is a partial revert of commit 0faf20a1ad16 ("powerpc/64s/interrupt:
>> Don't enable MSR[EE] in irq handlers unless perf is in use").
>> 
>> Prior to that commit, we always set the decrementer in
>> timer_interrupt(), to clear the timer interrupt. Otherwise we could end
>> up continuously taking timer interrupts.
>> 
>> When high res timers are enabled there is no problem seen with leaving
>> the decrementer untouched in timer_interrupt(), because it will be
>> programmed via hrtimer_interrupt() -> tick_program_event() ->
>> clockevents_program_event() -> decrementer_set_next_event().
>> 
>> However with CONFIG_HIGH_RES_TIMERS=n or booting with highres=off, we
>
> How difficult is it to detect this condition?
>
> Maybe detecting this could be just added?

We could but it would be quite a hack.

This patch is just meant as a minimal fix to put the code back the way
it's been for the last ~15 years.

I think Nick has identified the problem in the core timing code, so
fixing that should be the right solution.

If that's wrong for some reason then we can do some detection in our
timer_interrupt() to avoid the set_dec() when it's unnecessary.

cheers

Reply via email to