1. 04 Aug, 2010 9 commits
    • Steven J. Magnani's avatar
      microblaze: Add stack unwinder · ce3266c0
      Steven J. Magnani authored
      Implement intelligent backtracing by searching for stack frame creation,
      and emitting only return addresses. Use print_hex_dump() to display the
      entire binary kernel stack.
      
      Limitation: MMU kernels are not currently able to trace beyond a system trap
      (interrupt, syscall, etc.). It is the intent of this patch to provide
      infrastructure that can be extended to add this capability later.
      
      Changes from V1:
      * Removed checks in find_frame_creation() that prevented location of the frame
        creation instruction in heavily optimized code
      * Various formatting/commenting/file location tweaks per review comments
      * Dropped Kconfig option to enable STACKTRACE as something logically separate
      Signed-off-by: default avatarSteven J. Magnani <steve@digidescorp.com>
      ce3266c0
    • Steven J. Magnani's avatar
      microblaze: Allow PAGE_SIZE configuration · ba9c4f88
      Steven J. Magnani authored
      Allow developer to configure memory page size at compile time.
      Larger pages can improve performance on some workloads.
      
      Based on PowerPC code.
      Signed-off-by: default avatarSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      ba9c4f88
    • Michal Simek's avatar
      microblaze: Trace hardirqs · 0d9ec762
      Michal Simek authored
      Add trace_hardirqs_off and trace_hardirqs_on to do_IRQ function.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      0d9ec762
    • Michal Simek's avatar
      microblaze: Fix sys_clone syscall · 570e3e23
      Michal Simek authored
      sys_clone syscall ignored args which this patch mapped to args
      which are passing from glibc.
      
      Here is the origin problem description.
      
      "I ran the static libgcc tests (very few of them are there, they are
      mostly dynamically linked) and some of  them fail with an assertion in
      fork() system call (tid != pid), I looked at the microblaze/entry.S
      file and it looks suspicious (ignores arguments 3-5)"
      
      Arg mapping should be:
      glibc ARCH_FORK(...) -> do_fork(...)
      r5 -> r5   (clone_flags)
      r6  -> r6 (stack_start, use parent->stack if NULL)
      pt_regs -> r7 (pt_regs)
      r7 -> r8 (stack_size)
      r8 -> r9 (parent_tidptr)
      r9 -> r10 (child_tidptr)
      Signed-off-by: default avatarJohn Williams <john.williams@petalogix.com>
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      570e3e23
    • Michal Simek's avatar
      microblaze: Disable FRAME_POINTER selection · 79aac889
      Michal Simek authored
      Microblaze doesn't support frame pointers. Ftrace code
      uses CALLER_ADDR1 which is defined in linux/ftrace.h. For Microblaze
      is 0.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      79aac889
    • Michal Simek's avatar
      microblaze: Fix copy_to_user_page macro · 6847ba91
      Michal Simek authored
      copy_to_user_page macro is used in mm/memory.c:access_process_vm
      function. This function is called from ptrace code (POKETEXT, POKEDATA)
      which write data to memory. Microblaze handle physical address for
      caches that's why there is virt_to_phys conversion.
      
      There is potential one location which can caused the problem on WB system.
      
      The important is take a look at write PTRACEs requests
      (POKE/TEXT, DATA, USR).
      
      Note:
      Majority of Microblaze PTRACE code is moved to generic location
      in newer kernel version that's why this solution should work on
      the newest kernel version too.
      
      linux/io.h is in cacheflush because of mm/nommu.c
      
      Tested on a WB system - hello world debugging.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      6847ba91
    • Michal Simek's avatar
      microblaze: Sync noMMU and MMU setup_memory · e0581667
      Michal Simek authored
      Both versions can use the same node to register NODE_DATA(0)
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      e0581667
    • Michal Simek's avatar
      microblaze: Remove unused label · ef787050
      Michal Simek authored
      The label should be remove by
      21e1c936
      
      Warning message:
      arch/microblaze/mm/fault.c: In function 'do_page_fault':
      arch/microblaze/mm/fault.c:229: warning: label 'survive' defined but not used
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      ef787050
    • Michal Simek's avatar
      microblaze: Implement flush_dcache_page macro · 79e87830
      Michal Simek authored
      flush_dcache_page macro is necessary to implement for
      JFFS2 rootfs support on WB system.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      79e87830
  2. 02 Aug, 2010 2 commits
    • Michal Simek's avatar
      microblaze: Fix comment for TLB · af58ed85
      Michal Simek authored
      There is wrong comment for TLB. Early printk uartlite
      console uses TLB 63.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      af58ed85
    • Michal Simek's avatar
      microblaze: Fix __copy_to/from_user_inatomic macros · 8d7ec6ee
      Michal Simek authored
      __copy_to/from_user_inatomic should call __copy_to/from_user
      because there is not necessary to check access because of kernel function.
      
      might_sleep in copy_to/from_user macros is causing problems
      in debug sessions too (CONFIG_DEBUG_SPINLOCK_SLEEP).
      
      BUG: sleeping function called from invalid context at
      .../arch/microblaze/include/asm/uaccess.h:388
      in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper
      1 lock held by swapper/1:
       #0:  (&p->cred_guard_mutex){......}, at: [<c00d4b90>] prepare_bprm_creds+0x2c/0x88
      Kernel Stack:
      ...
      
      Call Trace:
      [<c0006bd4>] microblaze_unwind+0x7c/0x94
      [<c0006684>] show_stack+0xf4/0x190
      [<c0006730>] dump_stack+0x10/0x30
      [<c00103a0>] __might_sleep+0x12c/0x160
      [<c0090de4>] file_read_actor+0x1d8/0x2a8
      [<c0091568>] generic_file_aio_read+0x6b4/0xa64
      [<c00cd778>] do_sync_read+0xac/0x110
      [<c00ce254>] vfs_read+0xc8/0x160
      [<c00d585c>] kernel_read+0x38/0x64
      [<c00d5984>] prepare_binprm+0xfc/0x130
      [<c00d6430>] do_execve+0x228/0x370
      [<c000614c>] microblaze_execve+0x58/0xa4
      
      caused by file_read_actor (mm/filemap.c) which calls
      __copy_to_user_inatomic.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      8d7ec6ee
  3. 01 Aug, 2010 2 commits
  4. 31 Jul, 2010 5 commits
  5. 30 Jul, 2010 8 commits
  6. 29 Jul, 2010 14 commits