diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-21 17:57:04 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-21 17:57:04 -0500 |
| commit | 97b9c3e145a1ddb5a9d8115c82a8981b3f13cba2 (patch) | |
| tree | c5df11be95a5512112dd19167a75d8716a782544 | |
| parent | f85cca6b25971a09efbe4c6a3ae405d40c8f86da (diff) | |
| parent | 5a5af730536fbf15fc354980cba2a0400afa6b76 (diff) | |
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: 6745/1: kprobes insn decoding fix
ARM: tlb: move noMMU tlb_flush() to asm/tlb.h
ARM: tlb: delay page freeing for SMP and ARMv7 CPUs
ARM: Keep exit text/data around for SMP_ON_UP
ARM: Ensure predictable endian state on signal handler entry
ARM: 6740/1: Place correctly notes section in the linker script
ARM: 6700/1: SPEAr: Correct SOC config base address for spear320
ARM: 6722/1: SPEAr: sp810: switch to slow mode before reset
ARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h
ARM: 6720/1: SPEAr: Append UL to VMALLOC_END
ARM: 6676/1: Correct the cpu_architecture() function for ARMv7
ARM: 6739/1: update .gitignore for boot/compressed
ARM: 6743/1: errata: interrupted ICALLUIS may prevent completion of broadcasted operation
ARM: 6742/1: pmu: avoid setting IRQ affinity on UP systems
ARM: 6741/1: errata: pl310 cache sync operation may be faulty
| -rw-r--r-- | arch/arm/Kconfig | 25 | ||||
| -rw-r--r-- | arch/arm/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/boot/compressed/.gitignore | 6 | ||||
| -rw-r--r-- | arch/arm/include/asm/hardware/cache-l2x0.h | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/hardware/sp810.h | 3 | ||||
| -rw-r--r-- | arch/arm/include/asm/tlb.h | 105 | ||||
| -rw-r--r-- | arch/arm/include/asm/tlbflush.h | 7 | ||||
| -rw-r--r-- | arch/arm/kernel/kprobes-decode.c | 2 | ||||
| -rw-r--r-- | arch/arm/kernel/pmu.c | 22 | ||||
| -rw-r--r-- | arch/arm/kernel/setup.c | 4 | ||||
| -rw-r--r-- | arch/arm/kernel/signal.c | 4 | ||||
| -rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 11 | ||||
| -rw-r--r-- | arch/arm/mach-spear3xx/include/mach/spear320.h | 2 | ||||
| -rw-r--r-- | arch/arm/mm/cache-l2x0.c | 6 | ||||
| -rw-r--r-- | arch/arm/mm/proc-v7.S | 6 | ||||
| -rw-r--r-- | arch/arm/plat-spear/include/plat/uncompress.h | 4 | ||||
| -rw-r--r-- | arch/arm/plat-spear/include/plat/vmalloc.h | 2 |
17 files changed, 175 insertions, 37 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 26d45e5b636..166efa2a19c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1177,6 +1177,31 @@ config ARM_ERRATA_743622 | |||
| 1177 | visible impact on the overall performance or power consumption of the | 1177 | visible impact on the overall performance or power consumption of the |
| 1178 | processor. | 1178 | processor. |
| 1179 | 1179 | ||
| 1180 | config ARM_ERRATA_751472 | ||
| 1181 | bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" | ||
| 1182 | depends on CPU_V7 && SMP | ||
| 1183 | help | ||
| 1184 | This option enables the workaround for the 751472 Cortex-A9 (prior | ||
| 1185 | to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the | ||
| 1186 | completion of a following broadcasted operation if the second | ||
| 1187 | operation is received by a CPU before the ICIALLUIS has completed, | ||
| 1188 | potentially leading to corrupted entries in the cache or TLB. | ||
| 1189 | |||
| 1190 | config ARM_ERRATA_753970 | ||
| 1191 | bool "ARM errata: cache sync operation may be faulty" | ||
| 1192 | depends on CACHE_PL310 | ||
| 1193 | help | ||
| 1194 | This option enables the workaround for the 753970 PL310 (r3p0) erratum. | ||
| 1195 | |||
| 1196 | Under some condition the effect of cache sync operation on | ||
| 1197 | the store buffer still remains when the operation completes. | ||
| 1198 | This means that the store buffer is always asked to drain and | ||
| 1199 | this prevents it from merging any further writes. The workaround | ||
| 1200 | is to replace the normal offset of cache sync operation (0x730) | ||
| 1201 | by another offset targeting an unmapped PL310 register 0x740. | ||
| 1202 | This has the same effect as the cache sync operation: store buffer | ||
| 1203 | drain and waiting for all buffers empty. | ||
| 1204 | |||
| 1180 | endmenu | 1205 | endmenu |
| 1181 | 1206 | ||
| 1182 | source "arch/arm/common/Kconfig" | 1207 | source "arch/arm/common/Kconfig" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c22c1adfedd..6f7b29294c8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -15,7 +15,7 @@ ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) | |||
| 15 | LDFLAGS_vmlinux += --be8 | 15 | LDFLAGS_vmlinux += --be8 |
| 16 | endif | 16 | endif |
| 17 | 17 | ||
| 18 | OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S | 18 | OBJCOPYFLAGS :=-O binary -R .comment -S |
| 19 | GZFLAGS :=-9 | 19 | GZFLAGS :=-9 |
| 20 | #KBUILD_CFLAGS +=-pipe | 20 | #KBUILD_CFLAGS +=-pipe |
| 21 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: | 21 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: |
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore index ab204db594d..c6028967d33 100644 --- a/arch/arm/boot/compressed/.gitignore +++ b/arch/arm/boot/compressed/.gitignore | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | font.c | 1 | font.c |
| 2 | piggy.gz | 2 | lib1funcs.S |
| 3 | piggy.gzip | ||
| 4 | piggy.lzo | ||
| 5 | piggy.lzma | ||
| 6 | vmlinux | ||
| 3 | vmlinux.lds | 7 | vmlinux.lds |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 5aeec1e1735..16bd4803158 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #define L2X0_RAW_INTR_STAT 0x21C | 36 | #define L2X0_RAW_INTR_STAT 0x21C |
| 37 | #define L2X0_INTR_CLEAR 0x220 | 37 | #define L2X0_INTR_CLEAR 0x220 |
| 38 | #define L2X0_CACHE_SYNC 0x730 | 38 | #define L2X0_CACHE_SYNC 0x730 |
| 39 | #define L2X0_DUMMY_REG 0x740 | ||
| 39 | #define L2X0_INV_LINE_PA 0x770 | 40 | #define L2X0_INV_LINE_PA 0x770 |
| 40 | #define L2X0_INV_WAY 0x77C | 41 | #define L2X0_INV_WAY 0x77C |
| 41 | #define L2X0_CLEAN_LINE_PA 0x7B0 | 42 | #define L2X0_CLEAN_LINE_PA 0x7B0 |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index 721847dc68a..e0d1c0cfa54 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
| @@ -58,6 +58,9 @@ | |||
| 58 | 58 | ||
| 59 | static inline void sysctl_soft_reset(void __iomem *base) | 59 | static inline void sysctl_soft_reset(void __iomem *base) |
| 60 | { | 60 | { |
| 61 | /* switch to slow mode */ | ||
| 62 | writel(0x2, base + SCCTRL); | ||
| 63 | |||
| 61 | /* writing any value to SCSYSSTAT reg will reset system */ | 64 | /* writing any value to SCSYSSTAT reg will reset system */ |
| 62 | writel(0, base + SCSYSSTAT); | 65 | writel(0, base + SCSYSSTAT); |
| 63 | } | 66 | } |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index f41a6f57cd1..82dfe5d0c41 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
| @@ -18,16 +18,34 @@ | |||
| 18 | #define __ASMARM_TLB_H | 18 | #define __ASMARM_TLB_H |
| 19 | 19 | ||
| 20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
| 21 | #include <asm/tlbflush.h> | ||
| 22 | 21 | ||
| 23 | #ifndef CONFIG_MMU | 22 | #ifndef CONFIG_MMU |
| 24 | 23 | ||
| 25 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
| 25 | |||
| 26 | #define tlb_flush(tlb) ((void) tlb) | ||
| 27 | |||
| 26 | #include <asm-generic/tlb.h> | 28 | #include <asm-generic/tlb.h> |
| 27 | 29 | ||
| 28 | #else /* !CONFIG_MMU */ | 30 | #else /* !CONFIG_MMU */ |
| 29 | 31 | ||
| 32 | #include <linux/swap.h> | ||
| 30 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
| 34 | #include <asm/tlbflush.h> | ||
| 35 | |||
| 36 | /* | ||
| 37 | * We need to delay page freeing for SMP as other CPUs can access pages | ||
| 38 | * which have been removed but not yet had their TLB entries invalidated. | ||
| 39 | * Also, as ARMv7 speculative prefetch can drag new entries into the TLB, | ||
| 40 | * we need to apply this same delaying tactic to ensure correct operation. | ||
| 41 | */ | ||
| 42 | #if defined(CONFIG_SMP) || defined(CONFIG_CPU_32v7) | ||
| 43 | #define tlb_fast_mode(tlb) 0 | ||
| 44 | #define FREE_PTE_NR 500 | ||
| 45 | #else | ||
| 46 | #define tlb_fast_mode(tlb) 1 | ||
| 47 | #define FREE_PTE_NR 0 | ||
| 48 | #endif | ||
| 31 | 49 | ||
| 32 | /* | 50 | /* |
| 33 | * TLB handling. This allows us to remove pages from the page | 51 | * TLB handling. This allows us to remove pages from the page |
| @@ -36,12 +54,58 @@ | |||
| 36 | struct mmu_gather { | 54 | struct mmu_gather { |
| 37 | struct mm_struct *mm; | 55 | struct mm_struct *mm; |
| 38 | unsigned int fullmm; | 56 | unsigned int fullmm; |
| 57 | struct vm_area_struct *vma; | ||
| 39 | unsigned long range_start; | 58 | unsigned long range_start; |
| 40 | unsigned long range_end; | 59 | unsigned long range_end; |
| 60 | unsigned int nr; | ||
| 61 | struct page *pages[FREE_PTE_NR]; | ||
| 41 | }; | 62 | }; |
| 42 | 63 | ||
| 43 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | 64 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); |
| 44 | 65 | ||
| 66 | /* | ||
| 67 | * This is unnecessarily complex. There's three ways the TLB shootdown | ||
| 68 | * code is used: | ||
| 69 | * 1. Unmapping a range of vmas. See zap_page_range(), unmap_region(). | ||
| 70 | * tlb->fullmm = 0, and tlb_start_vma/tlb_end_vma will be called. | ||
| 71 | * tlb->vma will be non-NULL. | ||
| 72 | * 2. Unmapping all vmas. See exit_mmap(). | ||
| 73 | * tlb->fullmm = 1, and tlb_start_vma/tlb_end_vma will be called. | ||
| 74 | * tlb->vma will be non-NULL. Additionally, page tables will be freed. | ||
| 75 | * 3. Unmapping argument pages. See shift_arg_pages(). | ||
| 76 | * tlb->fullmm = 0, but tlb_start_vma/tlb_end_vma will not be called. | ||
| 77 | * tlb->vma will be NULL. | ||
| 78 | */ | ||
| 79 | static inline void tlb_flush(struct mmu_gather *tlb) | ||
| 80 | { | ||
| 81 | if (tlb->fullmm || !tlb->vma) | ||
| 82 | flush_tlb_mm(tlb->mm); | ||
| 83 | else if (tlb->range_end > 0) { | ||
| 84 | flush_tlb_range(tlb->vma, tlb->range_start, tlb->range_end); | ||
| 85 | tlb->range_start = TASK_SIZE; | ||
| 86 | tlb->range_end = 0; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | |||
| 90 | static inline void tlb_add_flush(struct mmu_gather *tlb, unsigned long addr) | ||
| 91 | { | ||
| 92 | if (!tlb->fullmm) { | ||
| 93 | if (addr < tlb->range_start) | ||
| 94 | tlb->range_start = addr; | ||
| 95 | if (addr + PAGE_SIZE > tlb->range_end) | ||
| 96 | tlb->range_end = addr + PAGE_SIZE; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | static inline void tlb_flush_mmu(struct mmu_gather *tlb) | ||
| 101 | { | ||
| 102 | tlb_flush(tlb); | ||
| 103 | if (!tlb_fast_mode(tlb)) { | ||
| 104 | free_pages_and_swap_cache(tlb->pages, tlb->nr); | ||
| 105 | tlb->nr = 0; | ||
| 106 | } | ||
| 107 | } | ||
| 108 | |||
| 45 | static inline struct mmu_gather * | 109 | static inline struct mmu_gather * |
| 46 | tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | 110 | tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) |
| 47 | { | 111 | { |
| @@ -49,6 +113,8 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | |||
| 49 | 113 | ||
| 50 | tlb->mm = mm; | 114 | tlb->mm = mm; |
| 51 | tlb->fullmm = full_mm_flush; | 115 | tlb->fullmm = full_mm_flush; |
| 116 | tlb->vma = NULL; | ||
| 117 | tlb->nr = 0; | ||
| 52 | 118 | ||
| 53 | return tlb; | 119 | return tlb; |
| 54 | } | 120 | } |
| @@ -56,8 +122,7 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | |||
| 56 | static inline void | 122 | static inline void |
| 57 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) | 123 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) |
| 58 | { | 124 | { |
| 59 | if (tlb->fullmm) | 125 | tlb_flush_mmu(tlb); |
| 60 | flush_tlb_mm(tlb->mm); | ||
| 61 | 126 | ||
| 62 | /* keep the page table cache within bounds */ | 127 | /* keep the page table cache within bounds */ |
| 63 | check_pgt_cache(); | 128 | check_pgt_cache(); |
| @@ -71,12 +136,7 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) | |||
| 71 | static inline void | 136 | static inline void |
| 72 | tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr) | 137 | tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr) |
| 73 | { | 138 | { |
| 74 | if (!tlb->fullmm) { | 139 | tlb_add_flush(tlb, addr); |
| 75 | if (addr < tlb->range_start) | ||
| 76 | tlb->range_start = addr; | ||
| 77 | if (addr + PAGE_SIZE > tlb->range_end) | ||
| 78 | tlb->range_end = addr + PAGE_SIZE; | ||
| 79 | } | ||
| 80 | } | 140 | } |
| 81 | 141 | ||
| 82 | /* | 142 | /* |
| @@ -89,6 +149,7 @@ tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | |||
| 89 | { | 149 | { |
| 90 | if (!tlb->fullmm) { | 150 | if (!tlb->fullmm) { |
| 91 | flush_cache_range(vma, vma->vm_start, vma->vm_end); | 151 | flush_cache_range(vma, vma->vm_start, vma->vm_end); |
| 152 | tlb->vma = vma; | ||
| 92 | tlb->range_start = TASK_SIZE; | 153 | tlb->range_start = TASK_SIZE; |
| 93 | tlb->range_end = 0; | 154 | tlb->range_end = 0; |
| 94 | } | 155 | } |
| @@ -97,12 +158,30 @@ tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | |||
| 97 | static inline void | 158 | static inline void |
| 98 | tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | 159 | tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) |
| 99 | { | 160 | { |
| 100 | if (!tlb->fullmm && tlb->range_end > 0) | 161 | if (!tlb->fullmm) |
| 101 | flush_tlb_range(vma, tlb->range_start, tlb->range_end); | 162 | tlb_flush(tlb); |
| 163 | } | ||
| 164 | |||
| 165 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | ||
| 166 | { | ||
| 167 | if (tlb_fast_mode(tlb)) { | ||
| 168 | free_page_and_swap_cache(page); | ||
| 169 | } else { | ||
| 170 | tlb->pages[tlb->nr++] = page; | ||
| 171 | if (tlb->nr >= FREE_PTE_NR) | ||
| 172 | tlb_flush_mmu(tlb); | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | ||
| 177 | unsigned long addr) | ||
| 178 | { | ||
| 179 | pgtable_page_dtor(pte); | ||
| 180 | tlb_add_flush(tlb, addr); | ||
| 181 | tlb_remove_page(tlb, pte); | ||
| 102 | } | 182 | } |
| 103 | 183 | ||
| 104 | #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) | 184 | #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) |
| 105 | #define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep) | ||
| 106 | #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) | 185 | #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) |
| 107 | 186 | ||
| 108 | #define tlb_migrate_finish(mm) do { } while (0) | 187 | #define tlb_migrate_finish(mm) do { } while (0) |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index ce7378ea15a..d2005de383b 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
| @@ -10,12 +10,7 @@ | |||
| 10 | #ifndef _ASMARM_TLBFLUSH_H | 10 | #ifndef _ASMARM_TLBFLUSH_H |
| 11 | #define _ASMARM_TLBFLUSH_H | 11 | #define _ASMARM_TLBFLUSH_H |
| 12 | 12 | ||
| 13 | 13 | #ifdef CONFIG_MMU | |
| 14 | #ifndef CONFIG_MMU | ||
| 15 | |||
| 16 | #define tlb_flush(tlb) ((void) tlb) | ||
| 17 | |||
| 18 | #else /* CONFIG_MMU */ | ||
| 19 | 14 | ||
| 20 | #include <asm/glue.h> | 15 | #include <asm/glue.h> |
| 21 | 16 | ||
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 2c1f0050c9c..8f6ed43861f 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
| @@ -1437,7 +1437,7 @@ arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
| 1437 | 1437 | ||
| 1438 | return space_cccc_1100_010x(insn, asi); | 1438 | return space_cccc_1100_010x(insn, asi); |
| 1439 | 1439 | ||
| 1440 | } else if ((insn & 0x0e000000) == 0x0c400000) { | 1440 | } else if ((insn & 0x0e000000) == 0x0c000000) { |
| 1441 | 1441 | ||
| 1442 | return space_cccc_110x(insn, asi); | 1442 | return space_cccc_110x(insn, asi); |
| 1443 | 1443 | ||
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index b8af96ea62e..2c79eec1926 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
| @@ -97,28 +97,34 @@ set_irq_affinity(int irq, | |||
| 97 | irq, cpu); | 97 | irq, cpu); |
| 98 | return err; | 98 | return err; |
| 99 | #else | 99 | #else |
| 100 | return 0; | 100 | return -EINVAL; |
| 101 | #endif | 101 | #endif |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static int | 104 | static int |
| 105 | init_cpu_pmu(void) | 105 | init_cpu_pmu(void) |
| 106 | { | 106 | { |
| 107 | int i, err = 0; | 107 | int i, irqs, err = 0; |
| 108 | struct platform_device *pdev = pmu_devices[ARM_PMU_DEVICE_CPU]; | 108 | struct platform_device *pdev = pmu_devices[ARM_PMU_DEVICE_CPU]; |
| 109 | 109 | ||
| 110 | if (!pdev) { | 110 | if (!pdev) |
| 111 | err = -ENODEV; | 111 | return -ENODEV; |
| 112 | goto out; | 112 | |
| 113 | } | 113 | irqs = pdev->num_resources; |
| 114 | |||
| 115 | /* | ||
| 116 | * If we have a single PMU interrupt that we can't shift, assume that | ||
| 117 | * we're running on a uniprocessor machine and continue. | ||
| 118 | */ | ||
| 119 | if (irqs == 1 && !irq_can_set_affinity(platform_get_irq(pdev, 0))) | ||
| 120 | return 0; | ||
| 114 | 121 | ||
| 115 | for (i = 0; i < pdev->num_resources; ++i) { | 122 | for (i = 0; i < irqs; ++i) { |
| 116 | err = set_irq_affinity(platform_get_irq(pdev, i), i); | 123 | err = set_irq_affinity(platform_get_irq(pdev, i), i); |
| 117 | if (err) | 124 | if (err) |
| 118 | break; | 125 | break; |
| 119 | } | 126 | } |
| 120 | 127 | ||
| 121 | out: | ||
| 122 | return err; | 128 | return err; |
| 123 | } | 129 | } |
| 124 | 130 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 420b8d6485d..5ea4fb718b9 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -226,8 +226,8 @@ int cpu_architecture(void) | |||
| 226 | * Register 0 and check for VMSAv7 or PMSAv7 */ | 226 | * Register 0 and check for VMSAv7 or PMSAv7 */ |
| 227 | asm("mrc p15, 0, %0, c0, c1, 4" | 227 | asm("mrc p15, 0, %0, c0, c1, 4" |
| 228 | : "=r" (mmfr0)); | 228 | : "=r" (mmfr0)); |
| 229 | if ((mmfr0 & 0x0000000f) == 0x00000003 || | 229 | if ((mmfr0 & 0x0000000f) >= 0x00000003 || |
| 230 | (mmfr0 & 0x000000f0) == 0x00000030) | 230 | (mmfr0 & 0x000000f0) >= 0x00000030) |
| 231 | cpu_arch = CPU_ARCH_ARMv7; | 231 | cpu_arch = CPU_ARCH_ARMv7; |
| 232 | else if ((mmfr0 & 0x0000000f) == 0x00000002 || | 232 | else if ((mmfr0 & 0x0000000f) == 0x00000002 || |
| 233 | (mmfr0 & 0x000000f0) == 0x00000020) | 233 | (mmfr0 & 0x000000f0) == 0x00000020) |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 907d5a620bc..abaf8445ce2 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
| @@ -474,7 +474,9 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka, | |||
| 474 | unsigned long handler = (unsigned long)ka->sa.sa_handler; | 474 | unsigned long handler = (unsigned long)ka->sa.sa_handler; |
| 475 | unsigned long retcode; | 475 | unsigned long retcode; |
| 476 | int thumb = 0; | 476 | int thumb = 0; |
| 477 | unsigned long cpsr = regs->ARM_cpsr & ~PSR_f; | 477 | unsigned long cpsr = regs->ARM_cpsr & ~(PSR_f | PSR_E_BIT); |
| 478 | |||
| 479 | cpsr |= PSR_ENDSTATE; | ||
| 478 | 480 | ||
| 479 | /* | 481 | /* |
| 480 | * Maybe we need to deliver a 32-bit signal to a 26-bit task. | 482 | * Maybe we need to deliver a 32-bit signal to a 26-bit task. |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 86b66f3f203..61462790757 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
| @@ -21,6 +21,12 @@ | |||
| 21 | #define ARM_CPU_KEEP(x) | 21 | #define ARM_CPU_KEEP(x) |
| 22 | #endif | 22 | #endif |
| 23 | 23 | ||
| 24 | #if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) | ||
| 25 | #define ARM_EXIT_KEEP(x) x | ||
| 26 | #else | ||
| 27 | #define ARM_EXIT_KEEP(x) | ||
| 28 | #endif | ||
| 29 | |||
| 24 | OUTPUT_ARCH(arm) | 30 | OUTPUT_ARCH(arm) |
| 25 | ENTRY(stext) | 31 | ENTRY(stext) |
| 26 | 32 | ||
| @@ -43,6 +49,7 @@ SECTIONS | |||
| 43 | _sinittext = .; | 49 | _sinittext = .; |
| 44 | HEAD_TEXT | 50 | HEAD_TEXT |
| 45 | INIT_TEXT | 51 | INIT_TEXT |
| 52 | ARM_EXIT_KEEP(EXIT_TEXT) | ||
| 46 | _einittext = .; | 53 | _einittext = .; |
| 47 | ARM_CPU_DISCARD(PROC_INFO) | 54 | ARM_CPU_DISCARD(PROC_INFO) |
| 48 | __arch_info_begin = .; | 55 | __arch_info_begin = .; |
| @@ -67,6 +74,7 @@ SECTIONS | |||
| 67 | #ifndef CONFIG_XIP_KERNEL | 74 | #ifndef CONFIG_XIP_KERNEL |
| 68 | __init_begin = _stext; | 75 | __init_begin = _stext; |
| 69 | INIT_DATA | 76 | INIT_DATA |
| 77 | ARM_EXIT_KEEP(EXIT_DATA) | ||
| 70 | #endif | 78 | #endif |
| 71 | } | 79 | } |
| 72 | 80 | ||
| @@ -162,6 +170,7 @@ SECTIONS | |||
| 162 | . = ALIGN(PAGE_SIZE); | 170 | . = ALIGN(PAGE_SIZE); |
| 163 | __init_begin = .; | 171 | __init_begin = .; |
| 164 | INIT_DATA | 172 | INIT_DATA |
| 173 | ARM_EXIT_KEEP(EXIT_DATA) | ||
| 165 | . = ALIGN(PAGE_SIZE); | 174 | . = ALIGN(PAGE_SIZE); |
| 166 | __init_end = .; | 175 | __init_end = .; |
| 167 | #endif | 176 | #endif |
| @@ -247,6 +256,8 @@ SECTIONS | |||
| 247 | } | 256 | } |
| 248 | #endif | 257 | #endif |
| 249 | 258 | ||
| 259 | NOTES | ||
| 260 | |||
| 250 | BSS_SECTION(0, 0, 0) | 261 | BSS_SECTION(0, 0, 0) |
| 251 | _end = .; | 262 | _end = .; |
| 252 | 263 | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear320.h b/arch/arm/mach-spear3xx/include/mach/spear320.h index cacf17a958c..53677e464d4 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear320.h +++ b/arch/arm/mach-spear3xx/include/mach/spear320.h | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | #define SPEAR320_SMII1_BASE 0xAB000000 | 62 | #define SPEAR320_SMII1_BASE 0xAB000000 |
| 63 | #define SPEAR320_SMII1_SIZE 0x01000000 | 63 | #define SPEAR320_SMII1_SIZE 0x01000000 |
| 64 | 64 | ||
| 65 | #define SPEAR320_SOC_CONFIG_BASE 0xB4000000 | 65 | #define SPEAR320_SOC_CONFIG_BASE 0xB3000000 |
| 66 | #define SPEAR320_SOC_CONFIG_SIZE 0x00000070 | 66 | #define SPEAR320_SOC_CONFIG_SIZE 0x00000070 |
| 67 | /* Interrupt registers offsets and masks */ | 67 | /* Interrupt registers offsets and masks */ |
| 68 | #define INT_STS_MASK_REG 0x04 | 68 | #define INT_STS_MASK_REG 0x04 |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 170c9bb9586..f2ce38e085d 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
| @@ -49,7 +49,13 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask) | |||
| 49 | static inline void cache_sync(void) | 49 | static inline void cache_sync(void) |
| 50 | { | 50 | { |
| 51 | void __iomem *base = l2x0_base; | 51 | void __iomem *base = l2x0_base; |
| 52 | |||
| 53 | #ifdef CONFIG_ARM_ERRATA_753970 | ||
| 54 | /* write to an unmmapped register */ | ||
| 55 | writel_relaxed(0, base + L2X0_DUMMY_REG); | ||
| 56 | #else | ||
| 52 | writel_relaxed(0, base + L2X0_CACHE_SYNC); | 57 | writel_relaxed(0, base + L2X0_CACHE_SYNC); |
| 58 | #endif | ||
| 53 | cache_wait(base + L2X0_CACHE_SYNC, 1); | 59 | cache_wait(base + L2X0_CACHE_SYNC, 1); |
| 54 | } | 60 | } |
| 55 | 61 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 0c1172b56b4..8e335623913 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -264,6 +264,12 @@ __v7_setup: | |||
| 264 | orreq r10, r10, #1 << 6 @ set bit #6 | 264 | orreq r10, r10, #1 << 6 @ set bit #6 |
| 265 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 265 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
| 266 | #endif | 266 | #endif |
| 267 | #ifdef CONFIG_ARM_ERRATA_751472 | ||
| 268 | cmp r6, #0x30 @ present prior to r3p0 | ||
| 269 | mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register | ||
| 270 | orrlt r10, r10, #1 << 11 @ set bit #11 | ||
| 271 | mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register | ||
| 272 | #endif | ||
| 267 | 273 | ||
| 268 | 3: mov r10, #0 | 274 | 3: mov r10, #0 |
| 269 | #ifdef HARVARD_CACHE | 275 | #ifdef HARVARD_CACHE |
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h index 99ba6789cc9..6dd455bafdf 100644 --- a/arch/arm/plat-spear/include/plat/uncompress.h +++ b/arch/arm/plat-spear/include/plat/uncompress.h | |||
| @@ -24,10 +24,10 @@ static inline void putc(int c) | |||
| 24 | { | 24 | { |
| 25 | void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE; | 25 | void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE; |
| 26 | 26 | ||
| 27 | while (readl(base + UART01x_FR) & UART01x_FR_TXFF) | 27 | while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF) |
| 28 | barrier(); | 28 | barrier(); |
| 29 | 29 | ||
| 30 | writel(c, base + UART01x_DR); | 30 | writel_relaxed(c, base + UART01x_DR); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static inline void flush(void) | 33 | static inline void flush(void) |
diff --git a/arch/arm/plat-spear/include/plat/vmalloc.h b/arch/arm/plat-spear/include/plat/vmalloc.h index 09e9372aea2..8c8b24d0704 100644 --- a/arch/arm/plat-spear/include/plat/vmalloc.h +++ b/arch/arm/plat-spear/include/plat/vmalloc.h | |||
| @@ -14,6 +14,6 @@ | |||
| 14 | #ifndef __PLAT_VMALLOC_H | 14 | #ifndef __PLAT_VMALLOC_H |
| 15 | #define __PLAT_VMALLOC_H | 15 | #define __PLAT_VMALLOC_H |
| 16 | 16 | ||
| 17 | #define VMALLOC_END 0xF0000000 | 17 | #define VMALLOC_END 0xF0000000UL |
| 18 | 18 | ||
| 19 | #endif /* __PLAT_VMALLOC_H */ | 19 | #endif /* __PLAT_VMALLOC_H */ |
