diff options
Diffstat (limited to 'arch/arm/include/asm')
24 files changed, 330 insertions, 70 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 6cbd8fdc9f1f..bb7d695f3900 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -46,6 +46,14 @@ | |||
46 | # define MULTI_CACHE 1 | 46 | # define MULTI_CACHE 1 |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #if defined(CONFIG_CPU_FA526) | ||
50 | # ifdef _CACHE | ||
51 | # define MULTI_CACHE 1 | ||
52 | # else | ||
53 | # define _CACHE fa | ||
54 | # endif | ||
55 | #endif | ||
56 | |||
49 | #if defined(CONFIG_CPU_ARM926T) | 57 | #if defined(CONFIG_CPU_ARM926T) |
50 | # ifdef _CACHE | 58 | # ifdef _CACHE |
51 | # define MULTI_CACHE 1 | 59 | # define MULTI_CACHE 1 |
@@ -94,6 +102,14 @@ | |||
94 | # endif | 102 | # endif |
95 | #endif | 103 | #endif |
96 | 104 | ||
105 | #if defined(CONFIG_CPU_MOHAWK) | ||
106 | # ifdef _CACHE | ||
107 | # define MULTI_CACHE 1 | ||
108 | # else | ||
109 | # define _CACHE mohawk | ||
110 | # endif | ||
111 | #endif | ||
112 | |||
97 | #if defined(CONFIG_CPU_FEROCEON) | 113 | #if defined(CONFIG_CPU_FEROCEON) |
98 | # define MULTI_CACHE 1 | 114 | # define MULTI_CACHE 1 |
99 | #endif | 115 | #endif |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 22cb14ec3438..ff46dfa68a97 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -15,10 +15,20 @@ | |||
15 | * must not be used by drivers. | 15 | * must not be used by drivers. |
16 | */ | 16 | */ |
17 | #ifndef __arch_page_to_dma | 17 | #ifndef __arch_page_to_dma |
18 | |||
19 | #if !defined(CONFIG_HIGHMEM) | ||
18 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | 20 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) |
19 | { | 21 | { |
20 | return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page)); | 22 | return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page)); |
21 | } | 23 | } |
24 | #elif defined(__pfn_to_bus) | ||
25 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | ||
26 | { | ||
27 | return (dma_addr_t)__pfn_to_bus(page_to_pfn(page)); | ||
28 | } | ||
29 | #else | ||
30 | #error "this machine class needs to define __arch_page_to_dma to use HIGHMEM" | ||
31 | #endif | ||
22 | 32 | ||
23 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 33 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
24 | { | 34 | { |
@@ -57,6 +67,8 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | |||
57 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) | 67 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) |
58 | */ | 68 | */ |
59 | extern void dma_cache_maint(const void *kaddr, size_t size, int rw); | 69 | extern void dma_cache_maint(const void *kaddr, size_t size, int rw); |
70 | extern void dma_cache_maint_page(struct page *page, unsigned long offset, | ||
71 | size_t size, int rw); | ||
60 | 72 | ||
61 | /* | 73 | /* |
62 | * Return whether the given device DMA address mask can be supported | 74 | * Return whether the given device DMA address mask can be supported |
@@ -316,7 +328,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
316 | BUG_ON(!valid_dma_direction(dir)); | 328 | BUG_ON(!valid_dma_direction(dir)); |
317 | 329 | ||
318 | if (!arch_is_coherent()) | 330 | if (!arch_is_coherent()) |
319 | dma_cache_maint(page_address(page) + offset, size, dir); | 331 | dma_cache_maint_page(page, offset, size, dir); |
320 | 332 | ||
321 | return page_to_dma(dev, page) + offset; | 333 | return page_to_dma(dev, page) + offset; |
322 | } | 334 | } |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index df5638f3643a..7edf3536df24 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -19,21 +19,17 @@ | |||
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/scatterlist.h> | 20 | #include <asm/scatterlist.h> |
21 | 21 | ||
22 | typedef unsigned int dmach_t; | ||
23 | |||
24 | #include <mach/isa-dma.h> | 22 | #include <mach/isa-dma.h> |
25 | 23 | ||
26 | /* | 24 | /* |
27 | * DMA modes | 25 | * The DMA modes reflect the settings for the ISA DMA controller |
28 | */ | 26 | */ |
29 | typedef unsigned int dmamode_t; | 27 | #define DMA_MODE_MASK 0xcc |
30 | |||
31 | #define DMA_MODE_MASK 3 | ||
32 | 28 | ||
33 | #define DMA_MODE_READ 0 | 29 | #define DMA_MODE_READ 0x44 |
34 | #define DMA_MODE_WRITE 1 | 30 | #define DMA_MODE_WRITE 0x48 |
35 | #define DMA_MODE_CASCADE 2 | 31 | #define DMA_MODE_CASCADE 0xc0 |
36 | #define DMA_AUTOINIT 4 | 32 | #define DMA_AUTOINIT 0x10 |
37 | 33 | ||
38 | extern spinlock_t dma_spin_lock; | 34 | extern spinlock_t dma_spin_lock; |
39 | 35 | ||
@@ -52,44 +48,44 @@ static inline void release_dma_lock(unsigned long flags) | |||
52 | /* Clear the 'DMA Pointer Flip Flop'. | 48 | /* Clear the 'DMA Pointer Flip Flop'. |
53 | * Write 0 for LSB/MSB, 1 for MSB/LSB access. | 49 | * Write 0 for LSB/MSB, 1 for MSB/LSB access. |
54 | */ | 50 | */ |
55 | #define clear_dma_ff(channel) | 51 | #define clear_dma_ff(chan) |
56 | 52 | ||
57 | /* Set only the page register bits of the transfer address. | 53 | /* Set only the page register bits of the transfer address. |
58 | * | 54 | * |
59 | * NOTE: This is an architecture specific function, and should | 55 | * NOTE: This is an architecture specific function, and should |
60 | * be hidden from the drivers | 56 | * be hidden from the drivers |
61 | */ | 57 | */ |
62 | extern void set_dma_page(dmach_t channel, char pagenr); | 58 | extern void set_dma_page(unsigned int chan, char pagenr); |
63 | 59 | ||
64 | /* Request a DMA channel | 60 | /* Request a DMA channel |
65 | * | 61 | * |
66 | * Some architectures may need to do allocate an interrupt | 62 | * Some architectures may need to do allocate an interrupt |
67 | */ | 63 | */ |
68 | extern int request_dma(dmach_t channel, const char * device_id); | 64 | extern int request_dma(unsigned int chan, const char * device_id); |
69 | 65 | ||
70 | /* Free a DMA channel | 66 | /* Free a DMA channel |
71 | * | 67 | * |
72 | * Some architectures may need to do free an interrupt | 68 | * Some architectures may need to do free an interrupt |
73 | */ | 69 | */ |
74 | extern void free_dma(dmach_t channel); | 70 | extern void free_dma(unsigned int chan); |
75 | 71 | ||
76 | /* Enable DMA for this channel | 72 | /* Enable DMA for this channel |
77 | * | 73 | * |
78 | * On some architectures, this may have other side effects like | 74 | * On some architectures, this may have other side effects like |
79 | * enabling an interrupt and setting the DMA registers. | 75 | * enabling an interrupt and setting the DMA registers. |
80 | */ | 76 | */ |
81 | extern void enable_dma(dmach_t channel); | 77 | extern void enable_dma(unsigned int chan); |
82 | 78 | ||
83 | /* Disable DMA for this channel | 79 | /* Disable DMA for this channel |
84 | * | 80 | * |
85 | * On some architectures, this may have other side effects like | 81 | * On some architectures, this may have other side effects like |
86 | * disabling an interrupt or whatever. | 82 | * disabling an interrupt or whatever. |
87 | */ | 83 | */ |
88 | extern void disable_dma(dmach_t channel); | 84 | extern void disable_dma(unsigned int chan); |
89 | 85 | ||
90 | /* Test whether the specified channel has an active DMA transfer | 86 | /* Test whether the specified channel has an active DMA transfer |
91 | */ | 87 | */ |
92 | extern int dma_channel_active(dmach_t channel); | 88 | extern int dma_channel_active(unsigned int chan); |
93 | 89 | ||
94 | /* Set the DMA scatter gather list for this channel | 90 | /* Set the DMA scatter gather list for this channel |
95 | * | 91 | * |
@@ -97,7 +93,7 @@ extern int dma_channel_active(dmach_t channel); | |||
97 | * especially since some DMA architectures don't update the | 93 | * especially since some DMA architectures don't update the |
98 | * DMA address immediately, but defer it to the enable_dma(). | 94 | * DMA address immediately, but defer it to the enable_dma(). |
99 | */ | 95 | */ |
100 | extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg); | 96 | extern void set_dma_sg(unsigned int chan, struct scatterlist *sg, int nr_sg); |
101 | 97 | ||
102 | /* Set the DMA address for this channel | 98 | /* Set the DMA address for this channel |
103 | * | 99 | * |
@@ -105,9 +101,9 @@ extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg); | |||
105 | * especially since some DMA architectures don't update the | 101 | * especially since some DMA architectures don't update the |
106 | * DMA address immediately, but defer it to the enable_dma(). | 102 | * DMA address immediately, but defer it to the enable_dma(). |
107 | */ | 103 | */ |
108 | extern void __set_dma_addr(dmach_t channel, void *addr); | 104 | extern void __set_dma_addr(unsigned int chan, void *addr); |
109 | #define set_dma_addr(channel, addr) \ | 105 | #define set_dma_addr(chan, addr) \ |
110 | __set_dma_addr(channel, bus_to_virt(addr)) | 106 | __set_dma_addr(chan, bus_to_virt(addr)) |
111 | 107 | ||
112 | /* Set the DMA byte count for this channel | 108 | /* Set the DMA byte count for this channel |
113 | * | 109 | * |
@@ -115,7 +111,7 @@ extern void __set_dma_addr(dmach_t channel, void *addr); | |||
115 | * especially since some DMA architectures don't update the | 111 | * especially since some DMA architectures don't update the |
116 | * DMA count immediately, but defer it to the enable_dma(). | 112 | * DMA count immediately, but defer it to the enable_dma(). |
117 | */ | 113 | */ |
118 | extern void set_dma_count(dmach_t channel, unsigned long count); | 114 | extern void set_dma_count(unsigned int chan, unsigned long count); |
119 | 115 | ||
120 | /* Set the transfer direction for this channel | 116 | /* Set the transfer direction for this channel |
121 | * | 117 | * |
@@ -124,11 +120,11 @@ extern void set_dma_count(dmach_t channel, unsigned long count); | |||
124 | * DMA transfer direction immediately, but defer it to the | 120 | * DMA transfer direction immediately, but defer it to the |
125 | * enable_dma(). | 121 | * enable_dma(). |
126 | */ | 122 | */ |
127 | extern void set_dma_mode(dmach_t channel, dmamode_t mode); | 123 | extern void set_dma_mode(unsigned int chan, unsigned int mode); |
128 | 124 | ||
129 | /* Set the transfer speed for this channel | 125 | /* Set the transfer speed for this channel |
130 | */ | 126 | */ |
131 | extern void set_dma_speed(dmach_t channel, int cycle_ns); | 127 | extern void set_dma_speed(unsigned int chan, int cycle_ns); |
132 | 128 | ||
133 | /* Get DMA residue count. After a DMA transfer, this | 129 | /* Get DMA residue count. After a DMA transfer, this |
134 | * should return zero. Reading this while a DMA transfer is | 130 | * should return zero. Reading this while a DMA transfer is |
@@ -136,7 +132,7 @@ extern void set_dma_speed(dmach_t channel, int cycle_ns); | |||
136 | * If called before the channel has been used, it may return 1. | 132 | * If called before the channel has been used, it may return 1. |
137 | * Otherwise, it returns the number of _bytes_ left to transfer. | 133 | * Otherwise, it returns the number of _bytes_ left to transfer. |
138 | */ | 134 | */ |
139 | extern int get_dma_residue(dmach_t channel); | 135 | extern int get_dma_residue(unsigned int chan); |
140 | 136 | ||
141 | #ifndef NO_DMA | 137 | #ifndef NO_DMA |
142 | #define NO_DMA 255 | 138 | #define NO_DMA 255 |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index a58378c343b9..d7da19bcf928 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -50,6 +50,8 @@ typedef struct user_fp elf_fpregset_t; | |||
50 | #define R_ARM_ABS32 2 | 50 | #define R_ARM_ABS32 2 |
51 | #define R_ARM_CALL 28 | 51 | #define R_ARM_CALL 28 |
52 | #define R_ARM_JUMP24 29 | 52 | #define R_ARM_JUMP24 29 |
53 | #define R_ARM_V4BX 40 | ||
54 | #define R_ARM_PREL31 42 | ||
53 | 55 | ||
54 | /* | 56 | /* |
55 | * These are used to set parameters in the core dumps. | 57 | * These are used to set parameters in the core dumps. |
diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h new file mode 100644 index 000000000000..bbae919bceb4 --- /dev/null +++ b/arch/arm/include/asm/fixmap.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef _ASM_FIXMAP_H | ||
2 | #define _ASM_FIXMAP_H | ||
3 | |||
4 | /* | ||
5 | * Nothing too fancy for now. | ||
6 | * | ||
7 | * On ARM we already have well known fixed virtual addresses imposed by | ||
8 | * the architecture such as the vector page which is located at 0xffff0000, | ||
9 | * therefore a second level page table is already allocated covering | ||
10 | * 0xfff00000 upwards. | ||
11 | * | ||
12 | * The cache flushing code in proc-xscale.S uses the virtual area between | ||
13 | * 0xfffe0000 and 0xfffeffff. | ||
14 | */ | ||
15 | |||
16 | #define FIXADDR_START 0xfff00000UL | ||
17 | #define FIXADDR_TOP 0xfffe0000UL | ||
18 | #define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START) | ||
19 | |||
20 | #define FIX_KMAP_BEGIN 0 | ||
21 | #define FIX_KMAP_END (FIXADDR_SIZE >> PAGE_SHIFT) | ||
22 | |||
23 | #define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) | ||
24 | #define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) | ||
25 | |||
26 | extern void __this_fixmap_does_not_exist(void); | ||
27 | |||
28 | static inline unsigned long fix_to_virt(const unsigned int idx) | ||
29 | { | ||
30 | if (idx >= FIX_KMAP_END) | ||
31 | __this_fixmap_does_not_exist(); | ||
32 | return __fix_to_virt(idx); | ||
33 | } | ||
34 | |||
35 | static inline unsigned int virt_to_fix(const unsigned long vaddr) | ||
36 | { | ||
37 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
38 | return __virt_to_fix(vaddr); | ||
39 | } | ||
40 | |||
41 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/scoop.h b/arch/arm/include/asm/hardware/scoop.h index dfb8330599f9..46492a63a7c4 100644 --- a/arch/arm/include/asm/hardware/scoop.h +++ b/arch/arm/include/asm/hardware/scoop.h | |||
@@ -63,7 +63,5 @@ struct scoop_pcmcia_config { | |||
63 | extern struct scoop_pcmcia_config *platform_scoop_config; | 63 | extern struct scoop_pcmcia_config *platform_scoop_config; |
64 | 64 | ||
65 | void reset_scoop(struct device *dev); | 65 | void reset_scoop(struct device *dev); |
66 | unsigned short __deprecated set_scoop_gpio(struct device *dev, unsigned short bit); | ||
67 | unsigned short __deprecated reset_scoop_gpio(struct device *dev, unsigned short bit); | ||
68 | unsigned short read_scoop_reg(struct device *dev, unsigned short reg); | 66 | unsigned short read_scoop_reg(struct device *dev, unsigned short reg); |
69 | void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data); | 67 | void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data); |
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h new file mode 100644 index 000000000000..7f36d00600b4 --- /dev/null +++ b/arch/arm/include/asm/highmem.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _ASM_HIGHMEM_H | ||
2 | #define _ASM_HIGHMEM_H | ||
3 | |||
4 | #include <asm/kmap_types.h> | ||
5 | |||
6 | #define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE) | ||
7 | #define LAST_PKMAP PTRS_PER_PTE | ||
8 | #define LAST_PKMAP_MASK (LAST_PKMAP - 1) | ||
9 | #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT) | ||
10 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | ||
11 | |||
12 | #define kmap_prot PAGE_KERNEL | ||
13 | |||
14 | #define flush_cache_kmaps() flush_cache_all() | ||
15 | |||
16 | extern pte_t *pkmap_page_table; | ||
17 | |||
18 | #define ARCH_NEEDS_KMAP_HIGH_GET | ||
19 | |||
20 | extern void *kmap_high(struct page *page); | ||
21 | extern void *kmap_high_get(struct page *page); | ||
22 | extern void kunmap_high(struct page *page); | ||
23 | |||
24 | extern void *kmap(struct page *page); | ||
25 | extern void kunmap(struct page *page); | ||
26 | extern void *kmap_atomic(struct page *page, enum km_type type); | ||
27 | extern void kunmap_atomic(void *kvaddr, enum km_type type); | ||
28 | extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); | ||
29 | extern struct page *kmap_atomic_to_page(const void *ptr); | ||
30 | |||
31 | #endif | ||
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index bda489f9f017..f7bd52b1c365 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #define HWCAP_CRUNCH 1024 | 17 | #define HWCAP_CRUNCH 1024 |
18 | #define HWCAP_THUMBEE 2048 | 18 | #define HWCAP_THUMBEE 2048 |
19 | #define HWCAP_NEON 4096 | 19 | #define HWCAP_NEON 4096 |
20 | #define HWCAP_VFPv3 8192 | ||
21 | #define HWCAP_VFPv3D16 16384 | ||
20 | 22 | ||
21 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 23 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
22 | /* | 24 | /* |
diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h index 45def13ee17a..d16ec97ec9a9 100644 --- a/arch/arm/include/asm/kmap_types.h +++ b/arch/arm/include/asm/kmap_types.h | |||
@@ -18,6 +18,7 @@ enum km_type { | |||
18 | KM_IRQ1, | 18 | KM_IRQ1, |
19 | KM_SOFTIRQ0, | 19 | KM_SOFTIRQ0, |
20 | KM_SOFTIRQ1, | 20 | KM_SOFTIRQ1, |
21 | KM_L2_CACHE, | ||
21 | KM_TYPE_NR | 22 | KM_TYPE_NR |
22 | }; | 23 | }; |
23 | 24 | ||
diff --git a/arch/arm/include/asm/mach/dma.h b/arch/arm/include/asm/mach/dma.h index fc7278ea7146..9e614a18e680 100644 --- a/arch/arm/include/asm/mach/dma.h +++ b/arch/arm/include/asm/mach/dma.h | |||
@@ -15,13 +15,13 @@ struct dma_struct; | |||
15 | typedef struct dma_struct dma_t; | 15 | typedef struct dma_struct dma_t; |
16 | 16 | ||
17 | struct dma_ops { | 17 | struct dma_ops { |
18 | int (*request)(dmach_t, dma_t *); /* optional */ | 18 | int (*request)(unsigned int, dma_t *); /* optional */ |
19 | void (*free)(dmach_t, dma_t *); /* optional */ | 19 | void (*free)(unsigned int, dma_t *); /* optional */ |
20 | void (*enable)(dmach_t, dma_t *); /* mandatory */ | 20 | void (*enable)(unsigned int, dma_t *); /* mandatory */ |
21 | void (*disable)(dmach_t, dma_t *); /* mandatory */ | 21 | void (*disable)(unsigned int, dma_t *); /* mandatory */ |
22 | int (*residue)(dmach_t, dma_t *); /* optional */ | 22 | int (*residue)(unsigned int, dma_t *); /* optional */ |
23 | int (*setspeed)(dmach_t, dma_t *, int); /* optional */ | 23 | int (*setspeed)(unsigned int, dma_t *, int); /* optional */ |
24 | char *type; | 24 | const char *type; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct dma_struct { | 27 | struct dma_struct { |
@@ -34,24 +34,21 @@ struct dma_struct { | |||
34 | unsigned int active:1; /* Transfer active */ | 34 | unsigned int active:1; /* Transfer active */ |
35 | unsigned int invalid:1; /* Address/Count changed */ | 35 | unsigned int invalid:1; /* Address/Count changed */ |
36 | 36 | ||
37 | dmamode_t dma_mode; /* DMA mode */ | 37 | unsigned int dma_mode; /* DMA mode */ |
38 | int speed; /* DMA speed */ | 38 | int speed; /* DMA speed */ |
39 | 39 | ||
40 | unsigned int lock; /* Device is allocated */ | 40 | unsigned int lock; /* Device is allocated */ |
41 | const char *device_id; /* Device name */ | 41 | const char *device_id; /* Device name */ |
42 | 42 | ||
43 | unsigned int dma_base; /* Controller base address */ | 43 | const struct dma_ops *d_ops; |
44 | int dma_irq; /* Controller IRQ */ | ||
45 | struct scatterlist cur_sg; /* Current controller buffer */ | ||
46 | unsigned int state; | ||
47 | |||
48 | struct dma_ops *d_ops; | ||
49 | }; | 44 | }; |
50 | 45 | ||
51 | /* Prototype: void arch_dma_init(dma) | 46 | /* |
52 | * Purpose : Initialise architecture specific DMA | 47 | * isa_dma_add - add an ISA-style DMA channel |
53 | * Params : dma - pointer to array of DMA structures | ||
54 | */ | 48 | */ |
55 | extern void arch_dma_init(dma_t *dma); | 49 | extern int isa_dma_add(unsigned int, dma_t *dma); |
56 | 50 | ||
57 | extern void isa_init_dma(dma_t *dma); | 51 | /* |
52 | * Add the ISA DMA controller. Always takes channels 0-7. | ||
53 | */ | ||
54 | extern void isa_init_dma(void); | ||
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 39d949b63e80..58cf91f38e6f 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -26,6 +26,7 @@ struct map_desc { | |||
26 | #define MT_HIGH_VECTORS 8 | 26 | #define MT_HIGH_VECTORS 8 |
27 | #define MT_MEMORY 9 | 27 | #define MT_MEMORY 9 |
28 | #define MT_ROM 10 | 28 | #define MT_ROM 10 |
29 | #define MT_MEMORY_NONCACHED 11 | ||
29 | 30 | ||
30 | #ifdef CONFIG_MMU | 31 | #ifdef CONFIG_MMU |
31 | extern void iotable_init(struct map_desc *, int); | 32 | extern void iotable_init(struct map_desc *, int); |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 0202a7c20e62..85763db87449 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -44,14 +44,21 @@ | |||
44 | * The module space lives between the addresses given by TASK_SIZE | 44 | * The module space lives between the addresses given by TASK_SIZE |
45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | 45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. |
46 | */ | 46 | */ |
47 | #define MODULES_END (PAGE_OFFSET) | 47 | #define MODULES_VADDR (PAGE_OFFSET - 16*1024*1024) |
48 | #define MODULES_VADDR (MODULES_END - 16*1048576) | ||
49 | |||
50 | #if TASK_SIZE > MODULES_VADDR | 48 | #if TASK_SIZE > MODULES_VADDR |
51 | #error Top of user space clashes with start of module space | 49 | #error Top of user space clashes with start of module space |
52 | #endif | 50 | #endif |
53 | 51 | ||
54 | /* | 52 | /* |
53 | * The highmem pkmap virtual space shares the end of the module area. | ||
54 | */ | ||
55 | #ifdef CONFIG_HIGHMEM | ||
56 | #define MODULES_END (PAGE_OFFSET - PMD_SIZE) | ||
57 | #else | ||
58 | #define MODULES_END (PAGE_OFFSET) | ||
59 | #endif | ||
60 | |||
61 | /* | ||
55 | * The XIP kernel gets mapped at the bottom of the module vm area. | 62 | * The XIP kernel gets mapped at the bottom of the module vm area. |
56 | * Since we use sections to map it, this macro replaces the physical address | 63 | * Since we use sections to map it, this macro replaces the physical address |
57 | * with its virtual address while keeping offset from the base section. | 64 | * with its virtual address while keeping offset from the base section. |
@@ -181,6 +188,7 @@ static inline void *phys_to_virt(unsigned long x) | |||
181 | #ifndef __virt_to_bus | 188 | #ifndef __virt_to_bus |
182 | #define __virt_to_bus __virt_to_phys | 189 | #define __virt_to_bus __virt_to_phys |
183 | #define __bus_to_virt __phys_to_virt | 190 | #define __bus_to_virt __phys_to_virt |
191 | #define __pfn_to_bus(x) ((x) << PAGE_SHIFT) | ||
184 | #endif | 192 | #endif |
185 | 193 | ||
186 | static inline __deprecated unsigned long virt_to_bus(void *x) | 194 | static inline __deprecated unsigned long virt_to_bus(void *x) |
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 24b168dc31a3..e4dfa69abb68 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -1,15 +1,27 @@ | |||
1 | #ifndef _ASM_ARM_MODULE_H | 1 | #ifndef _ASM_ARM_MODULE_H |
2 | #define _ASM_ARM_MODULE_H | 2 | #define _ASM_ARM_MODULE_H |
3 | 3 | ||
4 | struct mod_arch_specific | ||
5 | { | ||
6 | int foo; | ||
7 | }; | ||
8 | |||
9 | #define Elf_Shdr Elf32_Shdr | 4 | #define Elf_Shdr Elf32_Shdr |
10 | #define Elf_Sym Elf32_Sym | 5 | #define Elf_Sym Elf32_Sym |
11 | #define Elf_Ehdr Elf32_Ehdr | 6 | #define Elf_Ehdr Elf32_Ehdr |
12 | 7 | ||
8 | struct unwind_table; | ||
9 | |||
10 | struct mod_arch_specific | ||
11 | { | ||
12 | #ifdef CONFIG_ARM_UNWIND | ||
13 | Elf_Shdr *unw_sec_init; | ||
14 | Elf_Shdr *unw_sec_devinit; | ||
15 | Elf_Shdr *unw_sec_core; | ||
16 | Elf_Shdr *sec_init_text; | ||
17 | Elf_Shdr *sec_devinit_text; | ||
18 | Elf_Shdr *sec_core_text; | ||
19 | struct unwind_table *unwind_init; | ||
20 | struct unwind_table *unwind_devinit; | ||
21 | struct unwind_table *unwind_core; | ||
22 | #endif | ||
23 | }; | ||
24 | |||
13 | /* | 25 | /* |
14 | * Include the ARM architecture version. | 26 | * Include the ARM architecture version. |
15 | */ | 27 | */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index f341c9dbd662..e6eb8a67b807 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -76,6 +76,14 @@ | |||
76 | # endif | 76 | # endif |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #ifdef CONFIG_CPU_COPY_FA | ||
80 | # ifdef _USER | ||
81 | # define MULTI_USER 1 | ||
82 | # else | ||
83 | # define _USER fa | ||
84 | # endif | ||
85 | #endif | ||
86 | |||
79 | #ifdef CONFIG_CPU_SA1100 | 87 | #ifdef CONFIG_CPU_SA1100 |
80 | # ifdef _USER | 88 | # ifdef _USER |
81 | # define MULTI_USER 1 | 89 | # define MULTI_USER 1 |
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h index db80203b68e0..3976412685f8 100644 --- a/arch/arm/include/asm/proc-fns.h +++ b/arch/arm/include/asm/proc-fns.h | |||
@@ -89,6 +89,14 @@ | |||
89 | # define CPU_NAME cpu_arm922 | 89 | # define CPU_NAME cpu_arm922 |
90 | # endif | 90 | # endif |
91 | # endif | 91 | # endif |
92 | # ifdef CONFIG_CPU_FA526 | ||
93 | # ifdef CPU_NAME | ||
94 | # undef MULTI_CPU | ||
95 | # define MULTI_CPU | ||
96 | # else | ||
97 | # define CPU_NAME cpu_fa526 | ||
98 | # endif | ||
99 | # endif | ||
92 | # ifdef CONFIG_CPU_ARM925T | 100 | # ifdef CONFIG_CPU_ARM925T |
93 | # ifdef CPU_NAME | 101 | # ifdef CPU_NAME |
94 | # undef MULTI_CPU | 102 | # undef MULTI_CPU |
@@ -185,6 +193,14 @@ | |||
185 | # define CPU_NAME cpu_xsc3 | 193 | # define CPU_NAME cpu_xsc3 |
186 | # endif | 194 | # endif |
187 | # endif | 195 | # endif |
196 | # ifdef CONFIG_CPU_MOHAWK | ||
197 | # ifdef CPU_NAME | ||
198 | # undef MULTI_CPU | ||
199 | # define MULTI_CPU | ||
200 | # else | ||
201 | # define CPU_NAME cpu_mohawk | ||
202 | # endif | ||
203 | # endif | ||
188 | # ifdef CONFIG_CPU_FEROCEON | 204 | # ifdef CONFIG_CPU_FEROCEON |
189 | # ifdef CPU_NAME | 205 | # ifdef CPU_NAME |
190 | # undef MULTI_CPU | 206 | # undef MULTI_CPU |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 73192618f1c2..236a06b9b7ce 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -27,6 +27,8 @@ | |||
27 | /* PTRACE_SYSCALL is 24 */ | 27 | /* PTRACE_SYSCALL is 24 */ |
28 | #define PTRACE_GETCRUNCHREGS 25 | 28 | #define PTRACE_GETCRUNCHREGS 25 |
29 | #define PTRACE_SETCRUNCHREGS 26 | 29 | #define PTRACE_SETCRUNCHREGS 26 |
30 | #define PTRACE_GETVFPREGS 27 | ||
31 | #define PTRACE_SETVFPREGS 28 | ||
30 | 32 | ||
31 | /* | 33 | /* |
32 | * PSR bits | 34 | * PSR bits |
diff --git a/arch/arm/include/asm/sizes.h b/arch/arm/include/asm/sizes.h index 503843db1565..c10d1aa4b487 100644 --- a/arch/arm/include/asm/sizes.h +++ b/arch/arm/include/asm/sizes.h | |||
@@ -43,6 +43,7 @@ | |||
43 | #define SZ_8M 0x00800000 | 43 | #define SZ_8M 0x00800000 |
44 | #define SZ_16M 0x01000000 | 44 | #define SZ_16M 0x01000000 |
45 | #define SZ_32M 0x02000000 | 45 | #define SZ_32M 0x02000000 |
46 | #define SZ_48M 0x03000000 | ||
46 | #define SZ_64M 0x04000000 | 47 | #define SZ_64M 0x04000000 |
47 | #define SZ_128M 0x08000000 | 48 | #define SZ_128M 0x08000000 |
48 | #define SZ_256M 0x10000000 | 49 | #define SZ_256M 0x10000000 |
diff --git a/arch/arm/include/asm/stacktrace.h b/arch/arm/include/asm/stacktrace.h new file mode 100644 index 000000000000..4d0a16441b29 --- /dev/null +++ b/arch/arm/include/asm/stacktrace.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __ASM_STACKTRACE_H | ||
2 | #define __ASM_STACKTRACE_H | ||
3 | |||
4 | struct stackframe { | ||
5 | unsigned long fp; | ||
6 | unsigned long sp; | ||
7 | unsigned long lr; | ||
8 | unsigned long pc; | ||
9 | }; | ||
10 | |||
11 | extern int unwind_frame(struct stackframe *frame); | ||
12 | extern void walk_stackframe(struct stackframe *frame, | ||
13 | int (*fn)(struct stackframe *, void *), void *data); | ||
14 | |||
15 | #endif /* __ASM_STACKTRACE_H */ | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 811be55f338e..bd4dc8ed53d5 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -97,8 +97,8 @@ extern void __show_regs(struct pt_regs *); | |||
97 | extern int cpu_architecture(void); | 97 | extern int cpu_architecture(void); |
98 | extern void cpu_init(void); | 98 | extern void cpu_init(void); |
99 | 99 | ||
100 | void arm_machine_restart(char mode); | 100 | void arm_machine_restart(char mode, const char *cmd); |
101 | extern void (*arm_pm_restart)(char str); | 101 | extern void (*arm_pm_restart)(char str, const char *cmd); |
102 | 102 | ||
103 | #define UDBG_UNDEFINED (1 << 0) | 103 | #define UDBG_UNDEFINED (1 << 0) |
104 | #define UDBG_SYSCALL (1 << 1) | 104 | #define UDBG_SYSCALL (1 << 1) |
@@ -125,6 +125,12 @@ extern unsigned int user_debug; | |||
125 | : : "r" (0) : "memory") | 125 | : : "r" (0) : "memory") |
126 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | 126 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ |
127 | : : "r" (0) : "memory") | 127 | : : "r" (0) : "memory") |
128 | #elif defined(CONFIG_CPU_FA526) | ||
129 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
130 | : : "r" (0) : "memory") | ||
131 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
132 | : : "r" (0) : "memory") | ||
133 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
128 | #else | 134 | #else |
129 | #define isb() __asm__ __volatile__ ("" : : : "memory") | 135 | #define isb() __asm__ __volatile__ ("" : : : "memory") |
130 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | 136 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 68b9ec82a37f..4f8848260ee2 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -99,6 +99,8 @@ static inline struct thread_info *current_thread_info(void) | |||
99 | 99 | ||
100 | #define thread_saved_pc(tsk) \ | 100 | #define thread_saved_pc(tsk) \ |
101 | ((unsigned long)(task_thread_info(tsk)->cpu_context.pc)) | 101 | ((unsigned long)(task_thread_info(tsk)->cpu_context.pc)) |
102 | #define thread_saved_sp(tsk) \ | ||
103 | ((unsigned long)(task_thread_info(tsk)->cpu_context.sp)) | ||
102 | #define thread_saved_fp(tsk) \ | 104 | #define thread_saved_fp(tsk) \ |
103 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) | 105 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) |
104 | 106 | ||
@@ -113,6 +115,8 @@ extern void iwmmxt_task_restore(struct thread_info *, void *); | |||
113 | extern void iwmmxt_task_release(struct thread_info *); | 115 | extern void iwmmxt_task_release(struct thread_info *); |
114 | extern void iwmmxt_task_switch(struct thread_info *); | 116 | extern void iwmmxt_task_switch(struct thread_info *); |
115 | 117 | ||
118 | extern void vfp_sync_state(struct thread_info *thread); | ||
119 | |||
116 | #endif | 120 | #endif |
117 | 121 | ||
118 | /* | 122 | /* |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index b543a054a17e..a62218013c78 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define TLB_V6_D_ASID (1 << 17) | 39 | #define TLB_V6_D_ASID (1 << 17) |
40 | #define TLB_V6_I_ASID (1 << 18) | 40 | #define TLB_V6_I_ASID (1 << 18) |
41 | 41 | ||
42 | #define TLB_BTB (1 << 28) | ||
42 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | 43 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ |
43 | #define TLB_DCLEAN (1 << 30) | 44 | #define TLB_DCLEAN (1 << 30) |
44 | #define TLB_WB (1 << 31) | 45 | #define TLB_WB (1 << 31) |
@@ -53,6 +54,7 @@ | |||
53 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction | 54 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction |
54 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction | 55 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction |
55 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) | 56 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) |
57 | * fa - Faraday (v4 with write buffer with UTLB and branch target buffer (BTB)) | ||
56 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction | 58 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction |
57 | * v7wbi - identical to v6wbi | 59 | * v7wbi - identical to v6wbi |
58 | */ | 60 | */ |
@@ -89,6 +91,22 @@ | |||
89 | # define v4_always_flags (-1UL) | 91 | # define v4_always_flags (-1UL) |
90 | #endif | 92 | #endif |
91 | 93 | ||
94 | #define fa_tlb_flags (TLB_WB | TLB_BTB | TLB_DCLEAN | \ | ||
95 | TLB_V4_U_FULL | TLB_V4_U_PAGE) | ||
96 | |||
97 | #ifdef CONFIG_CPU_TLB_FA | ||
98 | # define fa_possible_flags fa_tlb_flags | ||
99 | # define fa_always_flags fa_tlb_flags | ||
100 | # ifdef _TLB | ||
101 | # define MULTI_TLB 1 | ||
102 | # else | ||
103 | # define _TLB fa | ||
104 | # endif | ||
105 | #else | ||
106 | # define fa_possible_flags 0 | ||
107 | # define fa_always_flags (-1UL) | ||
108 | #endif | ||
109 | |||
92 | #define v4wbi_tlb_flags (TLB_WB | TLB_DCLEAN | \ | 110 | #define v4wbi_tlb_flags (TLB_WB | TLB_DCLEAN | \ |
93 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ | 111 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ |
94 | TLB_V4_I_PAGE | TLB_V4_D_PAGE) | 112 | TLB_V4_I_PAGE | TLB_V4_D_PAGE) |
@@ -140,7 +158,7 @@ | |||
140 | # define v4wb_always_flags (-1UL) | 158 | # define v4wb_always_flags (-1UL) |
141 | #endif | 159 | #endif |
142 | 160 | ||
143 | #define v6wbi_tlb_flags (TLB_WB | TLB_DCLEAN | \ | 161 | #define v6wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ |
144 | TLB_V6_I_FULL | TLB_V6_D_FULL | \ | 162 | TLB_V6_I_FULL | TLB_V6_D_FULL | \ |
145 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | \ | 163 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | \ |
146 | TLB_V6_I_ASID | TLB_V6_D_ASID) | 164 | TLB_V6_I_ASID | TLB_V6_D_ASID) |
@@ -267,6 +285,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
267 | v4wbi_possible_flags | \ | 285 | v4wbi_possible_flags | \ |
268 | fr_possible_flags | \ | 286 | fr_possible_flags | \ |
269 | v4wb_possible_flags | \ | 287 | v4wb_possible_flags | \ |
288 | fa_possible_flags | \ | ||
270 | v6wbi_possible_flags | \ | 289 | v6wbi_possible_flags | \ |
271 | v7wbi_possible_flags) | 290 | v7wbi_possible_flags) |
272 | 291 | ||
@@ -275,6 +294,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
275 | v4wbi_always_flags & \ | 294 | v4wbi_always_flags & \ |
276 | fr_always_flags & \ | 295 | fr_always_flags & \ |
277 | v4wb_always_flags & \ | 296 | v4wb_always_flags & \ |
297 | fa_always_flags & \ | ||
278 | v6wbi_always_flags & \ | 298 | v6wbi_always_flags & \ |
279 | v7wbi_always_flags) | 299 | v7wbi_always_flags) |
280 | 300 | ||
@@ -297,9 +317,7 @@ static inline void local_flush_tlb_all(void) | |||
297 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) | 317 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) |
298 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); | 318 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); |
299 | 319 | ||
300 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | 320 | if (tlb_flag(TLB_BTB)) { |
301 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
302 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
303 | /* flush the branch target cache */ | 321 | /* flush the branch target cache */ |
304 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 322 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
305 | dsb(); | 323 | dsb(); |
@@ -334,9 +352,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
334 | if (tlb_flag(TLB_V6_I_ASID)) | 352 | if (tlb_flag(TLB_V6_I_ASID)) |
335 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); | 353 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); |
336 | 354 | ||
337 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | 355 | if (tlb_flag(TLB_BTB)) { |
338 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
339 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
340 | /* flush the branch target cache */ | 356 | /* flush the branch target cache */ |
341 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 357 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
342 | dsb(); | 358 | dsb(); |
@@ -374,9 +390,7 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
374 | if (tlb_flag(TLB_V6_I_PAGE)) | 390 | if (tlb_flag(TLB_V6_I_PAGE)) |
375 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); | 391 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); |
376 | 392 | ||
377 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | 393 | if (tlb_flag(TLB_BTB)) { |
378 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
379 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
380 | /* flush the branch target cache */ | 394 | /* flush the branch target cache */ |
381 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 395 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
382 | dsb(); | 396 | dsb(); |
@@ -411,9 +425,7 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
411 | if (tlb_flag(TLB_V6_I_PAGE)) | 425 | if (tlb_flag(TLB_V6_I_PAGE)) |
412 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); | 426 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); |
413 | 427 | ||
414 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | 428 | if (tlb_flag(TLB_BTB)) { |
415 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
416 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
417 | /* flush the branch target cache */ | 429 | /* flush the branch target cache */ |
418 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 430 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
419 | dsb(); | 431 | dsb(); |
diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h index aa399aec568e..491960bf4260 100644 --- a/arch/arm/include/asm/traps.h +++ b/arch/arm/include/asm/traps.h | |||
@@ -25,5 +25,6 @@ static inline int in_exception_text(unsigned long ptr) | |||
25 | } | 25 | } |
26 | 26 | ||
27 | extern void __init early_trap_init(void); | 27 | extern void __init early_trap_init(void); |
28 | extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame); | ||
28 | 29 | ||
29 | #endif | 30 | #endif |
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h new file mode 100644 index 000000000000..a5edf421005c --- /dev/null +++ b/arch/arm/include/asm/unwind.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/unwind.h | ||
3 | * | ||
4 | * Copyright (C) 2008 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_UNWIND_H | ||
21 | #define __ASM_UNWIND_H | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | |||
25 | /* Unwind reason code according the the ARM EABI documents */ | ||
26 | enum unwind_reason_code { | ||
27 | URC_OK = 0, /* operation completed successfully */ | ||
28 | URC_CONTINUE_UNWIND = 8, | ||
29 | URC_FAILURE = 9 /* unspecified failure of some kind */ | ||
30 | }; | ||
31 | |||
32 | struct unwind_idx { | ||
33 | unsigned long addr; | ||
34 | unsigned long insn; | ||
35 | }; | ||
36 | |||
37 | struct unwind_table { | ||
38 | struct list_head list; | ||
39 | struct unwind_idx *start; | ||
40 | struct unwind_idx *stop; | ||
41 | unsigned long begin_addr; | ||
42 | unsigned long end_addr; | ||
43 | }; | ||
44 | |||
45 | extern struct unwind_table *unwind_table_add(unsigned long start, | ||
46 | unsigned long size, | ||
47 | unsigned long text_addr, | ||
48 | unsigned long text_size); | ||
49 | extern void unwind_table_del(struct unwind_table *tab); | ||
50 | extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk); | ||
51 | |||
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__ */ | ||
62 | |||
63 | #ifdef CONFIG_ARM_UNWIND | ||
64 | #define UNWIND(code...) code | ||
65 | #else | ||
66 | #define UNWIND(code...) | ||
67 | #endif | ||
68 | |||
69 | #endif /* __ASM_UNWIND_H */ | ||
diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h index 825c1e7c582d..df95e050f9dd 100644 --- a/arch/arm/include/asm/user.h +++ b/arch/arm/include/asm/user.h | |||
@@ -81,4 +81,13 @@ struct user{ | |||
81 | #define HOST_TEXT_START_ADDR (u.start_code) | 81 | #define HOST_TEXT_START_ADDR (u.start_code) |
82 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | 82 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) |
83 | 83 | ||
84 | /* | ||
85 | * User specific VFP registers. If only VFPv2 is present, registers 16 to 31 | ||
86 | * are ignored by the ptrace system call. | ||
87 | */ | ||
88 | struct user_vfp { | ||
89 | unsigned long long fpregs[32]; | ||
90 | unsigned long fpscr; | ||
91 | }; | ||
92 | |||
84 | #endif /* _ARM_USER_H */ | 93 | #endif /* _ARM_USER_H */ |