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

TOMOYO Linux Cross Reference
Linux/arch/mips/loongson2ef/common/irq.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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-or-later
  2 /*
  3  * Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
  4  * Author: Fuxin Zhang, zhangfx@lemote.com
  5  */
  6 #include <linux/delay.h>
  7 #include <linux/interrupt.h>
  8 
  9 #include <loongson.h>
 10 /*
 11  * the first level int-handler will jump here if it is a bonito irq
 12  */
 13 void bonito_irqdispatch(void)
 14 {
 15         u32 int_status;
 16         int i;
 17 
 18         /* workaround the IO dma problem: let cpu looping to allow DMA finish */
 19         int_status = LOONGSON_INTISR;
 20         while (int_status & (1 << 10)) {
 21                 udelay(1);
 22                 int_status = LOONGSON_INTISR;
 23         }
 24 
 25         /* Get pending sources, masked by current enables */
 26         int_status = LOONGSON_INTISR & LOONGSON_INTEN;
 27 
 28         if (int_status) {
 29                 i = __ffs(int_status);
 30                 do_IRQ(LOONGSON_IRQ_BASE + i);
 31         }
 32 }
 33 
 34 asmlinkage void plat_irq_dispatch(void)
 35 {
 36         unsigned int pending;
 37 
 38         pending = read_c0_cause() & read_c0_status() & ST0_IM;
 39 
 40         /* machine-specific plat_irq_dispatch */
 41         mach_irq_dispatch(pending);
 42 }
 43 
 44 void __init arch_init_irq(void)
 45 {
 46         /*
 47          * Clear all of the interrupts while we change the able around a bit.
 48          * int-handler is not on bootstrap
 49          */
 50         clear_c0_status(ST0_IM | ST0_BEV);
 51 
 52         /* no steer */
 53         LOONGSON_INTSTEER = 0;
 54 
 55         /*
 56          * Mask out all interrupt by writing "1" to all bit position in
 57          * the interrupt reset reg.
 58          */
 59         LOONGSON_INTENCLR = ~0;
 60 
 61         /* machine specific irq init */
 62         mach_init_irq();
 63 }
 64 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php