diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 13:48:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 13:48:16 -0400 |
commit | 51e8703bdf12e2481b205096c973a3ab6a8ca18b (patch) | |
tree | ed6b4131b8a613e9492488fb2b31d16bc9991ce1 /arch/microblaze/include | |
parent | 1fd06bb1571e2618ae392e2484925bf0dadd7857 (diff) | |
parent | 0b9b0200b0922c29dc251b99700f96dade92214a (diff) |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: (33 commits)
microblaze: Do not copy reset vectors/manual reset vector setup
microblaze: Fix _reset function
microblaze: Fix microblaze init vectors
microblaze: Fix circular headers dependency when ftrace is enabled.
microblaze: Fix typo in Kconfig
microblaze: Add missing export symbols for lib functions
microblaze: Fix /dev/zero corruption from __clear_user()
microblaze: Convert irq_chip to new functions
microblaze: Select GENERIC_HARDIRQS_NO_DEPRECATED
microblaze: Remove stale irq_chip.end
microblaze: Fix sparse warnings - signal.c
microblaze: Fix sparse warning - fault.c
microblaze: Fix missing microblaze specific syscalls declaration
microblaze: Fix sparse warnings - cache.c
microblaze: Fix sparse warning - cpuinfo.h
microblaze: Fix sparse warning - unwind.c
microblaze: Fix sparse warning - consistent_alloc function
microblaze: Fix sparse warnings - ptrace
microblaze: Fix sparse warning - sw_exceptions
microblaze: Fix sparse warning - timer.c
...
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/cacheflush.h | 13 | ||||
-rw-r--r-- | arch/microblaze/include/asm/cpuinfo.h | 4 | ||||
-rw-r--r-- | arch/microblaze/include/asm/entry.h | 36 | ||||
-rw-r--r-- | arch/microblaze/include/asm/exceptions.h | 3 | ||||
-rw-r--r-- | arch/microblaze/include/asm/irq.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/ptrace.h | 14 | ||||
-rw-r--r-- | arch/microblaze/include/asm/syscall.h | 3 | ||||
-rw-r--r-- | arch/microblaze/include/asm/syscalls.h | 8 | ||||
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 8 | ||||
-rw-r--r-- | arch/microblaze/include/asm/unaligned.h | 11 |
12 files changed, 44 insertions, 62 deletions
diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h index 7ebd955460d9..0f553bc009a0 100644 --- a/arch/microblaze/include/asm/cacheflush.h +++ b/arch/microblaze/include/asm/cacheflush.h | |||
@@ -84,12 +84,13 @@ do { \ | |||
84 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 84 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
85 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 85 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
86 | 86 | ||
87 | |||
88 | #define flush_cache_dup_mm(mm) do { } while (0) | 87 | #define flush_cache_dup_mm(mm) do { } while (0) |
89 | #define flush_cache_vmap(start, end) do { } while (0) | 88 | #define flush_cache_vmap(start, end) do { } while (0) |
90 | #define flush_cache_vunmap(start, end) do { } while (0) | 89 | #define flush_cache_vunmap(start, end) do { } while (0) |
91 | #define flush_cache_mm(mm) do { } while (0) | 90 | #define flush_cache_mm(mm) do { } while (0) |
92 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 91 | |
92 | #define flush_cache_page(vma, vmaddr, pfn) \ | ||
93 | flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE); | ||
93 | 94 | ||
94 | /* MS: kgdb code use this macro, wrong len with FLASH */ | 95 | /* MS: kgdb code use this macro, wrong len with FLASH */ |
95 | #if 0 | 96 | #if 0 |
@@ -104,9 +105,13 @@ do { \ | |||
104 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 105 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
105 | do { \ | 106 | do { \ |
106 | u32 addr = virt_to_phys(dst); \ | 107 | u32 addr = virt_to_phys(dst); \ |
107 | invalidate_icache_range((unsigned) (addr), (unsigned) (addr) + (len));\ | ||
108 | memcpy((dst), (src), (len)); \ | 108 | memcpy((dst), (src), (len)); \ |
109 | flush_dcache_range((unsigned) (addr), (unsigned) (addr) + (len));\ | 109 | if (vma->vm_flags & VM_EXEC) { \ |
110 | invalidate_icache_range((unsigned) (addr), \ | ||
111 | (unsigned) (addr) + PAGE_SIZE); \ | ||
112 | flush_dcache_range((unsigned) (addr), \ | ||
113 | (unsigned) (addr) + PAGE_SIZE); \ | ||
114 | } \ | ||
110 | } while (0) | 115 | } while (0) |
111 | 116 | ||
112 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 117 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h index cd257537ae54..d8f013347a9e 100644 --- a/arch/microblaze/include/asm/cpuinfo.h +++ b/arch/microblaze/include/asm/cpuinfo.h | |||
@@ -96,8 +96,8 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu); | |||
96 | 96 | ||
97 | static inline unsigned int fcpu(struct device_node *cpu, char *n) | 97 | static inline unsigned int fcpu(struct device_node *cpu, char *n) |
98 | { | 98 | { |
99 | int *val; | 99 | const __be32 *val; |
100 | return (val = (int *) of_get_property(cpu, n, NULL)) ? | 100 | return (val = of_get_property(cpu, n, NULL)) ? |
101 | be32_to_cpup(val) : 0; | 101 | be32_to_cpup(val) : 0; |
102 | } | 102 | } |
103 | 103 | ||
diff --git a/arch/microblaze/include/asm/entry.h b/arch/microblaze/include/asm/entry.h index ec89f2ad0fe1..af0144b91b79 100644 --- a/arch/microblaze/include/asm/entry.h +++ b/arch/microblaze/include/asm/entry.h | |||
@@ -31,40 +31,4 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */ | |||
31 | DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ | 31 | DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ |
32 | # endif /* __ASSEMBLY__ */ | 32 | # endif /* __ASSEMBLY__ */ |
33 | 33 | ||
34 | #ifndef CONFIG_MMU | ||
35 | |||
36 | /* noMMU hasn't any space for args */ | ||
37 | # define STATE_SAVE_ARG_SPACE (0) | ||
38 | |||
39 | #else /* CONFIG_MMU */ | ||
40 | |||
41 | /* If true, system calls save and restore all registers (except result | ||
42 | * registers, of course). If false, then `call clobbered' registers | ||
43 | * will not be preserved, on the theory that system calls are basically | ||
44 | * function calls anyway, and the caller should be able to deal with it. | ||
45 | * This is a security risk, of course, as `internal' values may leak out | ||
46 | * after a system call, but that certainly doesn't matter very much for | ||
47 | * a processor with no MMU protection! For a protected-mode kernel, it | ||
48 | * would be faster to just zero those registers before returning. | ||
49 | * | ||
50 | * I can not rely on the glibc implementation. If you turn it off make | ||
51 | * sure that r11/r12 is saved in user-space. --KAA | ||
52 | * | ||
53 | * These are special variables using by the kernel trap/interrupt code | ||
54 | * to save registers in, at a time when there are no spare registers we | ||
55 | * can use to do so, and we can't depend on the value of the stack | ||
56 | * pointer. This means that they must be within a signed 16-bit | ||
57 | * displacement of 0x00000000. | ||
58 | */ | ||
59 | |||
60 | /* A `state save frame' is a struct pt_regs preceded by some extra space | ||
61 | * suitable for a function call stack frame. */ | ||
62 | |||
63 | /* Amount of room on the stack reserved for arguments and to satisfy the | ||
64 | * C calling conventions, in addition to the space used by the struct | ||
65 | * pt_regs that actually holds saved values. */ | ||
66 | #define STATE_SAVE_ARG_SPACE (6*4) /* Up to six arguments */ | ||
67 | |||
68 | #endif /* CONFIG_MMU */ | ||
69 | |||
70 | #endif /* _ASM_MICROBLAZE_ENTRY_H */ | 34 | #endif /* _ASM_MICROBLAZE_ENTRY_H */ |
diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h index 6479097b802b..e6a8ddea1dca 100644 --- a/arch/microblaze/include/asm/exceptions.h +++ b/arch/microblaze/include/asm/exceptions.h | |||
@@ -66,6 +66,9 @@ | |||
66 | asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | 66 | asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, |
67 | int fsr, int addr); | 67 | int fsr, int addr); |
68 | 68 | ||
69 | asmlinkage void sw_exception(struct pt_regs *regs); | ||
70 | void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig); | ||
71 | |||
69 | void die(const char *str, struct pt_regs *fp, long err); | 72 | void die(const char *str, struct pt_regs *fp, long err); |
70 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); | 73 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); |
71 | 74 | ||
diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h index ec5583d6111c..cc54187f3d38 100644 --- a/arch/microblaze/include/asm/irq.h +++ b/arch/microblaze/include/asm/irq.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #define NR_IRQS 32 | 12 | #define NR_IRQS 32 |
13 | #include <asm-generic/irq.h> | 13 | #include <asm-generic/irq.h> |
14 | 14 | ||
15 | #include <linux/interrupt.h> | ||
16 | |||
17 | /* This type is the placeholder for a hardware interrupt number. It has to | 15 | /* This type is the placeholder for a hardware interrupt number. It has to |
18 | * be big enough to enclose whatever representation is used by a given | 16 | * be big enough to enclose whatever representation is used by a given |
19 | * platform. | 17 | * platform. |
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index 885574a73f01..b2af42311a12 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h | |||
@@ -572,7 +572,7 @@ void __init *early_get_page(void); | |||
572 | 572 | ||
573 | extern unsigned long ioremap_bot, ioremap_base; | 573 | extern unsigned long ioremap_bot, ioremap_base; |
574 | 574 | ||
575 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); | 575 | void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle); |
576 | void consistent_free(size_t size, void *vaddr); | 576 | void consistent_free(size_t size, void *vaddr); |
577 | void consistent_sync(void *vaddr, size_t size, int direction); | 577 | void consistent_sync(void *vaddr, size_t size, int direction); |
578 | void consistent_sync_page(struct page *page, unsigned long offset, | 578 | void consistent_sync_page(struct page *page, unsigned long offset, |
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 8eeb09211ece..aed2a6be8e27 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
@@ -155,7 +155,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
155 | # define task_regs(task) ((struct pt_regs *)task_tos(task) - 1) | 155 | # define task_regs(task) ((struct pt_regs *)task_tos(task) - 1) |
156 | 156 | ||
157 | # define task_pt_regs_plus_args(tsk) \ | 157 | # define task_pt_regs_plus_args(tsk) \ |
158 | (((void *)task_pt_regs(tsk)) - STATE_SAVE_ARG_SPACE) | 158 | ((void *)task_pt_regs(tsk)) |
159 | 159 | ||
160 | # define task_sp(task) (task_regs(task)->r1) | 160 | # define task_sp(task) (task_regs(task)->r1) |
161 | # define task_pc(task) (task_regs(task)->pc) | 161 | # define task_pc(task) (task_regs(task)->pc) |
diff --git a/arch/microblaze/include/asm/ptrace.h b/arch/microblaze/include/asm/ptrace.h index d74dbfb92c04..d9b66304d5dd 100644 --- a/arch/microblaze/include/asm/ptrace.h +++ b/arch/microblaze/include/asm/ptrace.h | |||
@@ -66,13 +66,13 @@ void show_regs(struct pt_regs *); | |||
66 | #else /* __KERNEL__ */ | 66 | #else /* __KERNEL__ */ |
67 | 67 | ||
68 | /* pt_regs offsets used by gdbserver etc in ptrace syscalls */ | 68 | /* pt_regs offsets used by gdbserver etc in ptrace syscalls */ |
69 | #define PT_GPR(n) ((n) * sizeof(microblaze_reg_t)) | 69 | #define PT_GPR(n) ((n) * sizeof(microblaze_reg_t)) |
70 | #define PT_PC (32 * sizeof(microblaze_reg_t)) | 70 | #define PT_PC (32 * sizeof(microblaze_reg_t)) |
71 | #define PT_MSR (33 * sizeof(microblaze_reg_t)) | 71 | #define PT_MSR (33 * sizeof(microblaze_reg_t)) |
72 | #define PT_EAR (34 * sizeof(microblaze_reg_t)) | 72 | #define PT_EAR (34 * sizeof(microblaze_reg_t)) |
73 | #define PT_ESR (35 * sizeof(microblaze_reg_t)) | 73 | #define PT_ESR (35 * sizeof(microblaze_reg_t)) |
74 | #define PT_FSR (36 * sizeof(microblaze_reg_t)) | 74 | #define PT_FSR (36 * sizeof(microblaze_reg_t)) |
75 | #define PT_KERNEL_MODE (37 * sizeof(microblaze_reg_t)) | 75 | #define PT_KERNEL_MODE (37 * sizeof(microblaze_reg_t)) |
76 | 76 | ||
77 | #endif /* __KERNEL */ | 77 | #endif /* __KERNEL */ |
78 | 78 | ||
diff --git a/arch/microblaze/include/asm/syscall.h b/arch/microblaze/include/asm/syscall.h index 048dfcd8d89d..9bc431783105 100644 --- a/arch/microblaze/include/asm/syscall.h +++ b/arch/microblaze/include/asm/syscall.h | |||
@@ -96,4 +96,7 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
96 | microblaze_set_syscall_arg(regs, i++, *args++); | 96 | microblaze_set_syscall_arg(regs, i++, *args++); |
97 | } | 97 | } |
98 | 98 | ||
99 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); | ||
100 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | ||
101 | |||
99 | #endif /* __ASM_MICROBLAZE_SYSCALL_H */ | 102 | #endif /* __ASM_MICROBLAZE_SYSCALL_H */ |
diff --git a/arch/microblaze/include/asm/syscalls.h b/arch/microblaze/include/asm/syscalls.h index 720761cc741f..27f2f4c0f39f 100644 --- a/arch/microblaze/include/asm/syscalls.h +++ b/arch/microblaze/include/asm/syscalls.h | |||
@@ -1,5 +1,13 @@ | |||
1 | #ifndef __ASM_MICROBLAZE_SYSCALLS_H | 1 | #ifndef __ASM_MICROBLAZE_SYSCALLS_H |
2 | 2 | ||
3 | asmlinkage long microblaze_vfork(struct pt_regs *regs); | ||
4 | asmlinkage long microblaze_clone(int flags, unsigned long stack, | ||
5 | struct pt_regs *regs); | ||
6 | asmlinkage long microblaze_execve(const char __user *filenamei, | ||
7 | const char __user *const __user *argv, | ||
8 | const char __user *const __user *envp, | ||
9 | struct pt_regs *regs); | ||
10 | |||
3 | asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs); | 11 | asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs); |
4 | #define sys_clone sys_clone | 12 | #define sys_clone sys_clone |
5 | 13 | ||
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index d840f4a2d3c9..5bb95a11880d 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -120,16 +120,16 @@ static inline unsigned long __must_check __clear_user(void __user *to, | |||
120 | { | 120 | { |
121 | /* normal memset with two words to __ex_table */ | 121 | /* normal memset with two words to __ex_table */ |
122 | __asm__ __volatile__ ( \ | 122 | __asm__ __volatile__ ( \ |
123 | "1: sb r0, %2, r0;" \ | 123 | "1: sb r0, %1, r0;" \ |
124 | " addik %0, %0, -1;" \ | 124 | " addik %0, %0, -1;" \ |
125 | " bneid %0, 1b;" \ | 125 | " bneid %0, 1b;" \ |
126 | " addik %2, %2, 1;" \ | 126 | " addik %1, %1, 1;" \ |
127 | "2: " \ | 127 | "2: " \ |
128 | __EX_TABLE_SECTION \ | 128 | __EX_TABLE_SECTION \ |
129 | ".word 1b,2b;" \ | 129 | ".word 1b,2b;" \ |
130 | ".previous;" \ | 130 | ".previous;" \ |
131 | : "=r"(n) \ | 131 | : "=r"(n), "=r"(to) \ |
132 | : "0"(n), "r"(to) | 132 | : "0"(n), "1"(to) |
133 | ); | 133 | ); |
134 | return n; | 134 | return n; |
135 | } | 135 | } |
diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h index 2b97cbe500e9..b162ed880495 100644 --- a/arch/microblaze/include/asm/unaligned.h +++ b/arch/microblaze/include/asm/unaligned.h | |||
@@ -12,18 +12,19 @@ | |||
12 | 12 | ||
13 | # ifdef __KERNEL__ | 13 | # ifdef __KERNEL__ |
14 | 14 | ||
15 | # include <linux/unaligned/be_byteshift.h> | ||
16 | # include <linux/unaligned/le_byteshift.h> | ||
17 | # include <linux/unaligned/generic.h> | ||
18 | |||
19 | |||
20 | # ifdef __MICROBLAZEEL__ | 15 | # ifdef __MICROBLAZEEL__ |
16 | # include <linux/unaligned/le_struct.h> | ||
17 | # include <linux/unaligned/be_byteshift.h> | ||
21 | # define get_unaligned __get_unaligned_le | 18 | # define get_unaligned __get_unaligned_le |
22 | # define put_unaligned __put_unaligned_le | 19 | # define put_unaligned __put_unaligned_le |
23 | # else | 20 | # else |
21 | # include <linux/unaligned/be_struct.h> | ||
22 | # include <linux/unaligned/le_byteshift.h> | ||
24 | # define get_unaligned __get_unaligned_be | 23 | # define get_unaligned __get_unaligned_be |
25 | # define put_unaligned __put_unaligned_be | 24 | # define put_unaligned __put_unaligned_be |
26 | # endif | 25 | # endif |
27 | 26 | ||
27 | # include <linux/unaligned/generic.h> | ||
28 | |||
28 | # endif /* __KERNEL__ */ | 29 | # endif /* __KERNEL__ */ |
29 | #endif /* _ASM_MICROBLAZE_UNALIGNED_H */ | 30 | #endif /* _ASM_MICROBLAZE_UNALIGNED_H */ |