1. 08 10月, 2016 1 次提交
  2. 11 5月, 2015 1 次提交
    • C
      tile: improve stack backtrace · 47ad7b9b
      Chris Metcalf 提交于
      This commit fixes a number of issues with the tile backtrace code.
      
      - Don't try to identify userspace shared object or executable paths
        if we are doing a backtrace from an interrupt; it's not legal,
        and also unlikely to be interesting.  Likewise, don't try to do
        it for other address spaces, since d_path() assumes it is being
        called in "current" context.
      
      - Move "in_backtrace" from thread_struct to thread_info.
        This way we can access it even if our stack thread_info has been
        clobbered, which makes backtracing more robust.
      
      - Avoid using "current" directly when testing for is_sigreturn().
        Since "current" may be corrupt, we're better off using kbt->task
        explicitly to look up the vdso_base for the current task.
        Conveniently, this simplifies the internal APIs (we only need
        one is_sigreturn() function now).
      
      - Avoid bogus "Odd fault" warning when pc/sp/ex1 are all zero,
        as is true for kernel threads above the last frame.
      
      - Hook into Tejun Heo's dump_stack() framework in lib/dump_stack.c.
      
      - Write last entry in save_stack_trace() as ULONG_MAX, not zero,
        since ftrace (at least) relies on finding that marker.
      
      - Implement save_stack_trace_regs() and save_strack_trace_user(),
        and set CONFIG_USER_STACKTRACE_SUPPORT.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      47ad7b9b
  3. 14 8月, 2013 1 次提交
    • C
      tile: implement gettimeofday() via vDSO · 4a556f4f
      Chris Metcalf 提交于
      This change creates the framework for vDSO calls, makes the existing
      rt_sigreturn() mechanism use it, and adds a fast gettimeofday().
      Now that we need to expose the vDSO address to userspace, we add
      AT_SYSINFO_EHDR to the set of aux entries provided to userspace.
      (You can disable any extra vDSO support by booting with vdso=0,
      but the rt_sigreturn vDSO page will still be provided.)
      
      Note that glibc has supported the tile vDSO since release 2.17.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      4a556f4f
  4. 21 10月, 2012 1 次提交
  5. 06 6月, 2012 1 次提交
  6. 26 5月, 2012 1 次提交
    • C
      arch/tile: use interrupt critical sections less · 51007004
      Chris Metcalf 提交于
      In general we want to avoid ever touching memory while within an
      interrupt critical section, since the page fault path goes through
      a different path from the hypervisor when in an interrupt critical
      section, and we carefully decided with tilegx that we didn't need
      to support this path in the kernel.  (On tilepro we did implement
      that path as part of supporting atomic instructions in software.)
      
      In practice we always need to touch the kernel stack, since that's
      where we store the interrupt state before releasing the critical
      section, but this change cleans up a few things.  The IRQ_ENABLE
      macro is split up so that when we want to enable interrupts in a
      deferred way (e.g. for cpu_idle or for interrupt return) we can
      read the per-cpu enable mask before entering the critical section.
      The cache-migration code is changed to use interrupt masking instead
      of interrupt critical sections.  And, the interrupt-entry code is
      changed so that we defer loading "tp" from per-cpu data until after
      we have released the interrupt critical section.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      51007004
  7. 03 4月, 2012 1 次提交
  8. 02 3月, 2011 2 次提交
    • C
      arch/tile: use a cleaner technique to enable interrupt for cpu_idle() · 0b989cac
      Chris Metcalf 提交于
      Previously we used iret to atomically return to kernel PL with
      interrupts enabled.  However, it turns out that we are architecturally
      guaranteed that we can just set and clear the "interrupt critical
      section" and only interrupt on the following instruction, so we
      now do that instead, since it's cleaner.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      0b989cac
    • C
      arch/tile: fix __ndelay etc to work better · 13371731
      Chris Metcalf 提交于
      The current implementations of __ndelay and __udelay call a hypervisor
      service to delay, but the hypervisor service isn't actually implemented
      very well, and the consensus is that Linux should handle figuring this
      out natively and not use a hypervisor service.
      
      By converting nanoseconds to cycles, and then spinning until the
      cycle counter reaches the desired cycle, we get several benefits:
      first, we are sensitive to the actual clock speed; second, we use
      less power by issuing a slow SPR read once every six cycles while
      we delay; and third, we properly handle the case of an interrupt by
      exiting at the target time rather than after some number of cycles.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      13371731
  9. 16 10月, 2010 2 次提交
    • C
      arch/tile: parameterize system PLs to support KVM port · a78c942d
      Chris Metcalf 提交于
      While not a port to KVM (yet), this change modifies the kernel
      to be able to build either at PL1 or at PL2 with a suitable
      config switch.  Pushing up this change avoids handling branch
      merge issues going forward with the KVM work.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      a78c942d
    • C
      arch/tile: add Tilera's <arch/sim.h> header as an open-source header · bf65e440
      Chris Metcalf 提交于
      This change adds one of the Tilera standard <arch> headers to the set
      of headers shipped with Linux.  The <arch/sim.h> header provides
      methods for programmatically interacting with the Tilera simulator.
      
      The current <arch/sim.h> provides inline assembly for the _sim_syscall
      function, so the declaration and definition previously provided
      manually in Linux are no longer needed.  We now use the standard
      sim_validate_lines_evicted() method from <arch/sim.h> rather than
      rolling our own direct call to sim_syscall().
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      bf65e440
  10. 07 7月, 2010 1 次提交
    • C
      arch/tile: Miscellaneous cleanup changes. · 0707ad30
      Chris Metcalf 提交于
      This commit is primarily changes caused by reviewing "sparse"
      and "checkpatch" output on our sources, so is somewhat noisy, since
      things like "printk() -> pr_err()" (or whatever) throughout the
      codebase tend to get tedious to read.  Rather than trying to tease
      apart precisely which things changed due to which type of code
      review, this commit includes various cleanups in the code:
      
      - sparse: Add declarations in headers for globals.
      - sparse: Fix __user annotations.
      - sparse: Using gfp_t consistently instead of int.
      - sparse: removing functions not actually used.
      - checkpatch: Clean up printk() warnings by using pr_info(), etc.;
        also avoid partial-line printks except in bootup code.
        - checkpatch: Use exposed structs rather than typedefs.
        - checkpatch: Change some C99 comments to C89 comments.
      
      In addition, a couple of minor other changes are rolled in
      to this commit:
      
      - Add support for a "raise" instruction to cause SIGFPE, etc., to be raised.
      - Remove some compat code that is unnecessary when we fully eliminate
        some of the deprecated syscalls from the generic syscall ABI.
      - Update the tile_defconfig to reflect current config contents.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      0707ad30
  11. 05 6月, 2010 1 次提交