linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: oliver <oohall@gmail.com>
To: Michael Neuling <mikey@neuling.org>
Cc: linuxppc-dev@lists.ozlabs.org, Jack Miller <jack@codezen.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH v3 1/2] powerpc/timer - large decrementer support
Date: Tue, 31 May 2016 17:05:34 +1000	[thread overview]
Message-ID: <CAOSf1CHc30sp_DTrKepCS7WvA6DpFxqRSya6XgShQeBc218XUg@mail.gmail.com> (raw)
In-Reply-To: <1464675936.30958.22.camel@neuling.org>

On Tue, May 31, 2016 at 4:25 PM, Michael Neuling <mikey@neuling.org> wrote:
> On Tue, 2016-05-10 at 14:57 +1000, Oliver O'Halloran wrote:
>>  static int decrementer_set_next_event(unsigned long evt,
>>                                     struct clock_event_device *dev);
>> @@ -503,7 +504,7 @@ static void __timer_interrupt(void)
>>               __this_cpu_inc(irq_stat.timer_irqs_event);
>>       } else {
>>               now = *next_tb - now;
>> -             if (now <= DECREMENTER_MAX)
>> +             if (now <= decrementer_max)
>>                       set_dec((int)now);
>
> You can remove the int cast here now since set_dec() takes a u64.

I thought I had fixed this, but it looks like I squashed the change to
into the second patch by accident, whoops.

>> +/* enables the large decrementer for the current CPU */
>> +static void enable_large_decrementer(void)
>> +{
>> +     /* do we have a large decrementer? */
>> +     if (!cpu_has_large_dec())
>> +             return;
>> +
>> +     /* do we need a large decrementer? */
>> +     if (decrementer_max <= DECREMENTER_DEFAULT_MAX)
>> +             return;
>> +
>> +     mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) | LPCR_LD);
>> +
>> +     if (!large_dec_enabled()) {
>> +             decrementer_max = DECREMENTER_DEFAULT_MAX;
>> +
>> +             pr_warn("time_init: Failed to enable large decrementer on CPU %d\n",
>> +                     smp_processor_id());
>
> Can you make this pr_warn_once() since every CPU is going to call this?

Sure.

  reply	other threads:[~2016-05-31  7:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10  4:57 [PATCH v3 1/2] powerpc/timer - large decrementer support Oliver O'Halloran
2016-05-10  4:57 ` [PATCH v3 2/2] KVM: PPC: hypervisor " Oliver O'Halloran
2016-05-11  5:05 ` [PATCH v3 1/2] powerpc/timer - " Balbir Singh
2016-05-31  6:25 ` Michael Neuling
2016-05-31  7:05   ` oliver [this message]
2016-05-31  7:16   ` [PATCH " Oliver O'Halloran
2016-05-31  7:16     ` [PATCH 2/2] KVM: PPC: hypervisor " Oliver O'Halloran
2016-06-01  6:23       ` Michael Neuling
2016-06-02 21:46         ` Benjamin Herrenschmidt
2016-06-07 13:04           ` Michael Ellerman
2016-06-22  7:30         ` oliver
2016-06-01  5:28     ` [PATCH 1/2] powerpc/timer - " Michael Neuling
2016-06-03  2:01       ` Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOSf1CHc30sp_DTrKepCS7WvA6DpFxqRSya6XgShQeBc218XUg@mail.gmail.com \
    --to=oohall@gmail.com \
    --cc=jack@codezen.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).