Skip to content
  1. Oct 10, 2013
    • Stefano Stabellini's avatar
      swiotlb-xen: use xen_alloc/free_coherent_pages · 1b65c4e5
      Stefano Stabellini authored
      
      
      Use xen_alloc_coherent_pages and xen_free_coherent_pages to allocate or
      free coherent pages.
      
      We need to be careful handling the pointer returned by
      xen_alloc_coherent_pages, because on ARM the pointer is not equal to
      phys_to_virt(*dma_handle). In fact virt_to_phys only works for kernel
      direct mapped RAM memory.
      In ARM case the pointer could be an ioremap address, therefore passing
      it to virt_to_phys would give you another physical address that doesn't
      correspond to it.
      
      Make xen_create_contiguous_region take a phys_addr_t as start parameter to
      avoid the virt_to_phys calls which would be incorrect.
      
      Changes in v6:
      - remove extra spaces.
      
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      1b65c4e5
    • Stefano Stabellini's avatar
      xen: introduce xen_alloc/free_coherent_pages · d6fe76c5
      Stefano Stabellini authored
      
      
      xen_swiotlb_alloc_coherent needs to allocate a coherent buffer for cpu
      and devices. On native x86 is sufficient to call __get_free_pages in
      order to get a coherent buffer, while on ARM (and potentially ARM64) we
      need to call the native dma_ops->alloc implementation.
      
      Introduce xen_alloc_coherent_pages to abstract the arch specific buffer
      allocation.
      
      Similarly introduce xen_free_coherent_pages to free a coherent buffer:
      on x86 is simply a call to free_pages while on ARM and ARM64 is
      arm_dma_ops.free.
      
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      
      
      Changes in v7:
      - rename __get_dma_ops to __generic_dma_ops;
      - call __generic_dma_ops(hwdev)->alloc/free on arm64 too.
      
      Changes in v6:
      - call __get_dma_ops to get the native dma_ops pointer on arm.
      d6fe76c5
  2. Oct 19, 2013
  3. Oct 10, 2013
  4. Oct 18, 2013
    • Stefano Stabellini's avatar
      arm/xen,arm64/xen: introduce p2m · 4a19138c
      Stefano Stabellini authored
      
      
      Introduce physical to machine and machine to physical tracking
      mechanisms based on rbtrees for arm/xen and arm64/xen.
      
      We need it because any guests on ARM are an autotranslate guests,
      therefore a physical address is potentially different from a machine
      address. When programming a device to do DMA, we need to be
      extra-careful to use machine addresses rather than physical addresses to
      program the device. Therefore we need to know the physical to machine
      mappings.
      
      For the moment we assume that dom0 starts with a 1:1 physical to machine
      mapping, in other words physical addresses correspond to machine
      addresses. However when mapping a foreign grant reference, obviously the
      1:1 model doesn't work anymore. So at the very least we need to be able
      to track grant mappings.
      
      We need locking to protect accesses to the two trees.
      
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      
      Changes in v8:
      - move pfn_to_mfn and mfn_to_pfn to page.h as static inline functions;
      - no need to walk the tree if phys_to_mach.rb_node is NULL;
      - correctly handle multipage p2m entries;
      - substitute the spin_lock with a rwlock.
      4a19138c
  5. Oct 15, 2013
  6. Oct 14, 2013
  7. Oct 13, 2013
  8. Oct 12, 2013
    • Vineet Gupta's avatar
      ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc" · 5b242828
      Vineet Gupta authored
      
      
      ARCompact TRAP_S insn used for breakpoints, commits before exception is
      taken (updating architectural PC). So ptregs->ret contains next-PC and
      not the breakpoint PC itself. This is different from other restartable
      exceptions such as TLB Miss where ptregs->ret has exact faulting PC.
      gdb needs to know exact-PC hence ARC ptrace GETREGSET provides for
      @stop_pc which returns ptregs->ret vs. EFA depending on the
      situation.
      
      However, writing stop_pc (SETREGSET request), which updates ptregs->ret
      doesn't makes sense stop_pc doesn't always correspond to that reg as
      described above.
      
      This was not an issue so far since user_regs->ret / user_regs->stop_pc
      had same value and both writing to ptregs->ret was OK, needless, but NOT
      broken, hence not observed.
      
      With gdb "jump", they diverge, and user_regs->ret updating ptregs is
      overwritten immediately with stop_pc, which this patch fixes.
      
      Reported-by: default avatarAnton Kolesov <akolesov@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      5b242828
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 46f37519
      Linus Torvalds authored
      Pull MIPS fix from Ralf Baechle:
       "Just one fix.  The stack protector was loading the value of the canary
        instead of its address"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: stack protector: Fix per-task canary switch
      46f37519
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · cd4edf7a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "All over the map..
      
         - nouveau:
           disable MSI, needs more work, will try again next merge window
         - radeon:
            audio + uvd regression fixes, dpm fixes, reset fixes
         - i915:
           the dpms fix might fix your haswell
      
        And one pain in the ass revert, so we have VGA arbitration that when
        implemented 4-5 years ago really hoped that GPUs could remove
        themselves from arbitration completely once they had a kernel driver.
      
        It seems Intel hw designers decided that was too nice a facility to
        allow us to have so they removed it when they went on-die (so since
        Ironlake at least).  Now Alex Williamson added support for VGA
        arbitration for newer GPUs however this now exposes itself to
        userspace as requireing arbitration of GPU VGA regions and the X
        server gets involved and disables things that it can't handle when VGA
        access is possibly required around every operation.
      
        So in order to not break userspace we just reverted things back to the
        old known broken status so maybe we can try and design out way out.
      
        Ville also had a patch to use stop machine for the two times Intel
        needs to access VGA space, that might be acceptable with some rework,
        but for now myself and Daniel agreed to just go back"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (23 commits)
        Revert "i915: Update VGA arbiter support for newer devices"
        Revert "drm/i915: Delay disabling of VGA memory until vgacon->fbcon handoff is done"
        drm/radeon: re-enable sw ACR support on pre-DCE4
        drm/radeon/dpm: disable bapm on TN asics
        drm/radeon: improve soft reset on CIK
        drm/radeon: improve soft reset on SI
        drm/radeon/dpm: off by one in si_set_mc_special_registers()
        drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()
        drm/radeon: forever loop on error in radeon_do_test_moves()
        drm/radeon: fix hw contexts for SUMO2 asics
        drm/radeon: fix typo in CP DMA register headers
        drm/radeon/dpm: disable multiple UVD states
        drm/radeon: use hw generated CTS/N values for audio
        drm/radeon: fix N/CTS clock matching for audio
        drm/radeon: use 64-bit math to calculate CTS values for audio (v2)
        drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
        Revert "drm/fb-helper: don't sleep for screen unblank when an oops is in progress"
        drm/gma500: fix things after get/put page helpers
        drm/nouveau/mc: disable msi support by default, it's busted in tons of places
        drm/i915: Only apply DPMS to the encoder if enabled
        ...
      cd4edf7a