diff options
-rw-r--r-- | arch/microblaze/include/asm/futex.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/io.h | 5 | ||||
-rw-r--r-- | arch/microblaze/kernel/ftrace.c | 12 | ||||
-rw-r--r-- | arch/microblaze/kernel/ptrace.c | 1 | ||||
-rw-r--r-- | lib/Kconfig.debug | 2 |
5 files changed, 10 insertions, 12 deletions
diff --git a/arch/microblaze/include/asm/futex.h b/arch/microblaze/include/asm/futex.h index 8dbb6e7a03a2..ad3fd61b2fe7 100644 --- a/arch/microblaze/include/asm/futex.h +++ b/arch/microblaze/include/asm/futex.h | |||
@@ -55,7 +55,7 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
55 | __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); | 55 | __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); |
56 | break; | 56 | break; |
57 | case FUTEX_OP_ANDN: | 57 | case FUTEX_OP_ANDN: |
58 | __futex_atomic_op("and %1,%0,%4;", ret, oldval, uaddr, oparg); | 58 | __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); |
59 | break; | 59 | break; |
60 | case FUTEX_OP_XOR: | 60 | case FUTEX_OP_XOR: |
61 | __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); | 61 | __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index 32d621a56aee..e45a6eea92e0 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -108,6 +108,11 @@ static inline void writel(unsigned int v, volatile void __iomem *addr) | |||
108 | #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) | 108 | #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) |
109 | #define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) | 109 | #define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) |
110 | 110 | ||
111 | #define ioread16be(addr) __raw_readw((u16 *)(addr)) | ||
112 | #define ioread32be(addr) __raw_readl((u32 *)(addr)) | ||
113 | #define iowrite16be(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) | ||
114 | #define iowrite32be(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) | ||
115 | |||
111 | /* These are the definitions for the x86 IO instructions | 116 | /* These are the definitions for the x86 IO instructions |
112 | * inb/inw/inl/outb/outw/outl, the "string" versions | 117 | * inb/inw/inl/outb/outw/outl, the "string" versions |
113 | * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions | 118 | * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions |
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 388b31ca65a1..515feb404555 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c | |||
@@ -151,13 +151,10 @@ int ftrace_make_nop(struct module *mod, | |||
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int ret_addr; /* initialized as 0 by default */ | ||
155 | |||
156 | /* I believe that first is called ftrace_make_nop before this function */ | 154 | /* I believe that first is called ftrace_make_nop before this function */ |
157 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | 155 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) |
158 | { | 156 | { |
159 | int ret; | 157 | int ret; |
160 | ret_addr = addr; /* saving where the barrier jump is */ | ||
161 | pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", | 158 | pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", |
162 | __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); | 159 | __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); |
163 | ret = ftrace_modify_code(rec->ip, imm); | 160 | ret = ftrace_modify_code(rec->ip, imm); |
@@ -194,12 +191,9 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
194 | ret = ftrace_modify_code(ip, upper); | 191 | ret = ftrace_modify_code(ip, upper); |
195 | ret += ftrace_modify_code(ip + 4, lower); | 192 | ret += ftrace_modify_code(ip + 4, lower); |
196 | 193 | ||
197 | /* We just need to remove the rtsd r15, 8 by NOP */ | 194 | /* We just need to replace the rtsd r15, 8 with NOP */ |
198 | BUG_ON(!ret_addr); | 195 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, |
199 | if (ret_addr) | 196 | MICROBLAZE_NOP); |
200 | ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP); | ||
201 | else | ||
202 | ret = 1; /* fault */ | ||
203 | 197 | ||
204 | /* All changes are done - lets do caches consistent */ | 198 | /* All changes are done - lets do caches consistent */ |
205 | flush_icache(); | 199 | flush_icache(); |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 6d6349a145f9..a4a7770c6140 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -75,7 +75,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
75 | { | 75 | { |
76 | int rval; | 76 | int rval; |
77 | unsigned long val = 0; | 77 | unsigned long val = 0; |
78 | unsigned long copied; | ||
79 | 78 | ||
80 | switch (request) { | 79 | switch (request) { |
81 | /* Read/write the word at location ADDR in the registers. */ | 80 | /* Read/write the word at location ADDR in the registers. */ |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1fafb4b99c9b..ff017108700d 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -356,7 +356,7 @@ config SLUB_STATS | |||
356 | config DEBUG_KMEMLEAK | 356 | config DEBUG_KMEMLEAK |
357 | bool "Kernel memory leak detector" | 357 | bool "Kernel memory leak detector" |
358 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ | 358 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ |
359 | (X86 || ARM || PPC || S390 || SUPERH) | 359 | (X86 || ARM || PPC || S390 || SUPERH || MICROBLAZE) |
360 | 360 | ||
361 | select DEBUG_FS if SYSFS | 361 | select DEBUG_FS if SYSFS |
362 | select STACKTRACE if STACKTRACE_SUPPORT | 362 | select STACKTRACE if STACKTRACE_SUPPORT |