lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 15/17] riscv: use the correct interrupt levels for M-mode
    Date
    The numerical levels for External/Timer/Software interrupts differ
    between S-mode and M-mode.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    ---
    arch/riscv/kernel/irq.c | 12 +++++++++---
    1 file changed, 9 insertions(+), 3 deletions(-)

    diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c
    index 804ff70bb853..9566aabbe50b 100644
    --- a/arch/riscv/kernel/irq.c
    +++ b/arch/riscv/kernel/irq.c
    @@ -14,9 +14,15 @@
    /*
    * Possible interrupt causes:
    */
    -#define INTERRUPT_CAUSE_SOFTWARE IRQ_S_SOFT
    -#define INTERRUPT_CAUSE_TIMER IRQ_S_TIMER
    -#define INTERRUPT_CAUSE_EXTERNAL IRQ_S_EXT
    +#ifdef CONFIG_M_MODE
    +# define INTERRUPT_CAUSE_SOFTWARE IRQ_M_SOFT
    +# define INTERRUPT_CAUSE_TIMER IRQ_M_TIMER
    +# define INTERRUPT_CAUSE_EXTERNAL IRQ_M_EXT
    +#else
    +# define INTERRUPT_CAUSE_SOFTWARE IRQ_S_SOFT
    +# define INTERRUPT_CAUSE_TIMER IRQ_S_TIMER
    +# define INTERRUPT_CAUSE_EXTERNAL IRQ_S_EXT
    +#endif /* CONFIG_M_MODE */

    int arch_show_interrupts(struct seq_file *p, int prec)
    {
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-06-24 07:45    [W:2.646 / U:0.008 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site