diff options
-rw-r--r-- | arch/sh/drivers/dma/dma-sh.c | 10 | ||||
-rw-r--r-- | arch/sh/drivers/pci/ops-titan.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 15 | ||||
-rw-r--r-- | arch/sh/mm/cache-sh7705.c | 19 | ||||
-rw-r--r-- | arch/sh/mm/fault.c | 13 | ||||
-rw-r--r-- | arch/sh/mm/pmb.c | 4 | ||||
-rw-r--r-- | include/asm-sh/dma.h | 1 | ||||
-rw-r--r-- | include/asm-sh/irq.h | 5 | ||||
-rw-r--r-- | include/asm-sh/kexec.h | 2 | ||||
-rw-r--r-- | include/asm-sh/system.h | 36 |
11 files changed, 35 insertions, 73 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 40a480d20aaf..cbbe8bce3d67 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c | |||
@@ -80,21 +80,23 @@ static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs) | |||
80 | 80 | ||
81 | static int sh_dmac_request_dma(struct dma_channel *chan) | 81 | static int sh_dmac_request_dma(struct dma_channel *chan) |
82 | { | 82 | { |
83 | char name[32]; | ||
84 | |||
85 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) | 83 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) |
86 | return 0; | 84 | return 0; |
87 | 85 | ||
88 | snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", | 86 | chan->name = kzalloc(32, GFP_KERNEL); |
87 | if (unlikely(chan->name == NULL)) | ||
88 | return -ENOMEM; | ||
89 | snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)", | ||
89 | chan->chan); | 90 | chan->chan); |
90 | 91 | ||
91 | return request_irq(get_dmte_irq(chan->chan), dma_tei, | 92 | return request_irq(get_dmte_irq(chan->chan), dma_tei, |
92 | IRQF_DISABLED, name, chan); | 93 | IRQF_DISABLED, chan->name, chan); |
93 | } | 94 | } |
94 | 95 | ||
95 | static void sh_dmac_free_dma(struct dma_channel *chan) | 96 | static void sh_dmac_free_dma(struct dma_channel *chan) |
96 | { | 97 | { |
97 | free_irq(get_dmte_irq(chan->chan), chan); | 98 | free_irq(get_dmte_irq(chan->chan), chan); |
99 | kfree(chan->name); | ||
98 | } | 100 | } |
99 | 101 | ||
100 | static void | 102 | static void |
diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c index 9c8b2027c35d..c6097bcd97fd 100644 --- a/arch/sh/drivers/pci/ops-titan.c +++ b/arch/sh/drivers/pci/ops-titan.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/pci.h> | ||
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include <asm/titan.h> | 21 | #include <asm/titan.h> |
21 | #include "pci-sh4.h" | 22 | #include "pci-sh4.h" |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index cff8d36f91b0..4afdec071700 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -507,7 +507,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
507 | * unified cache on the SH-2 and SH-3, as well as the harvard | 507 | * unified cache on the SH-2 and SH-3, as well as the harvard |
508 | * style cache on the SH-4. | 508 | * style cache on the SH-4. |
509 | */ | 509 | */ |
510 | if (test_bit(SH_CACHE_COMBINED, &(boot_cpu_data.icache.flags))) { | 510 | if (boot_cpu_data.icache.flags & SH_CACHE_COMBINED) { |
511 | seq_printf(m, "unified\n"); | 511 | seq_printf(m, "unified\n"); |
512 | show_cacheinfo(m, "cache", boot_cpu_data.icache); | 512 | show_cacheinfo(m, "cache", boot_cpu_data.icache); |
513 | } else { | 513 | } else { |
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index fd73ab0326e9..7f3a42244cab 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -27,20 +27,11 @@ EXPORT_SYMBOL(sh_mv); | |||
27 | 27 | ||
28 | /* platform dependent support */ | 28 | /* platform dependent support */ |
29 | EXPORT_SYMBOL(dump_fpu); | 29 | EXPORT_SYMBOL(dump_fpu); |
30 | EXPORT_SYMBOL(enable_irq); | ||
31 | EXPORT_SYMBOL(disable_irq); | ||
32 | EXPORT_SYMBOL(probe_irq_mask); | ||
33 | EXPORT_SYMBOL(kernel_thread); | 30 | EXPORT_SYMBOL(kernel_thread); |
34 | EXPORT_SYMBOL(disable_irq_nosync); | ||
35 | EXPORT_SYMBOL(irq_desc); | 31 | EXPORT_SYMBOL(irq_desc); |
36 | EXPORT_SYMBOL(no_irq_type); | 32 | EXPORT_SYMBOL(no_irq_type); |
37 | 33 | ||
38 | EXPORT_SYMBOL(strstr); | ||
39 | EXPORT_SYMBOL(strlen); | 34 | EXPORT_SYMBOL(strlen); |
40 | EXPORT_SYMBOL(strnlen); | ||
41 | EXPORT_SYMBOL(strchr); | ||
42 | EXPORT_SYMBOL(strcat); | ||
43 | EXPORT_SYMBOL(strncat); | ||
44 | 35 | ||
45 | /* PCI exports */ | 36 | /* PCI exports */ |
46 | #ifdef CONFIG_PCI | 37 | #ifdef CONFIG_PCI |
@@ -51,13 +42,8 @@ EXPORT_SYMBOL(pci_free_consistent); | |||
51 | /* mem exports */ | 42 | /* mem exports */ |
52 | EXPORT_SYMBOL(memchr); | 43 | EXPORT_SYMBOL(memchr); |
53 | EXPORT_SYMBOL(memcpy); | 44 | EXPORT_SYMBOL(memcpy); |
54 | EXPORT_SYMBOL(memcpy_fromio); | ||
55 | EXPORT_SYMBOL(memcpy_toio); | ||
56 | EXPORT_SYMBOL(memset); | 45 | EXPORT_SYMBOL(memset); |
57 | EXPORT_SYMBOL(memset_io); | ||
58 | EXPORT_SYMBOL(memmove); | 46 | EXPORT_SYMBOL(memmove); |
59 | EXPORT_SYMBOL(memcmp); | ||
60 | EXPORT_SYMBOL(memscan); | ||
61 | EXPORT_SYMBOL(__copy_user); | 47 | EXPORT_SYMBOL(__copy_user); |
62 | EXPORT_SYMBOL(boot_cpu_data); | 48 | EXPORT_SYMBOL(boot_cpu_data); |
63 | 49 | ||
@@ -124,5 +110,4 @@ EXPORT_SYMBOL(csum_partial); | |||
124 | #ifdef CONFIG_IPV6 | 110 | #ifdef CONFIG_IPV6 |
125 | EXPORT_SYMBOL(csum_ipv6_magic); | 111 | EXPORT_SYMBOL(csum_ipv6_magic); |
126 | #endif | 112 | #endif |
127 | EXPORT_SYMBOL(consistent_sync); | ||
128 | EXPORT_SYMBOL(clear_page); | 113 | EXPORT_SYMBOL(clear_page); |
diff --git a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c index bf94eedb0a8e..045abdf078f5 100644 --- a/arch/sh/mm/cache-sh7705.c +++ b/arch/sh/mm/cache-sh7705.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * for more details. | 9 | * for more details. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | |||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/mman.h> | 13 | #include <linux/mman.h> |
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
@@ -25,14 +24,10 @@ | |||
25 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
26 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
27 | 26 | ||
28 | /* The 32KB cache on the SH7705 suffers from the same synonym problem | 27 | /* |
29 | * as SH4 CPUs */ | 28 | * The 32KB cache on the SH7705 suffers from the same synonym problem |
30 | 29 | * as SH4 CPUs | |
31 | #define __pte_offset(address) \ | 30 | */ |
32 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | ||
33 | #define pte_offset(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \ | ||
34 | __pte_offset(address)) | ||
35 | |||
36 | static inline void cache_wback_all(void) | 31 | static inline void cache_wback_all(void) |
37 | { | 32 | { |
38 | unsigned long ways, waysize, addrstart; | 33 | unsigned long ways, waysize, addrstart; |
@@ -73,7 +68,6 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
73 | __flush_wback_region((void *)start, end - start); | 68 | __flush_wback_region((void *)start, end - start); |
74 | } | 69 | } |
75 | 70 | ||
76 | |||
77 | /* | 71 | /* |
78 | * Writeback&Invalidate the D-cache of the page | 72 | * Writeback&Invalidate the D-cache of the page |
79 | */ | 73 | */ |
@@ -128,7 +122,6 @@ static void __flush_dcache_page(unsigned long phys) | |||
128 | local_irq_restore(flags); | 122 | local_irq_restore(flags); |
129 | } | 123 | } |
130 | 124 | ||
131 | |||
132 | /* | 125 | /* |
133 | * Write back & invalidate the D-cache of the page. | 126 | * Write back & invalidate the D-cache of the page. |
134 | * (To avoid "alias" issues) | 127 | * (To avoid "alias" issues) |
@@ -186,7 +179,8 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | |||
186 | * | 179 | * |
187 | * ADDRESS: Virtual Address (U0 address) | 180 | * ADDRESS: Virtual Address (U0 address) |
188 | */ | 181 | */ |
189 | void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn) | 182 | void flush_cache_page(struct vm_area_struct *vma, unsigned long address, |
183 | unsigned long pfn) | ||
190 | { | 184 | { |
191 | __flush_dcache_page(pfn << PAGE_SHIFT); | 185 | __flush_dcache_page(pfn << PAGE_SHIFT); |
192 | } | 186 | } |
@@ -203,4 +197,3 @@ void flush_icache_page(struct vm_area_struct *vma, struct page *page) | |||
203 | { | 197 | { |
204 | __flush_purge_region(page_address(page), PAGE_SIZE); | 198 | __flush_purge_region(page_address(page), PAGE_SIZE); |
205 | } | 199 | } |
206 | |||
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index dc461d2bc183..c69fd603226a 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -13,6 +13,8 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/hardirq.h> | ||
17 | #include <linux/kprobes.h> | ||
16 | #include <asm/system.h> | 18 | #include <asm/system.h> |
17 | #include <asm/mmu_context.h> | 19 | #include <asm/mmu_context.h> |
18 | #include <asm/kgdb.h> | 20 | #include <asm/kgdb.h> |
@@ -188,15 +190,16 @@ do_sigbus: | |||
188 | /* | 190 | /* |
189 | * Called with interrupts disabled. | 191 | * Called with interrupts disabled. |
190 | */ | 192 | */ |
191 | asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | 193 | asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, |
192 | unsigned long address) | 194 | unsigned long writeaccess, |
195 | unsigned long address) | ||
193 | { | 196 | { |
194 | pgd_t *pgd; | 197 | pgd_t *pgd; |
195 | pud_t *pud; | 198 | pud_t *pud; |
196 | pmd_t *pmd; | 199 | pmd_t *pmd; |
197 | pte_t *pte; | 200 | pte_t *pte; |
198 | pte_t entry; | 201 | pte_t entry; |
199 | struct mm_struct *mm; | 202 | struct mm_struct *mm = current->mm; |
200 | spinlock_t *ptl; | 203 | spinlock_t *ptl; |
201 | int ret = 1; | 204 | int ret = 1; |
202 | 205 | ||
@@ -214,10 +217,10 @@ asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | |||
214 | pgd = pgd_offset_k(address); | 217 | pgd = pgd_offset_k(address); |
215 | mm = NULL; | 218 | mm = NULL; |
216 | } else { | 219 | } else { |
217 | if (unlikely(address >= TASK_SIZE || !(mm = current->mm))) | 220 | if (unlikely(address >= TASK_SIZE || !mm)) |
218 | return 1; | 221 | return 1; |
219 | 222 | ||
220 | pgd = pgd_offset(current->mm, address); | 223 | pgd = pgd_offset(mm, address); |
221 | } | 224 | } |
222 | 225 | ||
223 | pud = pud_offset(pgd, address); | 226 | pud = pud_offset(pgd, address); |
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 819fd0faf022..92e745341e4d 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -337,10 +337,8 @@ static int __init pmb_init(void) | |||
337 | 337 | ||
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
340 | |||
341 | arch_initcall(pmb_init); | 340 | arch_initcall(pmb_init); |
342 | 341 | ||
343 | #ifdef CONFIG_DEBUG_FS | ||
344 | static int pmb_seq_show(struct seq_file *file, void *iter) | 342 | static int pmb_seq_show(struct seq_file *file, void *iter) |
345 | { | 343 | { |
346 | int i; | 344 | int i; |
@@ -399,6 +397,4 @@ static int __init pmb_debugfs_init(void) | |||
399 | 397 | ||
400 | return 0; | 398 | return 0; |
401 | } | 399 | } |
402 | |||
403 | postcore_initcall(pmb_debugfs_init); | 400 | postcore_initcall(pmb_debugfs_init); |
404 | #endif | ||
diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h index e62a6d0ed932..d9daa028689f 100644 --- a/include/asm-sh/dma.h +++ b/include/asm-sh/dma.h | |||
@@ -89,6 +89,7 @@ struct dma_channel { | |||
89 | wait_queue_head_t wait_queue; | 89 | wait_queue_head_t wait_queue; |
90 | 90 | ||
91 | struct sys_device dev; | 91 | struct sys_device dev; |
92 | char *name; | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | struct dma_info { | 95 | struct dma_info { |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 7e8455b1cb44..648102e9236f 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -335,6 +335,11 @@ extern void make_maskreg_irq(unsigned int irq); | |||
335 | extern unsigned short *irq_mask_register; | 335 | extern unsigned short *irq_mask_register; |
336 | 336 | ||
337 | /* | 337 | /* |
338 | * PINT IRQs | ||
339 | */ | ||
340 | void init_IRQ_pint(void); | ||
341 | |||
342 | /* | ||
338 | * Function for "on chip support modules". | 343 | * Function for "on chip support modules". |
339 | */ | 344 | */ |
340 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, | 345 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, |
diff --git a/include/asm-sh/kexec.h b/include/asm-sh/kexec.h index 9dfe59f6fcb5..a5f85e9e428d 100644 --- a/include/asm-sh/kexec.h +++ b/include/asm-sh/kexec.h | |||
@@ -23,6 +23,8 @@ | |||
23 | /* The native architecture */ | 23 | /* The native architecture */ |
24 | #define KEXEC_ARCH KEXEC_ARCH_SH | 24 | #define KEXEC_ARCH KEXEC_ARCH_SH |
25 | 25 | ||
26 | #define MAX_NOTE_BYTES 1024 | ||
27 | |||
26 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
27 | 29 | ||
28 | extern void machine_shutdown(void); | 30 | extern void machine_shutdown(void); |
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 477422afeb0d..6c1f8fde5ac4 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -79,7 +79,7 @@ static inline void sched_cacheflush(void) | |||
79 | } | 79 | } |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | static __inline__ unsigned long tas(volatile int *m) | 82 | static inline unsigned long tas(volatile int *m) |
83 | { | 83 | { |
84 | unsigned long retval; | 84 | unsigned long retval; |
85 | 85 | ||
@@ -161,7 +161,7 @@ static inline void local_irq_enable(void) | |||
161 | } | 161 | } |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | static __inline__ void local_irq_disable(void) | 164 | static inline void local_irq_disable(void) |
165 | { | 165 | { |
166 | unsigned long __dummy; | 166 | unsigned long __dummy; |
167 | __asm__ __volatile__("stc sr, %0\n\t" | 167 | __asm__ __volatile__("stc sr, %0\n\t" |
@@ -172,7 +172,7 @@ static __inline__ void local_irq_disable(void) | |||
172 | : "memory"); | 172 | : "memory"); |
173 | } | 173 | } |
174 | 174 | ||
175 | static __inline__ void set_bl_bit(void) | 175 | static inline void set_bl_bit(void) |
176 | { | 176 | { |
177 | unsigned long __dummy0, __dummy1; | 177 | unsigned long __dummy0, __dummy1; |
178 | 178 | ||
@@ -185,7 +185,7 @@ static __inline__ void set_bl_bit(void) | |||
185 | : "memory"); | 185 | : "memory"); |
186 | } | 186 | } |
187 | 187 | ||
188 | static __inline__ void clear_bl_bit(void) | 188 | static inline void clear_bl_bit(void) |
189 | { | 189 | { |
190 | unsigned long __dummy0, __dummy1; | 190 | unsigned long __dummy0, __dummy1; |
191 | 191 | ||
@@ -207,7 +207,7 @@ static __inline__ void clear_bl_bit(void) | |||
207 | (flags != 0); \ | 207 | (flags != 0); \ |
208 | }) | 208 | }) |
209 | 209 | ||
210 | static __inline__ unsigned long local_irq_save(void) | 210 | static inline unsigned long local_irq_save(void) |
211 | { | 211 | { |
212 | unsigned long flags, __dummy; | 212 | unsigned long flags, __dummy; |
213 | 213 | ||
@@ -223,36 +223,10 @@ static __inline__ unsigned long local_irq_save(void) | |||
223 | return flags; | 223 | return flags; |
224 | } | 224 | } |
225 | 225 | ||
226 | #ifdef DEBUG_CLI_STI | ||
227 | static __inline__ void local_irq_restore(unsigned long x) | ||
228 | { | ||
229 | if ((x & 0x000000f0) != 0x000000f0) | ||
230 | local_irq_enable(); | ||
231 | else { | ||
232 | unsigned long flags; | ||
233 | local_save_flags(flags); | ||
234 | |||
235 | if (flags == 0) { | ||
236 | extern void dump_stack(void); | ||
237 | printk(KERN_ERR "BUG!\n"); | ||
238 | dump_stack(); | ||
239 | local_irq_disable(); | ||
240 | } | ||
241 | } | ||
242 | } | ||
243 | #else | ||
244 | #define local_irq_restore(x) do { \ | 226 | #define local_irq_restore(x) do { \ |
245 | if ((x & 0x000000f0) != 0x000000f0) \ | 227 | if ((x & 0x000000f0) != 0x000000f0) \ |
246 | local_irq_enable(); \ | 228 | local_irq_enable(); \ |
247 | } while (0) | 229 | } while (0) |
248 | #endif | ||
249 | |||
250 | #define really_restore_flags(x) do { \ | ||
251 | if ((x & 0x000000f0) != 0x000000f0) \ | ||
252 | local_irq_enable(); \ | ||
253 | else \ | ||
254 | local_irq_disable(); \ | ||
255 | } while (0) | ||
256 | 230 | ||
257 | /* | 231 | /* |
258 | * Jump to P2 area. | 232 | * Jump to P2 area. |