lkml.org 
[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v8 10/11] irqchip/sifive-plic: Initialize the plic handler when cpu comes online
On Thu, Feb 13, 2020 at 3:02 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Atish Patra <atish.patra@wdc.com> writes:
>
> > +static void plic_handler_init(struct plic_handler *handler, u32 threshold)
> > +{
> > + irq_hw_number_t hwirq;
> > +
> > + /* priority must be > threshold to trigger an interrupt */
> > + writel(threshold, handler->hart_base + CONTEXT_THRESHOLD);
> > + for (hwirq = 1; hwirq < plic_irqdomain->hwirq_max; hwirq++)
> > + plic_toggle(handler, hwirq, 0);
> > +}
>
> > +
> > +static int plic_starting_cpu(unsigned int cpu)
> > +{
> > + u32 threshold = 0;
>
> Pointless variable. Also you use PLIC_DISABLE_THRESHOLD down below, so
> please add a proper define for enable as well.
>

Sure. Will do that.

> > + struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu);
>
> this_cpu_ptr*&...)
>
> The callback is guaranteed to run on the plugged in CPU.
>

Ah yes. I will change it to this_cpu_ptr. Thanks.

> > - threshold = 0xffffffff;
> > + plic_handler_init(handler, PLIC_DISABLE_THRESHOLD);
>
> Thanks,
>
> tglx
>


--
Regards,
Atish

\
 
 \ /
  Last update: 2020-02-13 20:03    [W:0.117 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site