Lines Matching refs:handler

84 static inline void plic_toggle(struct plic_handler *handler,  in plic_toggle()  argument
87 u32 __iomem *reg = handler->enable_base + (hwirq / 32) * sizeof(u32); in plic_toggle()
90 raw_spin_lock(&handler->enable_lock); in plic_toggle()
95 raw_spin_unlock(&handler->enable_lock); in plic_toggle()
106 struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu); in plic_irq_toggle() local
108 if (handler->present && in plic_irq_toggle()
109 cpumask_test_cpu(cpu, &handler->priv->lmask)) in plic_irq_toggle()
110 plic_toggle(handler, d->hwirq, enable); in plic_irq_toggle()
164 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_irq_eoi() local
168 writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); in plic_irq_eoi()
171 writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); in plic_irq_eoi()
232 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_handle_irq() local
234 void __iomem *claim = handler->hart_base + CONTEXT_CLAIM; in plic_handle_irq()
237 WARN_ON_ONCE(!handler->present); in plic_handle_irq()
242 int err = generic_handle_domain_irq(handler->priv->irqdomain, in plic_handle_irq()
252 static void plic_set_threshold(struct plic_handler *handler, u32 threshold) in plic_set_threshold() argument
255 writel(threshold, handler->hart_base + CONTEXT_THRESHOLD); in plic_set_threshold()
268 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_starting_cpu() local
275 plic_set_threshold(handler, PLIC_ENABLE_THRESHOLD); in plic_starting_cpu()
286 struct plic_handler *handler; in plic_init() local
355 handler = per_cpu_ptr(&plic_handlers, cpu); in plic_init()
356 if (handler->present) { in plic_init()
358 plic_set_threshold(handler, PLIC_DISABLE_THRESHOLD); in plic_init()
363 handler->present = true; in plic_init()
364 handler->hart_base = in plic_init()
366 raw_spin_lock_init(&handler->enable_lock); in plic_init()
367 handler->enable_base = in plic_init()
369 handler->priv = priv; in plic_init()
372 plic_toggle(handler, hwirq, 0); in plic_init()
380 handler = this_cpu_ptr(&plic_handlers); in plic_init()
381 if (handler->present && !plic_cpuhp_setup_done) { in plic_init()