aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include
diff options
context:
space:
mode:
authorMarc Gauthier <marc@tensilica.com>2013-01-04 19:57:17 -0500
committerChris Zankel <chris@zankel.net>2013-02-23 22:12:52 -0500
commit2d1c645cc50b8f5a718b24bad9eb3931e7105d12 (patch)
treec385e5064cee10f79b9c359ddd99bd5d1b9f838a /arch/xtensa/include
parentd0b73b488c55df905ea8faaad079f8535629ed26 (diff)
xtensa: dispatch medium-priority interrupts
Add support for dispatching medium-priority interrupts, that is, interrupts of priority levels 2 to EXCM_LEVEL. IRQ handling may be preempted by higher priority IRQ. Signed-off-by: Marc Gauthier <marc@tensilica.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r--arch/xtensa/include/asm/atomic.h6
-rw-r--r--arch/xtensa/include/asm/processor.h4
-rw-r--r--arch/xtensa/include/asm/regs.h1
-rw-r--r--arch/xtensa/include/asm/timex.h8
4 files changed, 10 insertions, 9 deletions
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h
index c3f289174c10..e7fb447bce8e 100644
--- a/arch/xtensa/include/asm/atomic.h
+++ b/arch/xtensa/include/asm/atomic.h
@@ -7,7 +7,7 @@
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 * 9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc. 10 * Copyright (C) 2001 - 2008 Tensilica Inc.
11 */ 11 */
12 12
13#ifndef _XTENSA_ATOMIC_H 13#ifndef _XTENSA_ATOMIC_H
@@ -24,11 +24,11 @@
24 24
25/* 25/*
26 * This Xtensa implementation assumes that the right mechanism 26 * This Xtensa implementation assumes that the right mechanism
27 * for exclusion is for locking interrupts to level 1. 27 * for exclusion is for locking interrupts to level EXCM_LEVEL.
28 * 28 *
29 * Locking interrupts looks like this: 29 * Locking interrupts looks like this:
30 * 30 *
31 * rsil a15, 1 31 * rsil a15, LOCKLEVEL
32 * <code> 32 * <code>
33 * wsr a15, PS 33 * wsr a15, PS
34 * rsync 34 * rsync
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
index e5fb6b0abdf4..7e409a5b0ec5 100644
--- a/arch/xtensa/include/asm/processor.h
+++ b/arch/xtensa/include/asm/processor.h
@@ -5,7 +5,7 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2008 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_PROCESSOR_H 11#ifndef _XTENSA_PROCESSOR_H
@@ -68,7 +68,7 @@
68/* LOCKLEVEL defines the interrupt level that masks all 68/* LOCKLEVEL defines the interrupt level that masks all
69 * general-purpose interrupts. 69 * general-purpose interrupts.
70 */ 70 */
71#define LOCKLEVEL 1 71#define LOCKLEVEL XCHAL_EXCM_LEVEL
72 72
73/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE 73/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE
74 * registers 74 * registers
diff --git a/arch/xtensa/include/asm/regs.h b/arch/xtensa/include/asm/regs.h
index 76096a4e5b8d..b24de6717020 100644
--- a/arch/xtensa/include/asm/regs.h
+++ b/arch/xtensa/include/asm/regs.h
@@ -88,6 +88,7 @@
88#define PS_UM_BIT 5 88#define PS_UM_BIT 5
89#define PS_EXCM_BIT 4 89#define PS_EXCM_BIT 4
90#define PS_INTLEVEL_SHIFT 0 90#define PS_INTLEVEL_SHIFT 0
91#define PS_INTLEVEL_WIDTH 4
91#define PS_INTLEVEL_MASK 0x0000000F 92#define PS_INTLEVEL_MASK 0x0000000F
92 93
93/* DBREAKCn register fields. */ 94/* DBREAKCn register fields. */
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h
index 175b3d5e1b01..9e85ce8bd8dd 100644
--- a/arch/xtensa/include/asm/timex.h
+++ b/arch/xtensa/include/asm/timex.h
@@ -5,7 +5,7 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2008 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_TIMEX_H 11#ifndef _XTENSA_TIMEX_H
@@ -19,13 +19,13 @@
19#define _INTLEVEL(x) XCHAL_INT ## x ## _LEVEL 19#define _INTLEVEL(x) XCHAL_INT ## x ## _LEVEL
20#define INTLEVEL(x) _INTLEVEL(x) 20#define INTLEVEL(x) _INTLEVEL(x)
21 21
22#if INTLEVEL(XCHAL_TIMER0_INTERRUPT) == 1 22#if INTLEVEL(XCHAL_TIMER0_INTERRUPT) <= XCHAL_EXCM_LEVEL
23# define LINUX_TIMER 0 23# define LINUX_TIMER 0
24# define LINUX_TIMER_INT XCHAL_TIMER0_INTERRUPT 24# define LINUX_TIMER_INT XCHAL_TIMER0_INTERRUPT
25#elif INTLEVEL(XCHAL_TIMER1_INTERRUPT) == 1 25#elif INTLEVEL(XCHAL_TIMER1_INTERRUPT) <= XCHAL_EXCM_LEVEL
26# define LINUX_TIMER 1 26# define LINUX_TIMER 1
27# define LINUX_TIMER_INT XCHAL_TIMER1_INTERRUPT 27# define LINUX_TIMER_INT XCHAL_TIMER1_INTERRUPT
28#elif INTLEVEL(XCHAL_TIMER2_INTERRUPT) == 1 28#elif INTLEVEL(XCHAL_TIMER2_INTERRUPT) <= XCHAL_EXCM_LEVEL
29# define LINUX_TIMER 2 29# define LINUX_TIMER 2
30# define LINUX_TIMER_INT XCHAL_TIMER2_INTERRUPT 30# define LINUX_TIMER_INT XCHAL_TIMER2_INTERRUPT
31#else 31#else