Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Remove unused variable from ptrace
microblaze: io.h: Add io big-endian function
microblaze: Enable memory leak detector
microblaze: Fix futex code
microblaze: Fix ftrace_update_ftrace_func panic

+10 -12
+1 -1
arch/microblaze/include/asm/futex.h
··· 55 55 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); 56 56 break; 57 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 59 break; 60 60 case FUTEX_OP_XOR: 61 61 __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg);
+5
arch/microblaze/include/asm/io.h
··· 108 108 #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) 109 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 116 /* These are the definitions for the x86 IO instructions 112 117 * inb/inw/inl/outb/outw/outl, the "string" versions 113 118 * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
+3 -9
arch/microblaze/kernel/ftrace.c
··· 151 151 return ret; 152 152 } 153 153 154 - static int ret_addr; /* initialized as 0 by default */ 155 - 156 154 /* I believe that first is called ftrace_make_nop before this function */ 157 155 int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) 158 156 { 159 157 int ret; 160 - ret_addr = addr; /* saving where the barrier jump is */ 161 158 pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", 162 159 __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); 163 160 ret = ftrace_modify_code(rec->ip, imm); ··· 191 194 ret = ftrace_modify_code(ip, upper); 192 195 ret += ftrace_modify_code(ip + 4, lower); 193 196 194 - /* We just need to remove the rtsd r15, 8 by NOP */ 195 - BUG_ON(!ret_addr); 196 - if (ret_addr) 197 - ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP); 198 - else 199 - ret = 1; /* fault */ 197 + /* We just need to replace the rtsd r15, 8 with NOP */ 198 + ret += ftrace_modify_code((unsigned long)&ftrace_caller, 199 + MICROBLAZE_NOP); 200 200 201 201 /* All changes are done - lets do caches consistent */ 202 202 flush_icache();
-1
arch/microblaze/kernel/ptrace.c
··· 75 75 { 76 76 int rval; 77 77 unsigned long val = 0; 78 - unsigned long copied; 79 78 80 79 switch (request) { 81 80 /* Read/write the word at location ADDR in the registers. */
+1 -1
lib/Kconfig.debug
··· 356 356 config DEBUG_KMEMLEAK 357 357 bool "Kernel memory leak detector" 358 358 depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ 359 - (X86 || ARM || PPC || S390 || SUPERH) 359 + (X86 || ARM || PPC || S390 || SUPERH || MICROBLAZE) 360 360 361 361 select DEBUG_FS if SYSFS 362 362 select STACKTRACE if STACKTRACE_SUPPORT