07 Nov, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (106 commits)
    powerpc/p3060qds: Add support for P3060QDS board
    powerpc/83xx: Add shutdown request support to MCU handling on MPC8349 MITX
    powerpc/85xx: Make kexec to interate over online cpus
    powerpc/fsl_booke: Fix comment in head_fsl_booke.S
    powerpc/85xx: issue 15 EOI after core reset for FSL CoreNet devices
    powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO driver
    powerpc/85xx: Add 'fsl,pq3-gpio' compatiable for GPIO driver
    powerpc/86xx: Correct Gianfar support for GE boards
    powerpc/cpm: Clear muram before it is in use.
    drivers/virt: add ioctl for 32-bit compat on 64-bit to fsl-hv-manager
    powerpc/fsl_msi: add support for "msi-address-64" property
    powerpc/85xx: Setup secondary cores PIR with hard SMP id
    powerpc/fsl-booke: Fix settlbcam for 64-bit
    powerpc/85xx: Adding DCSR node to dtsi device trees
    powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
    powerpc/85xx: fix PHYS_64BIT selection for P1022DS
    powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map
    powerpc: respect mem= setting for early memory limit setup
    powerpc: Update corenet64_smp_defconfig
    powerpc: Update mpc85xx/corenet 32-bit defconfigs
    ...

    Fix up trivial conflicts in:
    - arch/powerpc/configs/40x/hcu4_defconfig
    removed stale file, edited elsewhere
    - arch/powerpc/include/asm/udbg.h, arch/powerpc/kernel/udbg.c:
    added opal and gelic drivers vs added ePAPR driver
    - drivers/tty/serial/8250.c
    moved UPIO_TSI to powerpc vs removed UPIO_DWAPB support

    Linus Torvalds
     

03 Nov, 2011

1 commit


20 Sep, 2011

1 commit

  • If an architecture sets ARCH_HAS_DMA_GET_REQUIRED_MASK and has settable
    dma_map_ops, the required mask may change by the ops implementation.
    For example, a system that always has an mmu inline may only require 32
    bits while a swiotlb would desire bits to cover all of memory.

    Therefore add the field if the architecture does not use the generic
    definition of dma_get_required_mask. The first use will by by powerpc.
    Note that this does add some dependency on the order in which files are
    visible here.

    Signed-off-by: Milton Miller
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: FUJITA Tomonori

    Milton Miller
     

27 Jul, 2011

1 commit


22 Jun, 2011

1 commit

  • Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

    To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
    definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
    via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
    Removal of mm.h from scatterlist.h was tried and was found not feasible
    on most archs, so the link was cutoff earlier.

    Hope people are OK with tiny include file.

    Note, that mm_types.h is still dragged in, but it is a separate story.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

23 Sep, 2010

1 commit

  • This fixes the regression caused by the commit 6fee48cd330c68
    ("dma-mapping: arm: use generic pci_set_dma_mask and
    pci_set_consistent_dma_mask").

    ARM needs to clip the dma coherent mask for dmabounce devices. This
    restores the old trick.

    Note that strictly speaking, the DMA API doesn't allow architectures to do
    such but I'm not sure it's worth adding the new API to set the dma mask
    that allows architectures to clip it.

    Reported-by: Krzysztof Halasa
    Signed-off-by: FUJITA Tomonori
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

14 Aug, 2010

1 commit

  • commit 4565f0170dfc849b3629c27d769db800467baa62 "dma-mapping: unify
    dma_get_cache_alignment implementations" causes build errors on
    !HAS_DMA architectures/platforms like s390 and sun3:

    include/linux/dma-mapping.h:145: error: static declaration of 'dma_get_cache_alignment' follows non-static declaration
    include/asm-generic/dma-mapping-broken.h:73: error: previous declaration of 'dma_get_cache_alignment' was here

    Fix this by adding an explicit ifdef.

    Cc: Geert Uytterhoeven
    Acked-by: FUJITA Tomonori
    Signed-off-by: Heiko Carstens
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

11 Aug, 2010

1 commit

  • dma_get_cache_alignment returns the minimum DMA alignment. Architectures
    defines it as ARCH_DMA_MINALIGN (formally ARCH_KMALLOC_MINALIGN). So we
    can unify dma_get_cache_alignment implementations.

    Note that some architectures implement dma_get_cache_alignment wrongly.
    dma_get_cache_alignment() should return the minimum DMA alignment. So
    fully-coherent architectures should return 1. This patch also fixes this
    issue.

    Signed-off-by: FUJITA Tomonori
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

28 May, 2010

2 commits


13 Mar, 2010

2 commits

  • dma_set_coherent_mask corresponds to pci_set_consistent_dma_mask. This is
    necessary to move to the generic device model DMA API from the PCI bus
    specific API in the long term.

    dma_set_coherent_mask works in the exact same way that
    pci_set_consistent_dma_mask does. So this patch also changes
    pci_set_consistent_dma_mask to call dma_set_coherent_mask.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: David S. Miller
    Cc: Jesse Barnes
    Cc: Benjamin Herrenschmidt
    Cc: Russell King
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • Adds the following macros:

    DECLARE_DMA_UNMAP_ADDR(ADDR_NAME)
    DECLARE_DMA_UNMAP_LEN(LEN_NAME)
    dma_unmap_addr(PTR, ADDR_NAME)
    dma_unmap_addr_set(PTR, ADDR_NAME, VAL)
    dma_unmap_len(PTR, LEN_NAME)
    dma_unmap_len_set(PTR, LEN_NAME, VAL)

    The API corresponds to the pci_unmap state API. We'll move to this new
    generic API from the PCI specific API in the long term. As
    include/asm-generic/pci-dma-compat.h does, the pci_unmap API simply calls
    the new generic API for some time.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: David S. Miller
    Cc: Jesse Barnes
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

28 Aug, 2009

1 commit


28 Jul, 2009

1 commit

  • is_buffer_dma_capable() was replaced with dma_capable().

    is_buffer_dma_capable() tells if a buffer is dma-capable or
    not. However, it doesn't take a pointer to struct device so it doesn't
    work for POWERPC.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Becky Bruce

    FUJITA Tomonori
     

20 Jun, 2009

2 commits

  • dma_sync_single() and dma_sync_sg() have been described as "Backwards
    compat, remove in 2.7.x" for a long time (since 2.6.5).

    This marks dma_sync_single() and dma_sync_sg() as deprecated so the users
    get notified before removing them.

    Signed-off-by: FUJITA Tomonori
    Cc: Ingo Molnar
    Cc: James Bottomley
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • Mark them deprecated so that out-of-tree developers get notified about
    this before their modules break when these macros are removed.

    Signed-off-by: Jiri Slaby
    Cc: Yang Hongyang
    Acked-by: FUJITA Tomonori
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

07 Apr, 2009

1 commit


06 Jan, 2009

1 commit


19 Sep, 2008

1 commit


14 Sep, 2008

1 commit


10 Sep, 2008

1 commit

  • is_buffer_dma_capable helper function is to see if a memory region is
    DMA-capable or not. The arugments are the dma_mask (or
    coherent_dma_mask) of a device and the address and size of a memory
    region.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Joerg Roedel
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

29 Apr, 2008

1 commit

  • Introduce new interfaces, dma_*map*_attrs(), for passing architecture-specific
    attributes when memory is mapped and unmapped for DMA. Give the interfaces
    default implementations which ignore attributes. Also introduce the
    dma_{set|get}_attr() interfaces for setting and retrieving individual
    attributes. Define one attribute, DMA_ATTR_WRITE_BARRIER, in anticipation of
    its use by ia64/sn. Select whether architectures implement arch-specific
    versions of the dma_*map*_attrs() interfaces via HAVE_DMA_ATTRS in Kconfig.

    [markn@au1.ibm.com: dma_{set,get}_attr() have to be static inline]
    Signed-off-by: Arthur Kepner
    Cc: Tony Luck
    Cc: Jesse Barnes
    Cc: Jes Sorensen
    Cc: Randy Dunlap
    Cc: Roland Dreier
    Cc: James Bottomley
    Cc: David Miller
    Cc: Benjamin Herrenschmidt
    Cc: Grant Grundler
    Cc: Michael Ellerman
    Signed-off-by: Mark Nelson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Kepner
     

06 Feb, 2008

2 commits

  • This adds new accessors for segment_boundary_mask in device_dma_parameters
    structure in the same way I did for max_segment_size. So we can easily change
    where to place struct device_dma_parameters in the future.

    dma_get_segment boundary returns 0xffffffff if dma_parms in struct device
    isn't set up properly. 0xffffffff is the default value used in the block
    layer and the scsi mid layer.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: Jens Axboe
    Cc: Greg KH
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • IOMMUs merges scatter/gather segments without considering a low level
    driver's restrictions. The problem is that IOMMUs can't access to the
    limitations because they are in request_queue.

    This patchset introduces a new structure, device_dma_parameters,
    including dma information. A pointer to device_dma_parameters is added
    to struct device. The bus specific structures (like pci_dev) includes
    device_dma_parameters. Low level drivers can use dma_set_max_seg_size
    to tell IOMMUs about the restrictions.

    We can move more dma stuff in struct device (like dma_mask) to struct
    device_dma_parameters later (needs some cleanups before that).

    This includes patches for all the IOMMUs that could merge sg (x86_64,
    ppc, IA64, alpha, sparc64, and parisc) though only the ppc patch was
    tested. The patches for other IOMMUs are only compile tested.

    This patch:

    Add a new structure, device_dma_parameters, including dma information. A
    pointer to device_dma_parameters is added to struct device.

    - there are only max_segment_size and segment_boundary_mask there but we'll
    move more dma stuff in struct device (like dma_mask) to struct
    device_dma_parameters later. segment_boundary_mask is not supported yet.

    - new accessors for the dma parameters are added. So we can easily change
    where to place struct device_dma_parameters in the future.

    - dma_get_max_seg_size returns 64K if dma_parms in struct device isn't set
    up properly. 64K is the default max_segment_size in the block layer.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Jeff Garzik
    Cc: James Bottomley
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

03 Feb, 2008

1 commit


19 Oct, 2007

2 commits

  • Now that we have DMA_BIT_MASK(), these macros are pointless.

    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Remove redundant DMA_..BIT_MASK definitions across two drivers. The
    computation of the majority of the bitmasks is done by the compiler. The
    initial split of the patch touching each a different file got removed due
    to possible git bisect breakage.

    Signed-off-by: Borislav Petkov
    Cc: Jeremy Fitzhardinge
    Cc: Muli Ben-Yehuda
    Cc: Jeff Garzik
    Cc: James Bottomley
    Reviewed-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     

17 Oct, 2007

1 commit

  • Some devices are incapable of DMA and need to be recognised as such.
    Introduce a NONE dma mask to facilitate this plus an inline function:
    is_device_dma_capable() to check this.

    Signed-off-by: James Bottomley
    Cc: Andi Kleen
    Cc: Alan Cox
    Cc: Tejun Heo
    Cc: Natalie Protasevich
    Cc: Jeff Garzik
    Cc: Dominik Brodowski
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Bottomley
     

17 Jul, 2007

1 commit

  • Continuing the work started in 411f0f3edc141a582190d3605cadd1d993abb6df ...

    This enables code with a dma path, that compiles away, to build without
    requiring additional code factoring. It also prevents code that calls
    dma_alloc_coherent and dma_free_coherent from linking whereas previously
    the code would hit a BUG() at run time. Finally, it allows archs that set
    !HAS_DMA to delete their asm/dma-mapping.h file.

    Cc: Cornelia Huck
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: John W. Linville
    Cc: Kyle McMartin
    Cc: James Bottomley
    Cc: Tejun Heo
    Cc: Jeff Garzik
    Cc:
    Cc:
    Cc:
    Cc:
    Signed-off-by: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     

10 Feb, 2007

1 commit

  • Implement device resource management, in short, devres. A device
    driver can allocate arbirary size of devres data which is associated
    with a release function. On driver detach, release function is
    invoked on the devres data, then, devres data is freed.

    devreses are typed by associated release functions. Some devreses are
    better represented by single instance of the type while others need
    multiple instances sharing the same release function. Both usages are
    supported.

    devreses can be grouped using devres group such that a device driver
    can easily release acquired resources halfway through initialization
    or selectively release resources (e.g. resources for port 1 out of 4
    ports).

    This patch adds devres core including documentation and the following
    managed interfaces.

    * alloc/free : devm_kzalloc(), devm_kzfree()
    * IO region : devm_request_region(), devm_release_region()
    * IRQ : devm_request_irq(), devm_free_irq()
    * DMA : dmam_alloc_coherent(), dmam_free_coherent(),
    dmam_declare_coherent_memory(), dmam_pool_create(),
    dmam_pool_destroy()
    * PCI : pcim_enable_device(), pcim_pin_device(), pci_is_managed()
    * iomap : devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
    devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
    pcim_iomap(), pcim_iounmap()

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

30 Sep, 2006

1 commit


11 May, 2006

1 commit


11 Apr, 2006

1 commit

  • These are the last conversions of pci_set_dma_mask(),
    pci_set_consistent_dma_mask() and pci_dma_supported() to use DMA_xBIT_MASK
    constants from linux/dma-mapping.h

    Signed-off-by: Tobias Klauser
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

29 Mar, 2006

1 commit


22 Mar, 2006

1 commit


18 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds