diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/bug.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/edac.h | 48 | ||||
-rw-r--r-- | arch/arm/include/asm/gpio.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/hardirq.h | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/opcodes.h | 20 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/setup.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/swab.h | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/unwind.h | 16 |
10 files changed, 83 insertions, 37 deletions
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index 9abe7a07d5a..fac79dceb73 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #define __BUG(__file, __line, __value) \ | 33 | #define __BUG(__file, __line, __value) \ |
34 | do { \ | 34 | do { \ |
35 | BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \ | ||
36 | asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ | 35 | asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ |
37 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ | 36 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ |
38 | "2:\t.asciz " #__file "\n" \ | 37 | "2:\t.asciz " #__file "\n" \ |
diff --git a/arch/arm/include/asm/edac.h b/arch/arm/include/asm/edac.h new file mode 100644 index 00000000000..0df7a2c1fc3 --- /dev/null +++ b/arch/arm/include/asm/edac.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Calxeda, Inc. | ||
3 | * Based on PPC version Copyright 2007 MontaVista Software, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #ifndef ASM_EDAC_H | ||
18 | #define ASM_EDAC_H | ||
19 | /* | ||
20 | * ECC atomic, DMA, SMP and interrupt safe scrub function. | ||
21 | * Implements the per arch atomic_scrub() that EDAC use for software | ||
22 | * ECC scrubbing. It reads memory and then writes back the original | ||
23 | * value, allowing the hardware to detect and correct memory errors. | ||
24 | */ | ||
25 | static inline void atomic_scrub(void *va, u32 size) | ||
26 | { | ||
27 | #if __LINUX_ARM_ARCH__ >= 6 | ||
28 | unsigned int *virt_addr = va; | ||
29 | unsigned int temp, temp2; | ||
30 | unsigned int i; | ||
31 | |||
32 | for (i = 0; i < size / sizeof(*virt_addr); i++, virt_addr++) { | ||
33 | /* Very carefully read and write to memory atomically | ||
34 | * so we are interrupt, DMA and SMP safe. | ||
35 | */ | ||
36 | __asm__ __volatile__("\n" | ||
37 | "1: ldrex %0, [%2]\n" | ||
38 | " strex %1, %0, [%2]\n" | ||
39 | " teq %1, #0\n" | ||
40 | " bne 1b\n" | ||
41 | : "=&r"(temp), "=&r"(temp2) | ||
42 | : "r"(virt_addr) | ||
43 | : "cc"); | ||
44 | } | ||
45 | #endif | ||
46 | } | ||
47 | |||
48 | #endif | ||
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 11ad0bfbb0a..7151753b098 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ARCH_ARM_GPIO_H | 1 | #ifndef _ARCH_ARM_GPIO_H |
2 | #define _ARCH_ARM_GPIO_H | 2 | #define _ARCH_ARM_GPIO_H |
3 | 3 | ||
4 | #if CONFIG_ARCH_NR_GPIO > 0 | ||
5 | #define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO | ||
6 | #endif | ||
7 | |||
4 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
5 | #include <mach/gpio.h> | 9 | #include <mach/gpio.h> |
6 | 10 | ||
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index ddf07a92a6c..436e60b2cf7 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
@@ -27,23 +27,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu); | |||
27 | 27 | ||
28 | #define arch_irq_stat_cpu smp_irq_stat_cpu | 28 | #define arch_irq_stat_cpu smp_irq_stat_cpu |
29 | 29 | ||
30 | #if NR_IRQS > 512 | ||
31 | #define HARDIRQ_BITS 10 | ||
32 | #elif NR_IRQS > 256 | ||
33 | #define HARDIRQ_BITS 9 | ||
34 | #else | ||
35 | #define HARDIRQ_BITS 8 | ||
36 | #endif | ||
37 | |||
38 | /* | ||
39 | * The hardirq mask has to be large enough to have space | ||
40 | * for potentially all IRQ sources in the system nesting | ||
41 | * on a single CPU: | ||
42 | */ | ||
43 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
44 | # error HARDIRQ_BITS is too low! | ||
45 | #endif | ||
46 | |||
47 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 | 30 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 |
48 | 31 | ||
49 | #endif /* __ASM_HARDIRQ_H */ | 32 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h new file mode 100644 index 00000000000..c0efdd60966 --- /dev/null +++ b/arch/arm/include/asm/opcodes.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/opcodes.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARM_OPCODES_H | ||
10 | #define __ASM_ARM_OPCODES_H | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | ||
14 | #endif | ||
15 | |||
16 | #define ARM_OPCODE_CONDTEST_FAIL 0 | ||
17 | #define ARM_OPCODE_CONDTEST_PASS 1 | ||
18 | #define ARM_OPCODE_CONDTEST_UNCOND 2 | ||
19 | |||
20 | #endif /* __ASM_ARM_OPCODES_H */ | ||
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 111979057e6..f66626d71e7 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -299,6 +299,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
299 | * We provide our own arch_get_unmapped_area to cope with VIPT caches. | 299 | * We provide our own arch_get_unmapped_area to cope with VIPT caches. |
300 | */ | 300 | */ |
301 | #define HAVE_ARCH_UNMAPPED_AREA | 301 | #define HAVE_ARCH_UNMAPPED_AREA |
302 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | ||
302 | 303 | ||
303 | /* | 304 | /* |
304 | * remap a physical page `pfn' of size `size' with page protection `prot' | 305 | * remap a physical page `pfn' of size `size' with page protection `prot' |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index b2d9df5667a..ce280b8d613 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -123,6 +123,8 @@ static inline void prefetch(const void *ptr) | |||
123 | 123 | ||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #define HAVE_ARCH_PICK_MMAP_LAYOUT | ||
127 | |||
126 | #endif | 128 | #endif |
127 | 129 | ||
128 | #endif /* __ASM_ARM_PROCESSOR_H */ | 130 | #endif /* __ASM_ARM_PROCESSOR_H */ |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 915696dd9c7..23ebc0c82a3 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -192,11 +192,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, fn } | |||
192 | /* | 192 | /* |
193 | * Memory map description | 193 | * Memory map description |
194 | */ | 194 | */ |
195 | #ifdef CONFIG_ARCH_EP93XX | 195 | #define NR_BANKS CONFIG_ARM_NR_BANKS |
196 | # define NR_BANKS 16 | ||
197 | #else | ||
198 | # define NR_BANKS 8 | ||
199 | #endif | ||
200 | 196 | ||
201 | struct membank { | 197 | struct membank { |
202 | phys_addr_t start; | 198 | phys_addr_t start; |
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad20eff..32ee164a2f6 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -24,12 +24,13 @@ | |||
24 | 24 | ||
25 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 | 25 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 |
26 | 26 | ||
27 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) | 27 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) |
28 | { | 28 | { |
29 | __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); | 29 | __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); |
30 | return x; | 30 | return x; |
31 | } | 31 | } |
32 | #define __arch_swab16 __arch_swab16 | 32 | #define __arch_swahb32 __arch_swahb32 |
33 | #define __arch_swab16(x) ((__u16)__arch_swahb32(x)) | ||
33 | 34 | ||
34 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | 35 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
35 | { | 36 | { |
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h index a5edf421005..d1c3f3a71c9 100644 --- a/arch/arm/include/asm/unwind.h +++ b/arch/arm/include/asm/unwind.h | |||
@@ -30,14 +30,15 @@ enum unwind_reason_code { | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct unwind_idx { | 32 | struct unwind_idx { |
33 | unsigned long addr; | 33 | unsigned long addr_offset; |
34 | unsigned long insn; | 34 | unsigned long insn; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct unwind_table { | 37 | struct unwind_table { |
38 | struct list_head list; | 38 | struct list_head list; |
39 | struct unwind_idx *start; | 39 | const struct unwind_idx *start; |
40 | struct unwind_idx *stop; | 40 | const struct unwind_idx *origin; |
41 | const struct unwind_idx *stop; | ||
41 | unsigned long begin_addr; | 42 | unsigned long begin_addr; |
42 | unsigned long end_addr; | 43 | unsigned long end_addr; |
43 | }; | 44 | }; |
@@ -49,15 +50,6 @@ extern struct unwind_table *unwind_table_add(unsigned long start, | |||
49 | extern void unwind_table_del(struct unwind_table *tab); | 50 | extern void unwind_table_del(struct unwind_table *tab); |
50 | extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk); | 51 | extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk); |
51 | 52 | ||
52 | #ifdef CONFIG_ARM_UNWIND | ||
53 | extern int __init unwind_init(void); | ||
54 | #else | ||
55 | static inline int __init unwind_init(void) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | #endif | ||
60 | |||
61 | #endif /* !__ASSEMBLY__ */ | 53 | #endif /* !__ASSEMBLY__ */ |
62 | 54 | ||
63 | #ifdef CONFIG_ARM_UNWIND | 55 | #ifdef CONFIG_ARM_UNWIND |