// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2001 MontaVista Software Inc. * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net * * Copyright (C) 2001 Ralf Baechle * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. * Author: Maciej W. Rozycki <macro@mips.com> * * This file define the irq handler for MIPS CPU interrupts.
*/
/* * Almost all MIPS CPUs define 8 interrupt sources. They are typically * level triggered (i.e., cannot be cleared from CPU; must be cleared from * device). * * The first two are software interrupts (i.e. not exposed as pins) which * may be used for IPIs in multi-threaded single-core systems. * * The last one is usually the CPU timer interrupt if the counter register * is present, or for old CPUs with an external FPU by convention it's the * FPU exception interrupt.
*/ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/irq.h> #include <linux/irqchip.h> #include <linux/irqdomain.h>
/* * While we ack the interrupt interrupts are disabled and thus we don't need * to deal with concurrency issues. Same for mips_cpu_irq_end.
*/ staticvoid mips_mt_cpu_irq_ack(struct irq_data *d)
{ unsignedint vpflags = dvpe();
clear_c0_cause(C_SW0 << d->hwirq);
evpe(vpflags);
mask_mips_irq(d);
}
irq_domain = irq_domain_create_legacy(of_fwnode_handle(of_node), 8, MIPS_CPU_IRQ_BASE, 0,
&mips_cpu_intc_irq_domain_ops, NULL); if (!irq_domain)
panic("Failed to add irqdomain for MIPS CPU");
/* * Only proceed to register the software interrupt IPI implementation * for CPUs which implement the MIPS MT (multi-threading) ASE.
*/ if (cpu_has_mipsmt)
mips_cpu_register_ipi_domain(of_node);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.