Lines Matching full: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
166 writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); in plic_irq_eoi()
226 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_handle_irq() local
228 void __iomem *claim = handler->hart_base + CONTEXT_CLAIM; in plic_handle_irq()
231 WARN_ON_ONCE(!handler->present); in plic_handle_irq()
236 int err = generic_handle_domain_irq(handler->priv->irqdomain, in plic_handle_irq()
246 static void plic_set_threshold(struct plic_handler *handler, u32 threshold) in plic_set_threshold() argument
249 writel(threshold, handler->hart_base + CONTEXT_THRESHOLD); in plic_set_threshold()
262 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_starting_cpu() local
269 plic_set_threshold(handler, PLIC_ENABLE_THRESHOLD); in plic_starting_cpu()
280 struct plic_handler *handler; in plic_init() local
336 /* Find parent domain and register chained handler */ in plic_init()
345 * When running in M-mode we need to ignore the S-mode handler. in plic_init()
349 handler = per_cpu_ptr(&plic_handlers, cpu); in plic_init()
350 if (handler->present) { in plic_init()
351 pr_warn("handler already present for context %d.\n", i); in plic_init()
352 plic_set_threshold(handler, PLIC_DISABLE_THRESHOLD); in plic_init()
357 handler->present = true; in plic_init()
358 handler->hart_base = in plic_init()
360 raw_spin_lock_init(&handler->enable_lock); in plic_init()
361 handler->enable_base = in plic_init()
363 handler->priv = priv; in plic_init()
366 plic_toggle(handler, hwirq, 0); in plic_init()
372 * when context handler for current/boot CPU is present. in plic_init()
374 handler = this_cpu_ptr(&plic_handlers); in plic_init()
375 if (handler->present && !plic_cpuhp_setup_done) { in plic_init()