• Home
  • Raw
  • Download

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
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 irq = irq_find_mapping(handler->priv->irqdomain, hwirq); in plic_handle_irq()
254 static void plic_set_threshold(struct plic_handler *handler, u32 threshold) in plic_set_threshold() argument
257 writel(threshold, handler->hart_base + CONTEXT_THRESHOLD); in plic_set_threshold()
270 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); in plic_starting_cpu() local
277 plic_set_threshold(handler, PLIC_ENABLE_THRESHOLD); in plic_starting_cpu()
288 struct plic_handler *handler; in plic_init() local
344 /* Find parent domain and register chained handler */ in plic_init()
353 * When running in M-mode we need to ignore the S-mode handler. in plic_init()
357 handler = per_cpu_ptr(&plic_handlers, cpu); in plic_init()
358 if (handler->present) { in plic_init()
359 pr_warn("handler already present for context %d.\n", i); in plic_init()
360 plic_set_threshold(handler, PLIC_DISABLE_THRESHOLD); in plic_init()
365 handler->present = true; in plic_init()
366 handler->hart_base = in plic_init()
368 raw_spin_lock_init(&handler->enable_lock); in plic_init()
369 handler->enable_base = in plic_init()
371 handler->priv = priv; in plic_init()
374 plic_toggle(handler, hwirq, 0); in plic_init()
380 * when context handler for current/boot CPU is present. in plic_init()
382 handler = this_cpu_ptr(&plic_handlers); in plic_init()
383 if (handler->present && !plic_cpuhp_setup_done) { in plic_init()