~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/pmcs-msp71xx/msp_smp.c

Version: ~ [ linux-6.1-rc7 ] ~ [ linux-6.0.10 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.80 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.156 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.225 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.267 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.300 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.334 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
  4  * Copyright (C) 2001 Ralf Baechle
  5  * Copyright (C) 2010 PMC-Sierra, Inc.
  6  *
  7  *  VSMP support for MSP platforms . Derived from malta vsmp support.
  8  */
  9 #include <linux/smp.h>
 10 #include <linux/interrupt.h>
 11 
 12 #include <asm/setup.h>
 13 
 14 #ifdef CONFIG_MIPS_MT_SMP
 15 #define MIPS_CPU_IPI_RESCHED_IRQ 0      /* SW int 0 for resched */
 16 #define MIPS_CPU_IPI_CALL_IRQ 1         /* SW int 1 for call */
 17 
 18 
 19 static void ipi_resched_dispatch(void)
 20 {
 21         do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ);
 22 }
 23 
 24 static void ipi_call_dispatch(void)
 25 {
 26         do_IRQ(MIPS_CPU_IPI_CALL_IRQ);
 27 }
 28 
 29 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
 30 {
 31         return IRQ_HANDLED;
 32 }
 33 
 34 static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
 35 {
 36         generic_smp_call_function_interrupt();
 37 
 38         return IRQ_HANDLED;
 39 }
 40 
 41 void __init arch_init_ipiirq(int irq, const char *name, irq_handler_t handler)
 42 {
 43         if (request_irq(irq, handler, IRQF_PERCPU, name, NULL))
 44                 pr_err("Failed to request irq %d (%s)\n", irq, name);
 45         irq_set_handler(irq, handle_percpu_irq);
 46 }
 47 
 48 void __init msp_vsmp_int_init(void)
 49 {
 50         set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
 51         set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
 52         arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, "IPI_resched",
 53                          ipi_resched_interrupt);
 54         arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, "IPI_call", ipi_call_interrupt);
 55 }
 56 #endif /* CONFIG_MIPS_MT_SMP */
 57 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp