Commit addb2d6c authored by Linus Torvalds's avatar Linus Torvalds

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
parents 84db18bb af2b021f
...@@ -55,7 +55,7 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr) ...@@ -55,7 +55,7 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
__futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg);
break; break;
case FUTEX_OP_ANDN: case FUTEX_OP_ANDN:
__futex_atomic_op("and %1,%0,%4;", ret, oldval, uaddr, oparg); __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg);
break; break;
case FUTEX_OP_XOR: case FUTEX_OP_XOR:
__futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg);
......
...@@ -108,6 +108,11 @@ static inline void writel(unsigned int v, volatile void __iomem *addr) ...@@ -108,6 +108,11 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
#define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr))
#define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) #define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr))
#define ioread16be(addr) __raw_readw((u16 *)(addr))
#define ioread32be(addr) __raw_readl((u32 *)(addr))
#define iowrite16be(v, addr) __raw_writew((u16)(v), (u16 *)(addr))
#define iowrite32be(v, addr) __raw_writel((u32)(v), (u32 *)(addr))
/* These are the definitions for the x86 IO instructions /* These are the definitions for the x86 IO instructions
* inb/inw/inl/outb/outw/outl, the "string" versions * inb/inw/inl/outb/outw/outl, the "string" versions
* insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
......
...@@ -151,13 +151,10 @@ int ftrace_make_nop(struct module *mod, ...@@ -151,13 +151,10 @@ int ftrace_make_nop(struct module *mod,
return ret; return ret;
} }
static int ret_addr; /* initialized as 0 by default */
/* I believe that first is called ftrace_make_nop before this function */ /* I believe that first is called ftrace_make_nop before this function */
int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
{ {
int ret; int ret;
ret_addr = addr; /* saving where the barrier jump is */
pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n",
__func__, (unsigned int)addr, (unsigned int)rec->ip, imm); __func__, (unsigned int)addr, (unsigned int)rec->ip, imm);
ret = ftrace_modify_code(rec->ip, imm); ret = ftrace_modify_code(rec->ip, imm);
...@@ -194,12 +191,9 @@ int ftrace_update_ftrace_func(ftrace_func_t func) ...@@ -194,12 +191,9 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
ret = ftrace_modify_code(ip, upper); ret = ftrace_modify_code(ip, upper);
ret += ftrace_modify_code(ip + 4, lower); ret += ftrace_modify_code(ip + 4, lower);
/* We just need to remove the rtsd r15, 8 by NOP */ /* We just need to replace the rtsd r15, 8 with NOP */
BUG_ON(!ret_addr); ret += ftrace_modify_code((unsigned long)&ftrace_caller,
if (ret_addr) MICROBLAZE_NOP);
ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP);
else
ret = 1; /* fault */
/* All changes are done - lets do caches consistent */ /* All changes are done - lets do caches consistent */
flush_icache(); flush_icache();
......
...@@ -75,7 +75,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -75,7 +75,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{ {
int rval; int rval;
unsigned long val = 0; unsigned long val = 0;
unsigned long copied;
switch (request) { switch (request) {
/* Read/write the word at location ADDR in the registers. */ /* Read/write the word at location ADDR in the registers. */
......
...@@ -356,7 +356,7 @@ config SLUB_STATS ...@@ -356,7 +356,7 @@ config SLUB_STATS
config DEBUG_KMEMLEAK config DEBUG_KMEMLEAK
bool "Kernel memory leak detector" bool "Kernel memory leak detector"
depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \
(X86 || ARM || PPC || S390 || SUPERH) (X86 || ARM || PPC || S390 || SUPERH || MICROBLAZE)
select DEBUG_FS if SYSFS select DEBUG_FS if SYSFS
select STACKTRACE if STACKTRACE_SUPPORT select STACKTRACE if STACKTRACE_SUPPORT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment