Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
torvalds committed Apr 7, 2010
2 parents 84db18b + af2b021 commit addb2d6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
break;
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;
case FUTEX_OP_XOR:
__futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg);
Expand Down
5 changes: 5 additions & 0 deletions arch/microblaze/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
* inb/inw/inl/outb/outw/outl, the "string" versions
* insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
Expand Down
12 changes: 3 additions & 9 deletions arch/microblaze/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,10 @@ int ftrace_make_nop(struct module *mod,
return ret;
}

static int ret_addr; /* initialized as 0 by default */

/* I believe that first is called ftrace_make_nop before this function */
int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
{
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",
__func__, (unsigned int)addr, (unsigned int)rec->ip, imm);
ret = ftrace_modify_code(rec->ip, imm);
Expand Down Expand Up @@ -194,12 +191,9 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
ret = ftrace_modify_code(ip, upper);
ret += ftrace_modify_code(ip + 4, lower);

/* We just need to remove the rtsd r15, 8 by NOP */
BUG_ON(!ret_addr);
if (ret_addr)
ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP);
else
ret = 1; /* fault */
/* We just need to replace the rtsd r15, 8 with NOP */
ret += ftrace_modify_code((unsigned long)&ftrace_caller,
MICROBLAZE_NOP);

/* All changes are done - lets do caches consistent */
flush_icache();
Expand Down
1 change: 0 additions & 1 deletion arch/microblaze/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
int rval;
unsigned long val = 0;
unsigned long copied;

switch (request) {
/* Read/write the word at location ADDR in the registers. */
Expand Down
2 changes: 1 addition & 1 deletion lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ config SLUB_STATS
config DEBUG_KMEMLEAK
bool "Kernel memory leak detector"
depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \
(X86 || ARM || PPC || S390 || SUPERH)
(X86 || ARM || PPC || S390 || SUPERH || MICROBLAZE)

select DEBUG_FS if SYSFS
select STACKTRACE if STACKTRACE_SUPPORT
Expand Down

0 comments on commit addb2d6

Please sign in to comment.