Skip to content

Commit 1e5915b

Browse files
committed
CRIS v32: Update asm-cris/arch-v32/irq.h for ETRAX FS and ARTPEC-3
- Correct include to use <> - Rework calculation of number of IRQs and exceptions we have. - Remove useless "mask" argument to BUILD_IRQ macro
1 parent 0c2efc4 commit 1e5915b

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

  • include/asm-cris/arch-v32

‎include/asm-cris/arch-v32/irq.h‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#ifndef _ASM_ARCH_IRQ_H
22
#define _ASM_ARCH_IRQ_H
33

4-
#include "hwregs/intr_vect.h"
4+
#include <hwregs/intr_vect.h>
55

66
/* Number of non-cpu interrupts. */
7-
#define NR_IRQS 0x50 /* Exceptions + IRQs */
8-
#define NR_REAL_IRQS 0x20 /* IRQs */
7+
#define NR_IRQS NBR_INTR_VECT /* Exceptions + IRQs */
98
#define FIRST_IRQ 0x31 /* Exception number for first IRQ */
9+
#define NR_REAL_IRQS (NBR_INTR_VECT - FIRST_IRQ) /* IRQs */
10+
#if NR_REAL_IRQS > 32
11+
#define MACH_IRQS 64
12+
#else
13+
#define MACH_IRQS 32
14+
#endif
1015

1116
#ifndef __ASSEMBLY__
1217
/* Global IRQ vector. */
@@ -73,15 +78,15 @@ void set_exception_vector(int n, irqvectptr addr);
7378
* which will acknowledge the interrupt, is run. The actual blocking is made
7479
* by crisv32_do_IRQ.
7580
*/
76-
#define BUILD_IRQ(nr, mask) \
81+
#define BUILD_IRQ(nr) \
7782
void IRQ_NAME(nr); \
7883
__asm__ ( \
7984
".text\n\t" \
8085
"IRQ" #nr "_interrupt:\n\t" \
8186
SAVE_ALL \
8287
KGDB_FIXUP \
8388
"move.d "#nr",$r10\n\t" \
84-
"move.d $sp,$r12\n\t" \
89+
"move.d $sp, $r12\n\t" \
8590
"jsr crisv32_do_IRQ\n\t" \
8691
"moveq 1, $r11\n\t" \
8792
"jump ret_from_intr\n\t" \

0 commit comments

Comments
 (0)