Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218729
b: refs/heads/master
c: 37e4ec9
h: refs/heads/master
i:
  218727: ff3608c
v: v3
  • Loading branch information
Akira Takeuchi authored and David Howells committed Oct 27, 2010
1 parent fa4a494 commit 42695ad
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab244c1a08a4e234cd3761a8aba3cb5a7bbe525a
refs/heads/master: 37e4ec96365a4b1179b994861e824e3c2fce32a1
74 changes: 74 additions & 0 deletions trunk/arch/mn10300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,80 @@ config MN10300_TTYSM2_CTS

endmenu

menu "Interrupt request priority options"

comment "[!] NOTE: A lower number/level indicates a higher priority (0 is highest, 6 is lowest)"

comment "____Non-maskable interrupt levels____"
comment "The following must be set to a higher priority than local_irq_disable() and on-chip serial"

config GDBSTUB_IRQ_LEVEL
int "GDBSTUB interrupt priority"
depends on GDBSTUB
range 0 1 if LINUX_CLI_LEVEL = 2
range 0 2 if LINUX_CLI_LEVEL = 3
range 0 3 if LINUX_CLI_LEVEL = 4
range 0 4 if LINUX_CLI_LEVEL = 5
range 0 5 if LINUX_CLI_LEVEL = 6
default 0

comment "The following must be set to a higher priority than local_irq_disable()"

config MN10300_SERIAL_IRQ_LEVEL
int "MN10300 on-chip serial interrupt priority"
depends on MN10300_TTYSM
range 1 1 if LINUX_CLI_LEVEL = 2
range 1 2 if LINUX_CLI_LEVEL = 3
range 1 3 if LINUX_CLI_LEVEL = 4
range 1 4 if LINUX_CLI_LEVEL = 5
range 1 5 if LINUX_CLI_LEVEL = 6
default 1

comment "-"
comment "____Maskable interrupt levels____"

config LINUX_CLI_LEVEL
int "The highest interrupt priority excluded by local_irq_disable() (2-6)"
range 2 6
default 2
help
local_irq_disable() doesn't actually disable maskable interrupts -
what it does is restrict the levels of interrupt which are permitted
(a lower level indicates a higher priority) by lowering the value in
EPSW.IM from 7. Any interrupt is permitted for which the level is
lower than EPSW.IM.

Certain interrupts, such as GDBSTUB and virtual MN10300 on-chip
serial DMA interrupts are allowed to interrupt normal disabled
sections.

comment "The following must be set to a equal to or lower priority than LINUX_CLI_LEVEL"

config TIMER_IRQ_LEVEL
int "Kernel timer interrupt priority"
range LINUX_CLI_LEVEL 6
default 4

config PCI_IRQ_LEVEL
int "PCI interrupt priority"
depends on PCI
range LINUX_CLI_LEVEL 6
default 5

config ETHERNET_IRQ_LEVEL
int "Ethernet interrupt priority"
depends on SMC91X || SMC911X || SMSC911X
range LINUX_CLI_LEVEL 6
default 6

config EXT_SERIAL_IRQ_LEVEL
int "External serial port interrupt priority"
depends on SERIAL_8250
range LINUX_CLI_LEVEL 6
default 6

endmenu

source "mm/Kconfig"

menu "Power management options"
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/mn10300/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
* - level 6 - timer interrupt
* - "enabled": run in IM7
*/
#ifdef CONFIG_MN10300_TTYSM
#define MN10300_CLI_LEVEL EPSW_IM_2
#else
#define MN10300_CLI_LEVEL EPSW_IM_1
#endif
#define MN10300_CLI_LEVEL (CONFIG_LINUX_CLI_LEVEL << EPSW_IM_SHIFT)

#ifndef __ASSEMBLY__

Expand Down Expand Up @@ -94,7 +90,7 @@ static inline void arch_local_irq_restore(unsigned long flags)

static inline bool arch_irqs_disabled_flags(unsigned long flags)
{
return (flags & EPSW_IM) <= MN10300_CLI_LEVEL;
return (flags & (EPSW_IE | EPSW_IM)) != (EPSW_IE | EPSW_IM_7);
}

static inline bool arch_irqs_disabled(void)
Expand Down

0 comments on commit 42695ad

Please sign in to comment.