1. 23 4月, 2015 6 次提交
  2. 22 4月, 2015 6 次提交
  3. 21 4月, 2015 1 次提交
  4. 19 4月, 2015 5 次提交
  5. 18 4月, 2015 10 次提交
    • K
      config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected · a6dfa128
      Konrad Rzeszutek Wilk 提交于
      A huge amount of NIC drivers use the DMA API, however if
      compiled under 32-bit an very important part of the DMA API can
      be ommitted leading to the drivers not working at all
      (especially if used with 'swiotlb=force iommu=soft').
      
      As Prashant Sreedharan explains it: "the driver [tg3] uses
      DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of
      the dma "mapping" and dma_unmap_addr() to get the "mapping"
      value. On most of the platforms this is a no-op, but ... with
      "iommu=soft and swiotlb=force" this house keeping is required,
      ... otherwise we pass 0 while calling pci_unmap_/pci_dma_sync_
      instead of the DMA address."
      
      As such enable this even when using 32-bit kernels.
      Reported-by: NIan Jackson <Ian.Jackson@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NPrashant Sreedharan <prashant@broadcom.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Chan <mchan@broadcom.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: boris.ostrovsky@oracle.com
      Cc: cascardo@linux.vnet.ibm.com
      Cc: david.vrabel@citrix.com
      Cc: sanjeevb@broadcom.com
      Cc: siva.kallam@broadcom.com
      Cc: vyasevich@gmail.com
      Cc: xen-devel@lists.xensource.com
      Link: http://lkml.kernel.org/r/20150417190448.GA9462@l.oracle.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      a6dfa128
    • I
      perf/x86/intel/pt: Fix and clean up error handling in pt_event_add() · 0c99241c
      Ingo Molnar 提交于
      Dan Carpenter reported that pt_event_add() has buggy
      error handling logic: it returns 0 instead of -EBUSY when
      it fails to start a newly added event.
      
      Furthermore, the control flow in this function is messy,
      with cleanup labels mixed with direct returns.
      
      Fix the bug and clean up the code by converting it to
      a straight fast path for the regular non-failing case,
      plus a clear sequence of cascading goto labels to do
      all cleanup.
      
      NOTE: I materially changed the existing clean up logic in the
      pt_event_start() failure case to use the direct
      perf_aux_output_end() path, not pt_event_del(), because
      perf_aux_output_end() is enough here.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150416103830.GB7847@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      0c99241c
    • C
      tile: nohz: warn if nohz_full uses hypervisor shared cores · 128f3cb9
      Chris Metcalf 提交于
      The "hypervisor shared" cores are ones that the Tilera hypervisor
      uses to receive interrupts to manage hypervisor-owned devices.
      It's a bad idea to try to use those cores with nohz_full, since
      they will get interrupted unpredictably -- and invisibly to Linux
      tracing tools, since the interrupts are delivered at a higher
      privilege level to the Tilera hypervisor.
      
      Generate a clear warning at boot up that this doesn't end well
      for the nohz_full cores in question.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      128f3cb9
    • T
      tile: ftrace: fix function_graph tracer issues · 437d3e12
      Tony Lu 提交于
      - Add support for ARCH_SUPPORTS_FTRACE_OPS
      - Replace the instruction in ftrace_call with the bundle {move r10, lr;
      jal ftrace_stub}, so that the lr contains the right value after returning
      from ftrace_stub.  An alternative fix might be to leave the instruction
      in ftrace_call alone when it is being updated with ftrace_stub.
      Signed-off-by: NTony Lu <zlu@ezchip.com>
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      437d3e12
    • C
      tile: map data region shadow of kernel as R/W · a84f2423
      Chris Metcalf 提交于
      This is necessary for things like reading /proc/kcore, doing ftrace,
      etc.  It happens by default when using huge pages to map the kernel
      data, but not when using small pages.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      a84f2423
    • C
      tile: support CONTEXT_TRACKING and thus NOHZ_FULL · 49e4e156
      Chris Metcalf 提交于
      Add the TIF_NOHZ flag appropriately.
      
      Add call to user_exit() on entry to do_work_pending() and on entry
      to syscalls via do_syscall_trace_enter(), and also the top of
      do_syscall_trace_exit() just because it's done in x86.
      
      Add call to user_enter() at the bottom of do_work_pending() once we
      have no more work to do before returning to userspace.
      
      Wrap all the trap code in exception_enter() / exception_exit().
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      49e4e156
    • C
      tile: support arch_irq_work_raise · b340c656
      Chris Metcalf 提交于
      Tile includes a hypervisor hook to deliver messages to arbitrary
      tiles, so we can use that to raise an interrupt as soon as
      possible on our own core.  Unfortunately the Tilera hypervisor
      disabled that support on principle in previous releases, but
      it will be available in MDE 4.3.4 and later.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      b340c656
    • C
      arch: tile: fix null pointer dereference on pt_regs pointer · 9088616f
      Colin Ian King 提交于
      Cppcheck reports the following issue:
      [arch/tile/kernel/stack.c:116]: (error) Possible null
        pointer dereference: p
      
      In this case, on reporting on an odd fault, p is set to NULL
      and immediately afterwords p is dereferenced iff
      !kbt->profile is false.  Rather than doing this check just
      return NULL rather than falling through to the potential
      null pointer dereference (since the original intentional
      outcome would be to return NULL anyhow) for this odd fault
      case.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com> [tweaked lightly]
      9088616f
    • D
      tile/elf: reorganize notify_exec() · 5a3b4e80
      Davidlohr Bueso 提交于
      In the future mm->exe_file will be done without mmap_sem
      serialization, thus isolate and reorganize the tile elf
      code to make the transition easier. Good users will, make
      use of the more standard get_mm_exe_file(), requiring only
      holding the mmap_sem to read the value, and relying on reference
      counting to make sure that the exe file won't dissappear
      underneath us.
      
      The visible effects of this patch are:
      
         o We now take and drop the mmap_sem more often. Instead of
           just in arch_setup_additional_pages(), we also do it in:
      
           1) get_mm_exe_file()
           2) to get the mm->vm_file and notify the simulator.
      
          [Note that 1) will disappear once we change the locking
           rules for exe_file.]
      
         o We avoid getting a free page and doing d_path() while
           holding the mmap_sem. This requires reordering the checks.
      Signed-off-by: NDavidlohr Bueso <dbueso@suse.de>
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      5a3b4e80
    • C
      tile: use si_int instead of si_ptr for compat_siginfo · 89067c2d
      Chris Metcalf 提交于
      To be compatible with the generic get_compat_sigevent(), the
      copy_siginfo_to_user32() and thus copy_siginfo_from_user32()
      have to use si_int instead of si_ptr.  Using si_ptr means that
      for the case of ILP32 compat code running in big-endian mode,
      we would end up copying the high 32 bits of the pointer value
      into si_int instead of the desired low 32 bits.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      89067c2d
  6. 17 4月, 2015 12 次提交