diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-20 12:59:08 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-20 12:59:08 -0500 |
| commit | 92d7c9b2312474ce1259d71b4e50e01ae9fa95ea (patch) | |
| tree | 9d04d1a7bb1c17ff5d95c576bd8fe4bdbb043647 | |
| parent | 9e0afb9437c68be62085d74407b169732108a929 (diff) | |
| parent | 1cf215a5b43950d1a304373037828158057ff9fc (diff) | |
Merge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
ARM: mach-shmobile: INTC interrupt priority level demux fix
ARM: mach-shmobile: fix compile warning in mm/init.c
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/entry-macro.S | 30 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/vmalloc.h | 2 |
2 files changed, 27 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S index a285d13c7416..f428c4db2b60 100644 --- a/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ b/arch/arm/mach-shmobile/include/mach/entry-macro.S | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2010 Magnus Damm | ||
| 2 | * Copyright (C) 2008 Renesas Solutions Corp. | 3 | * Copyright (C) 2008 Renesas Solutions Corp. |
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
| @@ -14,24 +15,45 @@ | |||
| 14 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | */ | 17 | */ |
| 17 | #include <mach/hardware.h> | ||
| 18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
| 19 | 19 | ||
| 20 | #define INTCA_BASE 0xe6980000 | ||
| 21 | #define INTFLGA_OFFS 0x00000018 /* accept pending interrupt */ | ||
| 22 | #define INTEVTA_OFFS 0x00000020 /* vector number of accepted interrupt */ | ||
| 23 | #define INTLVLA_OFFS 0x00000030 /* priority level of accepted interrupt */ | ||
| 24 | #define INTLVLB_OFFS 0x00000034 /* previous priority level */ | ||
| 25 | |||
| 20 | .macro disable_fiq | 26 | .macro disable_fiq |
| 21 | .endm | 27 | .endm |
| 22 | 28 | ||
| 23 | .macro get_irqnr_preamble, base, tmp | 29 | .macro get_irqnr_preamble, base, tmp |
| 24 | ldr \base, =INTFLGA | 30 | ldr \base, =INTCA_BASE |
| 25 | .endm | 31 | .endm |
| 26 | 32 | ||
| 27 | .macro arch_ret_to_user, tmp1, tmp2 | 33 | .macro arch_ret_to_user, tmp1, tmp2 |
| 28 | .endm | 34 | .endm |
| 29 | 35 | ||
| 30 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 36 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
| 31 | ldr \irqnr, [\base] | 37 | /* The single INTFLGA read access below results in the following: |
| 38 | * | ||
| 39 | * 1. INTLVLB is updated with old priority value from INTLVLA | ||
| 40 | * 2. Highest priority interrupt is accepted | ||
| 41 | * 3. INTLVLA is updated to contain priority of accepted interrupt | ||
| 42 | * 4. Accepted interrupt vector is stored in INTFLGA and INTEVTA | ||
| 43 | */ | ||
| 44 | ldr \irqnr, [\base, #INTFLGA_OFFS] | ||
| 45 | |||
| 46 | /* Restore INTLVLA with the value saved in INTLVLB. | ||
| 47 | * This is required to support interrupt priorities properly. | ||
| 48 | */ | ||
| 49 | ldrb \tmp, [\base, #INTLVLB_OFFS] | ||
| 50 | strb \tmp, [\base, #INTLVLA_OFFS] | ||
| 51 | |||
| 52 | /* Handle invalid vector number case */ | ||
| 32 | cmp \irqnr, #0 | 53 | cmp \irqnr, #0 |
| 33 | beq 1000f | 54 | beq 1000f |
| 34 | /* intevt to irq number */ | 55 | |
| 56 | /* Convert vector to irq number, same as the evt2irq() macro */ | ||
| 35 | lsr \irqnr, \irqnr, #0x5 | 57 | lsr \irqnr, \irqnr, #0x5 |
| 36 | subs \irqnr, \irqnr, #16 | 58 | subs \irqnr, \irqnr, #16 |
| 37 | 59 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/vmalloc.h b/arch/arm/mach-shmobile/include/mach/vmalloc.h index 4aecf6e3a859..2b8fd8b942fe 100644 --- a/arch/arm/mach-shmobile/include/mach/vmalloc.h +++ b/arch/arm/mach-shmobile/include/mach/vmalloc.h | |||
| @@ -2,6 +2,6 @@ | |||
| 2 | #define __ASM_MACH_VMALLOC_H | 2 | #define __ASM_MACH_VMALLOC_H |
| 3 | 3 | ||
| 4 | /* Vmalloc at ... - 0xe5ffffff */ | 4 | /* Vmalloc at ... - 0xe5ffffff */ |
| 5 | #define VMALLOC_END 0xe6000000 | 5 | #define VMALLOC_END 0xe6000000UL |
| 6 | 6 | ||
| 7 | #endif /* __ASM_MACH_VMALLOC_H */ | 7 | #endif /* __ASM_MACH_VMALLOC_H */ |
